<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/include/sound/soc.h, branch linux-4.19.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.19.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.19.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2022-01-27T08:04:31Z</updated>
<entry>
<title>ASoC: dpcm: prevent snd_soc_dpcm use after free</title>
<updated>2022-01-27T08:04:31Z</updated>
<author>
<name>KaiChieh Chuang</name>
</author>
<published>2019-03-08T05:05:53Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=71dc356a363a3fca914ea4b35af0668d6c83b9b2'/>
<id>urn:sha1:71dc356a363a3fca914ea4b35af0668d6c83b9b2</id>
<content type='text'>
commit a9764869779081e8bf24da07ac040e8f3efcf13a upstream.

The dpcm get from fe_clients/be_clients
may be free before use

Add a spin lock at snd_soc_card level,
to protect the dpcm instance.
The lock may be used in atomic context, so use spin lock.

Use irq spin lock version,
since the lock may be used in interrupts.

possible race condition between
void dpcm_be_disconnect(
	...
	list_del(&amp;dpcm-&gt;list_be);
	list_del(&amp;dpcm-&gt;list_fe);
	kfree(dpcm);
	...

and
	for_each_dpcm_fe()
	for_each_dpcm_be*()

race condition example
Thread 1:
    snd_soc_dapm_mixer_update_power()
        -&gt; soc_dpcm_runtime_update()
            -&gt; dpcm_be_disconnect()
                -&gt; kfree(dpcm);
Thread 2:
    dpcm_fe_dai_trigger()
        -&gt; dpcm_be_dai_trigger()
            -&gt; snd_soc_dpcm_can_be_free_stop()
                -&gt; if (dpcm-&gt;fe == fe)

Excpetion Scenario:
	two FE link to same BE
	FE1 -&gt; BE
	FE2 -&gt;

	Thread 1: switch of mixer between FE2 -&gt; BE
	Thread 2: pcm_stop FE1

Exception:

Unable to handle kernel paging request at virtual address dead0000000000e0

pc=&lt;&gt; [&lt;ffffff8960e2cd10&gt;] dpcm_be_dai_trigger+0x29c/0x47c
	sound/soc/soc-pcm.c:3226
		if (dpcm-&gt;fe == fe)
lr=&lt;&gt; [&lt;ffffff8960e2f694&gt;] dpcm_fe_dai_do_trigger+0x94/0x26c

Backtrace:
[&lt;ffffff89602dba80&gt;] notify_die+0x68/0xb8
[&lt;ffffff896028c7dc&gt;] die+0x118/0x2a8
[&lt;ffffff89602a2f84&gt;] __do_kernel_fault+0x13c/0x14c
[&lt;ffffff89602a27f4&gt;] do_translation_fault+0x64/0xa0
[&lt;ffffff8960280cf8&gt;] do_mem_abort+0x4c/0xd0
[&lt;ffffff8960282ad0&gt;] el1_da+0x24/0x40
[&lt;ffffff8960e2cd10&gt;] dpcm_be_dai_trigger+0x29c/0x47c
[&lt;ffffff8960e2f694&gt;] dpcm_fe_dai_do_trigger+0x94/0x26c
[&lt;ffffff8960e2edec&gt;] dpcm_fe_dai_trigger+0x3c/0x44
[&lt;ffffff8960de5588&gt;] snd_pcm_do_stop+0x50/0x5c
[&lt;ffffff8960dded24&gt;] snd_pcm_action+0xb4/0x13c
[&lt;ffffff8960ddfdb4&gt;] snd_pcm_drop+0xa0/0x128
[&lt;ffffff8960de69bc&gt;] snd_pcm_common_ioctl+0x9d8/0x30f0
[&lt;ffffff8960de1cac&gt;] snd_pcm_ioctl_compat+0x29c/0x2f14
[&lt;ffffff89604c9d60&gt;] compat_SyS_ioctl+0x128/0x244
[&lt;ffffff8960283740&gt;] el0_svc_naked+0x34/0x38
[&lt;ffffffffffffffff&gt;] 0xffffffffffffffff

Signed-off-by: KaiChieh Chuang &lt;kaichieh.chuang@mediatek.com&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
[willmcvicker: move spinlock to bottom of struct snd_soc_card]
Signed-off-by: Will McVicker &lt;willmcvicker@google.com&gt;
Cc: stable@vger.kernel.org # 4.19+
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>ASoC: wm97xx: fix uninitialized regmap pointer problem</title>
<updated>2020-01-27T13:50:01Z</updated>
<author>
<name>Arnd Bergmann</name>
</author>
<published>2018-11-02T15:18:21Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e82db5bec17e6baa0a3594bab5c24decc02f0aa0'/>
<id>urn:sha1:e82db5bec17e6baa0a3594bab5c24decc02f0aa0</id>
<content type='text'>
[ Upstream commit 576ce4075bfa0f03e0e91a89eecc539b3b828b08 ]

gcc notices that without either the ac97 bus or the pdata, we never
initialize the regmap pointer, which leads to an uninitialized variable
access:

sound/soc/codecs/wm9712.c: In function 'wm9712_soc_probe':
sound/soc/codecs/wm9712.c:666:2: error: 'regmap' may be used uninitialized in this function [-Werror=maybe-uninitialized]

Since that configuration is invalid, it's better to return an error
here. I tried to avoid adding complexity to the conditions, and turned
the #ifdef into a regular if(IS_ENABLED()) check for readability.
This in turn requires moving some header file declarations out of
an #ifdef.

The same code is used in three drivers, all of which I'm changing
the same way.

Fixes: 2ed1a8e0ce8d ("ASoC: wm9712: add ac97 new bus support")
Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>ASoC: core: remove support for card rebind using component framework</title>
<updated>2018-08-02T16:19:46Z</updated>
<author>
<name>Srinivas Kandagatla</name>
</author>
<published>2018-08-02T15:03:38Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=611cbc8799b672f41b6ba7afed758ad9efb959a7'/>
<id>urn:sha1:611cbc8799b672f41b6ba7afed758ad9efb959a7</id>
<content type='text'>
DRM based audio components get registered inside the component framework
bind callback. However component framework has a big mutex lock taken for
every call to component_add, component_del and bind, unbind callbacks.

This can lead to deadlock situation if we are trying to add new/remove
component within a bind/unbind callbacks. Which is what was happening
with bcm2837 rpi 3.

Revert this change till we sort out the mutex issue.

Reported-by: Guillaume Tucker &lt;guillaume.tucker@collabora.com&gt;
Reported-by: Stefan Wahren &lt;stefan.wahren@i2se.com&gt;
Signed-off-by: Srinivas Kandagatla &lt;srinivas.kandagatla@linaro.org&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>ASoC: export snd_soc_of_get_slot_mask</title>
<updated>2018-07-20T16:39:26Z</updated>
<author>
<name>Jerome Brunet</name>
</author>
<published>2018-07-17T15:43:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=cbdfab3b675f4c34258b0ec9e4707de44e1f6989'/>
<id>urn:sha1:cbdfab3b675f4c34258b0ec9e4707de44e1f6989</id>
<content type='text'>
Amlogic's axg card driver can't use snd_soc_of_parse_tdm_slot()
directly because it needs to handle 4 mask for each direction.
Yet the parsing of each mask is the same, so export
snd_soc_of_get_slot_mask() to reuse the the existing code.

Signed-off-by: Jerome Brunet &lt;jbrunet@baylibre.com&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>ASoC: core: add support to card re-bind using component framework</title>
<updated>2018-07-18T12:08:15Z</updated>
<author>
<name>Srinivas Kandagatla</name>
</author>
<published>2018-07-13T15:36:28Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=bb4b894addb09a069c072a0a032f644cc470d17f'/>
<id>urn:sha1:bb4b894addb09a069c072a0a032f644cc470d17f</id>
<content type='text'>
This patch aims at achieving dynamic behaviour of audio card when
the dependent components disappear and reappear.

With this patch the card is removed if any of the dependent component
is removed and card is added back if the dependent component comes back.
All this is done using component framework and matching based on
component name.

Signed-off-by: Srinivas Kandagatla &lt;srinivas.kandagatla@linaro.org&gt;
Reviewed-by: Vinod Koul &lt;vkoul@kernel.org&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>ASoC: dpcm: add rate merge to the BE stream merge</title>
<updated>2018-07-11T10:58:41Z</updated>
<author>
<name>Jerome Brunet</name>
</author>
<published>2018-07-05T10:13:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=baacd8d100d571aa713c3c60b1471b9962e6ec8a'/>
<id>urn:sha1:baacd8d100d571aa713c3c60b1471b9962e6ec8a</id>
<content type='text'>
As done for format and channels, add the possibility to merge
the backend rates on the frontend rates.

This useful if the backend does not support all rates supported by the
frontend, or if several backends (cpu and codecs) with different
capabilities are connected to the same frontend.

Signed-off-by: Jerome Brunet &lt;jbrunet@baylibre.com&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>ASoC: core: Allow topology to override machine driver FE DAI link config.</title>
<updated>2018-07-03T15:38:29Z</updated>
<author>
<name>Liam Girdwood</name>
</author>
<published>2018-07-02T15:59:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a655de808cbde6c58b3298e704d786b53f59fb5d'/>
<id>urn:sha1:a655de808cbde6c58b3298e704d786b53f59fb5d</id>
<content type='text'>
Machine drivers statically define a number of DAI links that currently
cannot be changed or removed by topology. This means PCMs and platform
components cannot be changed by topology at runtime AND machine drivers
are tightly coupled to topology.

This patch allows topology to override the machine driver DAI link config
in order to reuse machine drivers with different topologies and platform
components. The patch supports :-

1) create new FE PCMs with a topology defined PCM ID.
2) destroy existing static FE PCMs
3) change the platform component driver.
4) assign any new HW params fixups.
5) assign a new card name prefix to differentiate this topology to userspace.

The patch requires no changes to the machine drivers, but does add some
platform component flags that the platform component driver can assign
before loading topologies.

Signed-off-by: Liam Girdwood &lt;liam.r.girdwood@linux.intel.com&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>ASoC: soc-core: convert to SPDX identifiers</title>
<updated>2018-07-02T09:55:32Z</updated>
<author>
<name>Kuninori Morimoto</name>
</author>
<published>2018-07-02T06:24:18Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=873486ed4af3e11bfc20832dff7b124ba652bf77'/>
<id>urn:sha1:873486ed4af3e11bfc20832dff7b124ba652bf77</id>
<content type='text'>
Signed-off-by: Kuninori Morimoto &lt;kuninori.morimoto.gx@renesas.com&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>ASoC: soc-pcm: DPCM cares BE channel constraint</title>
<updated>2018-06-22T14:57:03Z</updated>
<author>
<name>Jiada Wang</name>
</author>
<published>2018-06-20T09:25:20Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f4c277b817cc9489fffabffb4e15d2f3b686056c'/>
<id>urn:sha1:f4c277b817cc9489fffabffb4e15d2f3b686056c</id>
<content type='text'>
Current DPCM is caring only FE channel configuration. Sometimes
it will be trouble if user selects channel which isn't supported
by BE.

This patch adds new .dpcm_merged_chan on struct snd_soc_dai_link.
DPCM will use FE / BE merged channel if struct snd_soc_dai_link
has it.

Signed-off-by: Jiada Wang &lt;jiada_wang@mentor.com&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>ASoC: fix 0-day warnings with snd_soc_new_compress()</title>
<updated>2018-05-30T10:35:07Z</updated>
<author>
<name>Pierre-Louis Bossart</name>
</author>
<published>2018-05-29T23:30:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0b014d72ebae14c0c6ab3fb36a442fda91e1a1b3'/>
<id>urn:sha1:0b014d72ebae14c0c6ab3fb36a442fda91e1a1b3</id>
<content type='text'>
All conditionally-defined routines in include/sound/soc.h expose a
static inline fallback to avoid 0-day warnings and compilation issues,
except snd_soc_new_compress().

Fixes: 5db6aab6f36f ('ASoC: topology: Add support for compressed PCMs')
Signed-off-by: Pierre-Louis Bossart &lt;pierre-louis.bossart@linux.intel.com&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
</feed>
