<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/include/sound/soc-component.h, branch v6.1.168</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.1.168</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.1.168'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2022-06-27T12:17:43+00:00</updated>
<entry>
<title>ASoC: soc-component: Remove non_legacy_dai_naming flag</title>
<updated>2022-06-27T12:17:43+00:00</updated>
<author>
<name>Charles Keepax</name>
<email>ckeepax@opensource.cirrus.com</email>
</author>
<published>2022-06-23T12:52:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=01936221278c5af60d82b8e78ca74caa491c0d31'/>
<id>urn:sha1:01936221278c5af60d82b8e78ca74caa491c0d31</id>
<content type='text'>
Now all the users are moved over to the new legacy_dai_naming flag,
remove the now unused old flag.

Signed-off-by: Charles Keepax &lt;ckeepax@opensource.cirrus.com&gt;
Link: https://lore.kernel.org/r/20220623125250.2355471-97-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>ASoC: soc-component: Add legacy_dai_naming flag</title>
<updated>2022-06-27T12:16:14+00:00</updated>
<author>
<name>Charles Keepax</name>
<email>ckeepax@opensource.cirrus.com</email>
</author>
<published>2022-06-23T12:51:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=1c348f748b4dd7711c5564a8fce0842529498dff'/>
<id>urn:sha1:1c348f748b4dd7711c5564a8fce0842529498dff</id>
<content type='text'>
Historically, the legacy DAI naming scheme was applied to platform
drivers and the newer scheme to CODEC drivers. During componentisation
the core lost the knowledge of if a driver was a CODEC or platform, they
were all now components. To continue to support the legacy naming on
older platform drivers a flag was added to the snd_soc_component_driver
structure, non_legacy_dai_naming, to indicate to use the new scheme and
this was applied to all CODECs as part of the migration.

However, a slight issue appears to be developing with respect to this
flag being opt in for the non-legacy scheme, which presumably we want to
be the primary scheme used. Many codec drivers appear to forget to
include this flag:

  grep -l -r "snd_soc_component_driver" sound/soc/codecs/*.c |
  xargs grep -L "non_legacy_dai_naming" | wc
     48      48    556

It would seem more sensible to change the flag to legacy_dai_naming
making the new scheme opt out. As a first step this patch adds a new
flag for this so that the users can be updated.

Signed-off-by: Charles Keepax &lt;ckeepax@opensource.cirrus.com&gt;
Link: https://lore.kernel.org/r/20220623125250.2355471-2-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>ASoC: simple-card-utils: Move snd_soc_component_is_codec to be local</title>
<updated>2022-06-06T11:34:22+00:00</updated>
<author>
<name>Charles Keepax</name>
<email>ckeepax@opensource.cirrus.com</email>
</author>
<published>2022-05-19T15:43:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=28086d05ada6d03daa886aad0e469854b811311c'/>
<id>urn:sha1:28086d05ada6d03daa886aad0e469854b811311c</id>
<content type='text'>
The helper function snd_soc_component_is_codec is based off the
presence of the non_legacy_dai_naming flag. This isn't super robust
as CPU side components may also specify this flag, and indeed the
kernel already contains a couple that do. After componentisation there
isn't really a totally robust solution to identifying what is a CODEC
driver, without introducing a flag specifically for that purpose, and
really the desirable direction to move in is that the distinction
doesn't matter.

This patch does two things to try to mitigate these problems. Firstly,
now that all the other users of the helper function have been removed,
it makes the helper function local to the driver rather, than being
part of the core. This should help to discourage any new code from
being created that depends on the CODEC driver distinction. Secondly,
it updates the helper function itself to use the endianness flag
rather than the non_legacy_dai_naming flag. The endianness flag is
definitely invalid on a CPU side component, so it a more reliable
indicator that the device is definitely a CODEC. The vast majority of
buses require the CODEC to set the endianness flag, so the number of
corner cases should be fairly minimal. It is worth noting that CODECs
sending audio over SPI, or built into the CPU CODECs are potential
corner cases, however the hope is that in most cases those types of
devices do not consitute a simple audio card.

Signed-off-by: Charles Keepax &lt;ckeepax@opensource.cirrus.com&gt;
Link: https://lore.kernel.org/r/20220519154318.2153729-57-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>ASoC: soc-component: Add comment for the endianness flag</title>
<updated>2022-05-09T11:46:06+00:00</updated>
<author>
<name>Charles Keepax</name>
<email>ckeepax@opensource.cirrus.com</email>
</author>
<published>2022-05-04T17:08:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5c832efdbf8651e2800a0169a870786bd85ee230'/>
<id>urn:sha1:5c832efdbf8651e2800a0169a870786bd85ee230</id>
<content type='text'>
Add a comment to make the purpose of the endianness flag on the
snd_soc_component structure more clear.

Signed-off-by: Charles Keepax &lt;ckeepax@opensource.cirrus.com&gt;
Link: https://lore.kernel.org/r/20220504170905.332415-2-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>ASoC: soc-core: add debugfs_prefix member to snd_soc_component_driver</title>
<updated>2022-04-05T18:14:20+00:00</updated>
<author>
<name>Heiner Kallweit</name>
<email>hkallweit1@gmail.com</email>
</author>
<published>2022-03-09T20:21:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d462f6ed2aeac30c0b440a91fb05d964956935f9'/>
<id>urn:sha1:d462f6ed2aeac30c0b440a91fb05d964956935f9</id>
<content type='text'>
Allow the component debugfs_prefix to be set from
snd_soc_component_driver. First use case is avoiding a duplicate
debugfs entry error in case a device has multiple components
which have the same name therefore.

Note that we don't set component-&gt;debugfs_prefix if it's set already.
That's needed because partially component-&gt;debugfs_prefix is set
before calling snd_soc_component_initialize().

Signed-off-by: Heiner Kallweit &lt;hkallweit1@gmail.com&gt;
Link: https://lore.kernel.org/r/d18bff6a-1df1-5f95-0cf8-10dbaa62d7be@gmail.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>ASoC: soc-component: add snd_soc_pcm_component_delay()</title>
<updated>2021-11-29T12:19:41+00:00</updated>
<author>
<name>Kuninori Morimoto</name>
<email>kuninori.morimoto.gx@renesas.com</email>
</author>
<published>2021-11-16T07:45:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=403f830e7a0be5a9e33c7a9d208574f79887ec57'/>
<id>urn:sha1:403f830e7a0be5a9e33c7a9d208574f79887ec57</id>
<content type='text'>
Current soc-pcm.c :: soc_pcm_pointer() is assuming that
component driver might update runtime-&gt;delay silently in
snd_soc_pcm_component_pointer() (= A).

	static snd_pcm_uframes_t soc_pcm_pointer(...)
	{
		...

		/* clearing the previous total delay */
=&gt;		runtime-&gt;delay = 0;

(A)		offset = snd_soc_pcm_component_pointer(substream);

		/* base delay if assigned in pointer callback */
=&gt;		delay = runtime-&gt;delay;
		...
	}

1) The behavior that ".pointer callback secretly updates
   runtime-&gt;delay" is strange and confusable.

2) Current snd_soc_pcm_component_pointer() uses 1st found component's
   .pointer callback only, thus it is no problem for now.
   But runtime-&gt;delay might be overwrote if it adjusted to multiple
   components in the future.

3) Component delay is updated at .pointer callback timing (secretly).
   But some components which doesn't have .pointer callback might want
   to increase runtime-&gt;delay for some reasons.

We already have .delay function for DAI, but not have for Component.
This patch adds new snd_soc_pcm_component_delay() for it.

Signed-off-by: Kuninori Morimoto &lt;kuninori.morimoto.gx@renesas.com&gt;
Link: https://lore.kernel.org/r/874k8cy25t.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>ASoC: soc-component: add snd_soc_component_is_codec()</title>
<updated>2021-10-18T12:56:37+00:00</updated>
<author>
<name>Kuninori Morimoto</name>
<email>kuninori.morimoto.gx@renesas.com</email>
</author>
<published>2021-10-18T02:05:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=01e90ee15e81f57d309d0ce1f0e16869e011b800'/>
<id>urn:sha1:01e90ee15e81f57d309d0ce1f0e16869e011b800</id>
<content type='text'>
Checking .non_legacy_dai_naming is not readable.
Let's add new snd_soc_component_is_codec().

Signed-off-by: Kuninori Morimoto &lt;kuninori.morimoto.gx@renesas.com&gt;
Link: https://lore.kernel.org/r/87h7dft7dn.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>ASoC: soc-component: Remove conditional definition of debugfs data members</title>
<updated>2021-10-01T18:34:58+00:00</updated>
<author>
<name>Simon Trimmer</name>
<email>simont@opensource.cirrus.com</email>
</author>
<published>2021-09-30T14:21:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0a43c152ed0666dc837009bae031b898ced95e5b'/>
<id>urn:sha1:0a43c152ed0666dc837009bae031b898ced95e5b</id>
<content type='text'>
This simplification allows the use of the standard kernel pattern of
static inline dummy functions for debugfs code. Most systems will only
have a small number of snd_soc_components so the memory impact is
minimal.

Signed-off-by: Simon Trimmer &lt;simont@opensource.cirrus.com&gt;
Suggested-by: Mark Brown &lt;broonie@kernel.org&gt;
Link: https://lore.kernel.org/r/20210930142116.528878-1-simont@opensource.cirrus.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>ASoC: compress/component: Use module_get_when_open/put_when_close for cstream</title>
<updated>2021-09-20T12:30:18+00:00</updated>
<author>
<name>Peter Ujfalusi</name>
<email>peter.ujfalusi@linux.intel.com</email>
</author>
<published>2021-09-01T09:52:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=cd46f3824480740879d2c15d65c6e6b038f96021'/>
<id>urn:sha1:cd46f3824480740879d2c15d65c6e6b038f96021</id>
<content type='text'>
Currently the try_module_get() and module_put() is not possible for
compressed streams if the module_get_upon_open is set to 1 which means that\
the components are not protected in a same way as components when normal
audio is used.

SOF is setting module_get_upon_open to 1 for component drivers which works
correctly for audio stream but when compressed stream is used then the
module is not protected.

Convert the compress open and free operation to mimic the steps of it's
pcm counterpart to fix this issue.

Signed-off-by: Peter Ujfalusi &lt;peter.ujfalusi@linux.intel.com&gt;
Link: https://lore.kernel.org/r/20210901095255.3617-3-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>ASoC: soc-component: Convert the mark_module to void*</title>
<updated>2021-09-20T12:30:17+00:00</updated>
<author>
<name>Peter Ujfalusi</name>
<email>peter.ujfalusi@linux.intel.com</email>
</author>
<published>2021-09-01T09:52:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a739fdc26211952edb34bf1ac9ed7afe220a5d54'/>
<id>urn:sha1:a739fdc26211952edb34bf1ac9ed7afe220a5d54</id>
<content type='text'>
The mark_module of the snd_soc_component is strict snd_pcm_substream type
which prevents it to be used by compressed streams.

Change the type to void* along with the snd_soc_component_module_get()
and snd_soc_component_module_put() to allow the same mark to be used by
compressed when it's module_get_upon_open is set to 1.

Signed-off-by: Peter Ujfalusi &lt;peter.ujfalusi@linux.intel.com&gt;
Link: https://lore.kernel.org/r/20210901095255.3617-2-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
</feed>
