<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/sound/soc/soc-utils.c, branch linux-rolling-stable</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-rolling-stable</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-rolling-stable'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2025-05-16T11:18:15Z</updated>
<entry>
<title>ASoC: soc-utils: Check string pointer validity in snd_soc_dlc_is_dummy()</title>
<updated>2025-05-16T11:18:15Z</updated>
<author>
<name>Chen-Yu Tsai</name>
<email>wenst@chromium.org</email>
</author>
<published>2025-05-16T05:05:48Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=628479afc7a157bca3430a75e759ed06c1a81c66'/>
<id>urn:sha1:628479afc7a157bca3430a75e759ed06c1a81c66</id>
<content type='text'>
In the recently added snd_soc_dlc_is_dummy(), the helper uses the .name
and .dai_name fields without checking their validity.

For .name, this field is NULL if the component is matched by .of_node
instead. In fact, only one of these fields may be set. This caused a
NULL pointer dereference on MediaTek MT8195 and MT8188 platforms with
the subsequent conversion to snd_soc_dlc_is_dummy() in their machine
drivers. The codecs are all matches through the device tree, so their
.name fields are empty.

For .dai_name, there are cases where this field is empty, such as for
the following component definitions:

	#define COMP_EMPTY()                    { }
	#define COMP_PLATFORM(_name)            { .name = _name }
	#define COMP_AUX(_name)                 { .name = _name }
	#define COMP_CODEC_CONF(_name)          { .name = _name }

Or the single link CPU DAI case in the simple audio card family, as
covered by simple_util_canonicalize_cpu(), in which the .dai_name
field is explicitly cleared.

To fix this, check the validity of the fields before using them in
string comparison.

Fixes: 3e021f3b8115 ("ASoC: soc-utils: add snd_soc_dlc_is_dummy()")
Cc: Kuninori Morimoto &lt;kuninori.morimoto.gx@renesas.com&gt;
Signed-off-by: Chen-Yu Tsai &lt;wenst@chromium.org&gt;
Acked-by: Kuninori Morimoto &lt;kuninori.morimoto.gx@renesas.com&gt;
Link: https://patch.msgid.link/20250516050549.407133-1-wenst@chromium.org
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>ASoC: soc-utils: add snd_soc_dlc_is_dummy()</title>
<updated>2025-05-01T20:38:41Z</updated>
<author>
<name>Kuninori Morimoto</name>
<email>kuninori.morimoto.gx@renesas.com</email>
</author>
<published>2025-04-16T06:27:10Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=3e021f3b8115614127dd04c5615ccbcc2706bdd5'/>
<id>urn:sha1:3e021f3b8115614127dd04c5615ccbcc2706bdd5</id>
<content type='text'>
We have snd_soc_xxx_is_dummy() functions, but not for dlc.
Let's add it.

Signed-off-by: Kuninori Morimoto &lt;kuninori.morimoto.gx@renesas.com&gt;
Link: https://patch.msgid.link/87cydc8vup.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>ASoC: soc-utils: Transition to the faux device interface</title>
<updated>2025-03-17T16:25:51Z</updated>
<author>
<name>Sudeep Holla</name>
<email>sudeep.holla@arm.com</email>
</author>
<published>2025-03-17T10:13:18Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=18abb3797f1ceca97a705aa1c14cbec5c6fcab79'/>
<id>urn:sha1:18abb3797f1ceca97a705aa1c14cbec5c6fcab79</id>
<content type='text'>
The ASoC soc-utils driver does not require the creation of a platform
device. Originally, this approach was chosen for simplicity when the
driver was first implemented.

With the introduction of the lightweight faux device interface, we now
have a more appropriate alternative. Migrate the driver to utilize the
faux bus, given that the platform device it previously created was not
a real one anyway. This will simplify the code, reducing its footprint
while maintaining functionality.

Cc: Mark Brown &lt;broonie@kernel.org&gt;
Cc: Takashi Iwai &lt;tiwai@suse.com&gt;
Cc: linux-sound@vger.kernel.org
Signed-off-by: Sudeep Holla &lt;sudeep.holla@arm.com&gt;
Link: https://patch.msgid.link/20250317-plat2faux_dev-v1-6-5fe67c085ad5@arm.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>ASoC: soc-utils: care -EOPNOTSUPP on snd_soc_ret()</title>
<updated>2025-02-06T17:26:19Z</updated>
<author>
<name>Kuninori Morimoto</name>
<email>kuninori.morimoto.gx@renesas.com</email>
</author>
<published>2025-02-05T00:16:14Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=062b7ef6b103dcbcb3c084e8ace8e74e260b2346'/>
<id>urn:sha1:062b7ef6b103dcbcb3c084e8ace8e74e260b2346</id>
<content type='text'>
We get below warning by checkpatch on soc-utils.
Adds EOPNOTSUPP, but not remove existing ENOTSUPP.

	WARNING: ENOTSUPP is not a SUSV4 error code, prefer EOPNOTSUPP

Signed-off-by: Kuninori Morimoto &lt;kuninori.morimoto.gx@renesas.com&gt;
Link: https://patch.msgid.link/87ed0d2qlt.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>ASoC: add common snd_soc_ret() and use it</title>
<updated>2025-02-06T17:26:18Z</updated>
<author>
<name>Kuninori Morimoto</name>
<email>kuninori.morimoto.gx@renesas.com</email>
</author>
<published>2025-02-05T00:16:10Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=943116ba2a6ab472e8ad2d1e57a3f10f13485cc2'/>
<id>urn:sha1:943116ba2a6ab472e8ad2d1e57a3f10f13485cc2</id>
<content type='text'>
Each soc-xxx.c is using own snd_xxx_ret(), but we want to share it.
Let's add common snd_soc_ret() for it.

Signed-off-by: Kuninori Morimoto &lt;kuninori.morimoto.gx@renesas.com&gt;
Link: https://patch.msgid.link/87frkt2qlx.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>ASoC: soc-utils: Remove PAGE_SIZE compile-time constant assumption</title>
<updated>2024-10-21T13:14:56Z</updated>
<author>
<name>Ryan Roberts</name>
<email>ryan.roberts@arm.com</email>
</author>
<published>2024-10-21T13:03:07Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=5337ff41d37d4171868bb7b34dade68e269743f0'/>
<id>urn:sha1:5337ff41d37d4171868bb7b34dade68e269743f0</id>
<content type='text'>
In pursuit of the goal of supporting boot-time page size selection,
remove use of PAGE_SIZE from the dummy_dma_hardware struct definition,
since the value is not known at compile-time for this config.

Given the previous parameters were "essentially random", let's just
hardcode them as 4K and 4K*2 to sidestep the need to boot-time patch the
structure with the selected PAGE_SIZE.

Signed-off-by: Ryan Roberts &lt;ryan.roberts@arm.com&gt;
Link: https://patch.msgid.link/20241021130308.3616451-1-ryan.roberts@arm.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>ASoC: soc-utils: allow sample rate up to 768kHz for the dummy dai</title>
<updated>2024-06-28T12:39:29Z</updated>
<author>
<name>Jerome Brunet</name>
<email>jbrunet@baylibre.com</email>
</author>
<published>2024-06-28T12:01:29Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=4adf454ff62883ee64b0b9818b951f34aa078d5a'/>
<id>urn:sha1:4adf454ff62883ee64b0b9818b951f34aa078d5a</id>
<content type='text'>
The dummy DAI should allow any (reasonable) rates possible.
Make the rate continuous for dummy and set range from 5512Hz to 768kHz

The change is mostly cosmetic as dummy is skipped when setting
the hwparams.

Signed-off-by: Jerome Brunet &lt;jbrunet@baylibre.com&gt;
Link: https://patch.msgid.link/20240628120130.2015665-1-jbrunet@baylibre.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>ASoC: Few constifications (mostly arguments)</title>
<updated>2024-06-23T12:13:00Z</updated>
<author>
<name>Mark Brown</name>
<email>broonie@kernel.org</email>
</author>
<published>2024-06-23T12:13:00Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=86a37eb60ba1f17cae8ac006d0de1a6091e5ba31'/>
<id>urn:sha1:86a37eb60ba1f17cae8ac006d0de1a6091e5ba31</id>
<content type='text'>
Merge series from Krzysztof Kozlowski &lt;krzysztof.kozlowski@linaro.org&gt;:

Make few pointers in ASoC functions as pointers to const, so the code is
clearer to read, a bit safer and allows further constifications (e.g.
placing some data as rodata).
</content>
</entry>
<entry>
<title>ASoC: Constify passed data to core function</title>
<updated>2024-06-18T13:19:54Z</updated>
<author>
<name>Krzysztof Kozlowski</name>
<email>krzysztof.kozlowski@linaro.org</email>
</author>
<published>2024-06-17T13:03:21Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=f3ac3da7e4d0957b3402fb31a4ca480e739e086f'/>
<id>urn:sha1:f3ac3da7e4d0957b3402fb31a4ca480e739e086f</id>
<content type='text'>
Several ASoC functions receive pointers to data which is not modified,
e.g. pointers to 'snd_soc_dai', 'snd_soc_pcm_runtime',
'snd_pcm_hw_params' and 'snd_soc_dai_link'.

All these pointers can be made as a pointer to const.  This makes code
safer, serves as clear annotation of function's intentions (no ownership
passed to the function, no modifications) and allows putting pointed
structures in rodata (if ever applicable).

Signed-off-by: Krzysztof Kozlowski &lt;krzysztof.kozlowski@linaro.org&gt;
Link: https://msgid.link/r/20240617-n-asoc-const-auto-selectable-formats-v1-3-8004f346ee38@linaro.org
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>ASoC: Constify DAI ops auto_selectable_formats</title>
<updated>2024-06-17T17:29:02Z</updated>
<author>
<name>Krzysztof Kozlowski</name>
<email>krzysztof.kozlowski@linaro.org</email>
</author>
<published>2024-06-17T12:57:35Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=595265c92668cbdbd9f299c49907734d468c12e9'/>
<id>urn:sha1:595265c92668cbdbd9f299c49907734d468c12e9</id>
<content type='text'>
The static arrays passed as 'auto_selectable_formats' are not modified
by the drivers nor by the core code, so make it const for code safety.

Signed-off-by: Krzysztof Kozlowski &lt;krzysztof.kozlowski@linaro.org&gt;
Acked-by: Herve Codina &lt;herve.codina@bootlin.com&gt;
Link: https://msgid.link/r/20240617125735.582963-2-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
</feed>
