<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/sound/soc/sof/sof-audio.c, branch linux-6.2.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.2.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.2.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2023-01-20T14:09:56Z</updated>
<entry>
<title>ASoC: SOF: sof-audio: prepare_widgets: Check swidget for NULL on sink failure</title>
<updated>2023-01-20T14:09:56Z</updated>
<author>
<name>Peter Ujfalusi</name>
<email>peter.ujfalusi@linux.intel.com</email>
</author>
<published>2023-01-20T10:21:25Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=fb4293600cc651cfe4d48ec489f1d175adf6e2f8'/>
<id>urn:sha1:fb4293600cc651cfe4d48ec489f1d175adf6e2f8</id>
<content type='text'>
If the swidget is NULL we skip the preparing of the widget and jump to
handle the sink path of the widget.
If the prepare fails in this case we would undo the prepare but the swidget
is NULL (we skipped the prepare for the widget).

To avoid NULL pointer dereference in this case we must check swidget
against NULL pointer once again.

Fixes: 0ad84b11f2f8 ("ASoC: SOF: sof-audio: skip prepare/unprepare if swidget is NULL")
Reported-by: kernel test robot &lt;lkp@intel.com&gt;
Reported-by: Dan Carpenter &lt;error27@gmail.com&gt;
Signed-off-by: Peter Ujfalusi &lt;peter.ujfalusi@linux.intel.com&gt;
Reviewed-by: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.com&gt;
Link: https://lore.kernel.org/r/20230120102125.30653-1-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>ASoC: SOF: sof-audio: Fixes for widget prepare and</title>
<updated>2023-01-18T15:28:17Z</updated>
<author>
<name>Mark Brown</name>
<email>broonie@kernel.org</email>
</author>
<published>2023-01-18T15:28:17Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=c1619ea22d9509cfbcf5c2c1cc65563179e9dc8e'/>
<id>urn:sha1:c1619ea22d9509cfbcf5c2c1cc65563179e9dc8e</id>
<content type='text'>
Merge series from Peter Ujfalusi &lt;peter.ujfalusi@linux.intel.com&gt;:

This series contains one fix (first patch) followed by a nice to have safety
belts in case we get a widget from topology which is not handled by SOF and will
not have corresponding swidget associated with.
</content>
</entry>
<entry>
<title>ASoC: SOF: keep prepare/unprepare widgets in sink path</title>
<updated>2023-01-18T12:08:32Z</updated>
<author>
<name>Bard Liao</name>
<email>yung-chuan.liao@linux.intel.com</email>
</author>
<published>2023-01-18T10:12:55Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=cc755b4377b0520d594ae573497cf0824baea648'/>
<id>urn:sha1:cc755b4377b0520d594ae573497cf0824baea648</id>
<content type='text'>
The existing code return when a widget doesn't need to
prepare/unprepare. This will prevent widgets in the sink path from being
prepared/unprepared.

Cc: &lt;stable@vger.kernel.org&gt; # 6.1
Link: https://github.com/thesofproject/linux/issues/4021
Signed-off-by: Bard Liao &lt;yung-chuan.liao@linux.intel.com&gt;
Reviewed-by: Ranjani Sridharan &lt;ranjani.sridharan@linux.intel.com&gt;
Reviewed-by: Pierre-Louis Bossart &lt;pierre-louis.bossart@linux.intel.com&gt;
Reviewed-by: Rander Wang &lt;rander.wang@intel.com&gt;
Signed-off-by: Peter Ujfalusi &lt;peter.ujfalusi@linux.intel.com&gt;
Link: https://lore.kernel.org/r/20230118101255.29139-4-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>ASoC: SOF: sof-audio: skip prepare/unprepare if swidget is NULL</title>
<updated>2023-01-18T12:08:32Z</updated>
<author>
<name>Ranjani Sridharan</name>
<email>ranjani.sridharan@linux.intel.com</email>
</author>
<published>2023-01-18T10:12:54Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=0ad84b11f2f8dd19d62d0b2ffd95ece897e6c3dc'/>
<id>urn:sha1:0ad84b11f2f8dd19d62d0b2ffd95ece897e6c3dc</id>
<content type='text'>
Skip preparing/unpreparing widgets if the swidget pointer is NULL. This
will be true in the case of virtual widgets in topology that were added
for reusing the legacy HDA machine driver with SOF.

Fixes: 9862dcf70245 ("ASoC: SOF: don't unprepare widget used other pipelines")
Cc: &lt;stable@vger.kernel.org&gt; # 6.1
Signed-off-by: Ranjani Sridharan &lt;ranjani.sridharan@linux.intel.com&gt;
Signed-off-by: Peter Ujfalusi &lt;peter.ujfalusi@linux.intel.com&gt;
Reviewed-by: Rander Wang &lt;rander.wang@intel.com&gt;
Reviewed-by: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.com&gt;
Tested-by: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.com&gt;
Signed-off-by: Peter Ujfalusi &lt;peter.ujfalusi@linux.intel.com&gt;
Link: https://lore.kernel.org/r/20230118101255.29139-3-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>ASoC: SOF: sof-audio: unprepare when swidget-&gt;use_count &gt; 0</title>
<updated>2023-01-18T12:08:31Z</updated>
<author>
<name>Bard Liao</name>
<email>yung-chuan.liao@linux.intel.com</email>
</author>
<published>2023-01-18T10:12:53Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=7d2a67e02549c4b1feaac4d8b4151bf46424a047'/>
<id>urn:sha1:7d2a67e02549c4b1feaac4d8b4151bf46424a047</id>
<content type='text'>
We should unprepare the widget if its use_count = 1.

Fixes: 9862dcf70245 ("ASoC: SOF: don't unprepare widget used other pipelines")
Cc: &lt;stable@vger.kernel.org&gt; # 6.1
Signed-off-by: Bard Liao &lt;yung-chuan.liao@linux.intel.com&gt;
Reviewed-by: Ranjani Sridharan &lt;ranjani.sridharan@linux.intel.com&gt;
Reviewed-by: Pierre-Louis Bossart &lt;pierre-louis.bossart@linux.intel.com&gt;
Reviewed-by: Rander Wang &lt;rander.wang@intel.com&gt;
Signed-off-by: Peter Ujfalusi &lt;peter.ujfalusi@linux.intel.com&gt;
Link: https://lore.kernel.org/r/20230118101255.29139-2-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>ASoC: SOF: sof-audio: start with the right widget type</title>
<updated>2023-01-17T15:17:30Z</updated>
<author>
<name>Bard Liao</name>
<email>yung-chuan.liao@linux.intel.com</email>
</author>
<published>2023-01-17T12:35:34Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=fcc4348adafe53928fda46d104c1798e5a4de4ff'/>
<id>urn:sha1:fcc4348adafe53928fda46d104c1798e5a4de4ff</id>
<content type='text'>
If there is a connection between a playback stream and a capture stream,
all widgets that are connected to the playback stream and the capture
stream will be in the list.
So, we have to start with the exactly right widget type.
snd_soc_dapm_aif_out is for capture stream and a playback stream should
start with a snd_soc_dapm_aif_in widget.
Contrarily, snd_soc_dapm_dai_in is for playback stream, and a capture
stream should start with a snd_soc_dapm_dai_out widget.

Signed-off-by: Bard Liao &lt;yung-chuan.liao@linux.intel.com&gt;
Reviewed-by: Ranjani Sridharan &lt;ranjani.sridharan@linux.intel.com&gt;
Reviewed-by: Kai Vehmanen &lt;kai.vehmanen@linux.intel.com&gt;
Reviewed-by: Péter Ujfalusi &lt;peter.ujfalusi@linux.intel.com&gt;
Reviewed-by: Pierre-Louis Bossart &lt;pierre-louis.bossart@linux.intel.com&gt;
Signed-off-by: Peter Ujfalusi &lt;peter.ujfalusi@linux.intel.com&gt;
Link: https://lore.kernel.org/r/20230117123534.2075-1-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>ASoC: SOF: introduce new DEBUG_NOCODEC mode</title>
<updated>2022-10-28T12:05:01Z</updated>
<author>
<name>Pierre-Louis Bossart</name>
<email>pierre-louis.bossart@linux.intel.com</email>
</author>
<published>2022-10-27T19:35:40Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=4bd1adb85a09c249ddb4610e8412bf0f4484a371'/>
<id>urn:sha1:4bd1adb85a09c249ddb4610e8412bf0f4484a371</id>
<content type='text'>
The existing NOCODEC mode enforces a build-time mutual exclusion with
the HDaudio link support, mostly to avoid any dependency on the
snd_hdac library and references to HDAudio codec/i915 stuff.

This is very useful to track dependencies and test a minimal
configuration, but very painful for developers and CI: a recompilation
and reinstall of the kernel modules is required.

This patch suggests an alternate middle ground where the selection of
the machine driver and all codec-related actions are bypassed at
run-time, contingent on a kernel module parameter being set.

For example setting BIT(10) with
'options snd_sof sof_debug=0x401'
is enough to switch from an HDaudio card to a nocodec one.

This new DEBUG_NOCODEC mode is not suitable for distributions and
end-users. It's not even recommended on all platforms, i.e. the
NOCODEC mode is known not to work on specific devices where the BIOS
did not configure support for I2S/DMIC interfaces. The usual
development devices such as Chromebooks, Up boards and Intel RVP are
the only recommended platforms where this mode can be supported.

Note that the dynamic switch between HDaudio and nocodec may not
always possible depending on hardware layout, pin-mux options, and
BIOS settings. The audio subsustems on Intel platforms has to support
4 types of interfaces and pin-mux can be complicated.

Reviewers might ask: why didn't we do this earlier? The main reason is
that all the codec-related configurations were not cleanly separated
out in the sof/intel directory. With all the cleanups done recently,
adding this opt-in behavior is relatively straightforward.

Tested on UpExtreme (WHL) and UpExtreme i11 (TGL).

Signed-off-by: Pierre-Louis Bossart &lt;pierre-louis.bossart@linux.intel.com&gt;
Reviewed-by: Rander Wang &lt;rander.wang@intel.com&gt;
Reviewed-by: Bard Liao &lt;yung-chuan.liao@linux.intel.com&gt;
Reviewed-by: Péter Ujfalusi &lt;peter.ujfalusi@linux.intel.com&gt;
Reviewed-by: Ranjani Sridharan &lt;ranjani.sridharan@linux.intel.com&gt;
Link: https://lore.kernel.org/r/20221027193540.259520-22-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>ASoC: SOF: don't unprepare widget used other pipelines</title>
<updated>2022-09-20T18:07:34Z</updated>
<author>
<name>Rander Wang</name>
<email>rander.wang@intel.com</email>
</author>
<published>2022-09-20T15:01:07Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=9862dcf70245c2d03764012b81966d8c2ea95a48'/>
<id>urn:sha1:9862dcf70245c2d03764012b81966d8c2ea95a48</id>
<content type='text'>
If multiple pipeline are mixed into one, we can't unprepare
the widget used by other pipelines. This patch checks use_count
to address this case.

Reviewed-by: Bard Liao &lt;yung-chuan.liao@linux.intel.com&gt;
Reviewed-by: Ranjani Sridharan &lt;ranjani.sridharan@linux.intel.com&gt;
Signed-off-by: Rander Wang &lt;rander.wang@intel.com&gt;
Signed-off-by: Pierre-Louis Bossart &lt;pierre-louis.bossart@linux.intel.com&gt;
Link: https://lore.kernel.org/r/20220920150107.2090695-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>ASoC: SOF: clear prepare state when widget is unprepared</title>
<updated>2022-09-20T18:07:33Z</updated>
<author>
<name>Rander Wang</name>
<email>rander.wang@intel.com</email>
</author>
<published>2022-09-20T15:01:06Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=ce59804d26432d7e2c1a8c906245a230a2b4505c'/>
<id>urn:sha1:ce59804d26432d7e2c1a8c906245a230a2b4505c</id>
<content type='text'>
Playback can't work after the first try sometimes. The reason is that
some widgets don't have ipc_unprepare ops and driver will jump
to sink_prepare so miss to set prepare state to false. Next
time these widgets will not be prepared and it will result to
error with different format of audio file since the last setting
is not applicable.

This patch makes sure that widget prepare state will be cleared
to false when it is unprepared.

Reviewed-by: Bard Liao &lt;yung-chuan.liao@linux.intel.com&gt;
Reviewed-by: Ranjani Sridharan &lt;ranjani.sridharan@linux.intel.com&gt;
Signed-off-by: Rander Wang &lt;rander.wang@intel.com&gt;
Signed-off-by: Pierre-Louis Bossart &lt;pierre-louis.bossart@linux.intel.com&gt;
Link: https://lore.kernel.org/r/20220920150107.2090695-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>ASoC: SOF: add widget setup/free tracing</title>
<updated>2022-09-19T14:44:03Z</updated>
<author>
<name>Bard Liao</name>
<email>yung-chuan.liao@linux.intel.com</email>
</author>
<published>2022-09-19T12:21:02Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=fa6e73d69193d0ba3b794f7c303beae498732f40'/>
<id>urn:sha1:fa6e73d69193d0ba3b794f7c303beae498732f40</id>
<content type='text'>
Enables tracking of use_count during widget setup and free routines.
Useful for debugging unbalanced use_counts during suspend/resume.

Reviewed-by: Péter Ujfalusi &lt;peter.ujfalusi@linux.intel.com&gt;
Signed-off-by: Noah Klayman &lt;noah.klayman@intel.com&gt;
Signed-off-by: Bard Liao &lt;yung-chuan.liao@linux.intel.com&gt;
Signed-off-by: Pierre-Louis Bossart &lt;pierre-louis.bossart@linux.intel.com&gt;
Link: https://lore.kernel.org/r/20220919122108.43764-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
</feed>
