<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/include/sound/soc-component.h, branch linux-5.16.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.16.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.16.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2021-10-18T12:56:37Z</updated>
<entry>
<title>ASoC: soc-component: add snd_soc_component_is_codec()</title>
<updated>2021-10-18T12:56:37Z</updated>
<author>
<name>Kuninori Morimoto</name>
</author>
<published>2021-10-18T02:05:24Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.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:58Z</updated>
<author>
<name>Simon Trimmer</name>
</author>
<published>2021-09-30T14:21:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.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:18Z</updated>
<author>
<name>Peter Ujfalusi</name>
</author>
<published>2021-09-01T09:52:55Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.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:17Z</updated>
<author>
<name>Peter Ujfalusi</name>
</author>
<published>2021-09-01T09:52:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.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>
<entry>
<title>ASoC: soc-utils: add snd_soc_component_is_dummy()</title>
<updated>2021-04-16T13:34:12Z</updated>
<author>
<name>Kuninori Morimoto</name>
</author>
<published>2021-04-16T02:00:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8f1a16818a08047c83bc6e29efc07b15fd11fa29'/>
<id>urn:sha1:8f1a16818a08047c83bc6e29efc07b15fd11fa29</id>
<content type='text'>
There is snd_soc_dai_is_dummy(), but not for component.
This patch adds it.

Signed-off-by: Kuninori Morimoto &lt;kuninori.morimoto.gx@renesas.com&gt;
Link: https://lore.kernel.org/r/87zgxzxa2t.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_pcm_component_ack</title>
<updated>2021-03-25T13:58:06Z</updated>
<author>
<name>Shengjiu Wang</name>
</author>
<published>2021-03-12T02:38:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8bdfc0455e3a59e2c1207a56be22e910fae0e0d5'/>
<id>urn:sha1:8bdfc0455e3a59e2c1207a56be22e910fae0e0d5</id>
<content type='text'>
Add snd_soc_pcm_component_ack back, which can be used to get an
updated buffer pointer in the platform driver.
On Asymmetric multiprocessor, this pointer can be sent to Cortex-M
core for audio processing.

Signed-off-by: Shengjiu Wang &lt;shengjiu.wang@nxp.com&gt;
Link: https://lore.kernel.org/r/1615516725-4975-2-git-send-email-shengjiu.wang@nxp.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>ASoC: constify of_phandle_args in snd_soc_get_dai_name()</title>
<updated>2021-03-10T13:07:14Z</updated>
<author>
<name>Krzysztof Kozlowski</name>
</author>
<published>2021-02-21T15:30:24Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=933f98be60a7b9c287acb081fb5d6659dd5e0441'/>
<id>urn:sha1:933f98be60a7b9c287acb081fb5d6659dd5e0441</id>
<content type='text'>
The pointer to of_phandle_args passed to snd_soc_get_dai_name() and
of_xlate_dai_name() implementations is not modified.  Since it is being
used only to translate passed OF node to a DAI name, it should not be
modified, so mark it as const for correctness and safer code.

Signed-off-by: Krzysztof Kozlowski &lt;krzk@kernel.org&gt;
Link: https://lore.kernel.org/r/20210221153024.453583-1-krzk@kernel.org
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>ASoC: soc-component: add snd_soc_component_read/write_field()</title>
<updated>2021-01-27T13:06:51Z</updated>
<author>
<name>Srinivas Kandagatla</name>
</author>
<published>2021-01-26T17:17:48Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1da0b9899abdbc7103d3ec6b1a888efda41dbb59'/>
<id>urn:sha1:1da0b9899abdbc7103d3ec6b1a888efda41dbb59</id>
<content type='text'>
It's often the case that we would write or read a particular field
in register. With the current soc_component apis, reading a particular
field in register would involve first read the register and then
perform shift operations.

Ex:
to read from a field mask of 0xf0

	val = snd_soc_component_read(component, reg);
	field = ((val &amp; 0xf0) &gt;&gt; 0x4);

This is sometimes prone to errors and code become less readable!

With this new api we could just do
	field = snd_soc_component_read_field(component, reg, 0xf0);

this makes it bit simple, easy to write and less error prone!

This also applies to writing!

There are various places in kernel which provides such field interfaces
however soc_component seems to be missing this.

This patch is inspired by FIELD_GET/FIELD_PREP macros in include/linux/bitfield.h

Signed-off-by: Srinivas Kandagatla &lt;srinivas.kandagatla@linaro.org&gt;
Link: https://lore.kernel.org/r/20210126171749.1863-1-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>ASoC: soc-pcm: care trigger rollback</title>
<updated>2020-12-09T12:13:38Z</updated>
<author>
<name>Kuninori Morimoto</name>
</author>
<published>2020-11-30T23:51:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6374f493d93b2232444b94989c380d5aada5b810'/>
<id>urn:sha1:6374f493d93b2232444b94989c380d5aada5b810</id>
<content type='text'>
soc_pcm_trigger() calls DAI/Component/Link trigger,
but some of them might be failed.

	static int soc_pcm_trigger(...)
	{
		...
		switch (cmd) {
		case SNDRV_PCM_TRIGGER_START:
		case SNDRV_PCM_TRIGGER_RESUME:
		case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
			ret = snd_soc_link_trigger(substream, cmd);
			if (ret &lt; 0)
				break;

(*)			ret = snd_soc_pcm_component_trigger(substream, cmd);
			if (ret &lt; 0)
				break;

			ret = snd_soc_pcm_dai_trigger(substream, cmd);
			break;
		case SNDRV_PCM_TRIGGER_STOP:
		case SNDRV_PCM_TRIGGER_SUSPEND:
		case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
			ret = snd_soc_pcm_dai_trigger(substream, cmd);
			if (ret &lt; 0)
				break;

			ret = snd_soc_pcm_component_trigger(substream, cmd);
			if (ret &lt; 0)
				break;

			ret = snd_soc_link_trigger(substream, cmd);
			break;
		}
		...
	}

For example, if soc_pcm_trigger() failed at (*) point,
we need to rollback previous succeeded trigger.

This patch adds trigger mark for DAI/Component/Link,
and do STOP if START/RESUME/PAUSE_RELEASE were failed.

Because it need to use new rollback parameter,
we need to modify DAI/Component/Link trigger functions in the same time.

Signed-off-by: Kuninori Morimoto &lt;kuninori.morimoto.gx@renesas.com&gt;
Link: https://lore.kernel.org/r/87a6uycssd.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>ASoC: soc-component: add mark for snd_soc_component_compr_open/free()</title>
<updated>2020-11-26T13:09:35Z</updated>
<author>
<name>Kuninori Morimoto</name>
</author>
<published>2020-11-18T23:50:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f94ba9ac20fab9af08240fde3741edf73655411d'/>
<id>urn:sha1:f94ba9ac20fab9af08240fde3741edf73655411d</id>
<content type='text'>
soc_compr_open() does rollback when failed (A),
but, it is almost same as soc_compr_free().

	static int soc_compr_open(xxx)
	{
		...
		if (ret &lt; 0)
			goto xxx_err;
		...
		return 0;

 ^	machine_err:
 |		...
 |	out:
(A)		...
 |	pm_err:
 |		...
 v		return ret;
	}

The difference is
soc_compr_free()  is for all dai/component/substream,
rollback          is for succeeded part only.

This kind of duplicated code can be a hotbed of bugs,
thus, we want to share soc_compr_free() and rollback.
	1) snd_soc_dai_compr_startup/shutdown()
=&gt;	2) snd_soc_component_compr_open/free()
	3) snd_soc_link_compr_startup/shutdown()

This patch is for 2) snd_soc_component_compr_open/free(),
and adds new cstream mark.
It will mark cstream when startup() was suceeded.
If rollback happen *after* that, it will check rollback flag
and marked cstream.

It cares *previous* startup() only now,
but we might want to check *whole* marked cstream in the future.
This patch is using macro so that it can be easily adjust to it.

Signed-off-by: Kuninori Morimoto &lt;kuninori.morimoto.gx@renesas.com&gt;
Link: https://lore.kernel.org/r/87lfey5iwk.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
</feed>
