<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/sound/soc/codecs/rt711.c, branch master</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=master</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2025-11-17T00:16:10Z</updated>
<entry>
<title>ASoC: codecs: rt711: convert to snd_soc_dapm_xxx()</title>
<updated>2025-11-17T00:16:10Z</updated>
<author>
<name>Kuninori Morimoto</name>
</author>
<published>2025-11-11T00:25:49Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6db8ba3439c995a08def399f9eda4e1d2b95afa8'/>
<id>urn:sha1:6db8ba3439c995a08def399f9eda4e1d2b95afa8</id>
<content type='text'>
This patch converts below functions.

dapm-&gt;dev					-&gt; snd_soc_dapm_to_dev()
dapm-&gt;card					-&gt; snd_soc_dapm_to_card()
dapm-&gt;component					-&gt; snd_soc_dapm_to_component()

dapm_kcontrol_get_value()			-&gt; snd_soc_dapm_kcontrol_get_value()

snd_soc_component_enable_pin()			-&gt; snd_soc_dapm_enable_pin()
snd_soc_component_enable_pin_unlocked()		-&gt; snd_soc_dapm_enable_pin_unlocked()
snd_soc_component_disable_pin()			-&gt; snd_soc_dapm_disable_pin()
snd_soc_component_disable_pin_unlocked()	-&gt; snd_soc_dapm_disable_pin_unlocked()
snd_soc_component_nc_pin()			-&gt; snd_soc_dapm_nc_pin()
snd_soc_component_nc_pin_unlocked()		-&gt; snd_soc_dapm_nc_pin_unlocked()
snd_soc_component_get_pin_status()		-&gt; snd_soc_dapm_get_pin_status()
snd_soc_component_force_enable_pin()		-&gt; snd_soc_dapm_force_enable_pin()
snd_soc_component_force_enable_pin_unlocked()	-&gt; snd_soc_dapm_force_enable_pin_unlocked()
snd_soc_component_force_bias_level()		-&gt; snd_soc_dapm_force_bias_level()
snd_soc_component_get_bias_level()		-&gt; snd_soc_dapm_get_bias_level()
snd_soc_component_init_bias_level()		-&gt; snd_soc_dapm_init_bias_level()
snd_soc_component_get_dapm()			-&gt; snd_soc_component_to_dapm()

snd_soc_dapm_kcontrol_component()		-&gt; snd_soc_dapm_kcontrol_to_component()
snd_soc_dapm_kcontrol_widget()			-&gt; snd_soc_dapm_kcontrol_to_widget()
snd_soc_dapm_kcontrol_dapm()			-&gt; snd_soc_dapm_kcontrol_to_dapm()
snd_soc_dapm_np_pin()				-&gt; snd_soc_dapm_disable_pin()

Signed-off-by: Kuninori Morimoto &lt;kuninori.morimoto.gx@renesas.com&gt;
Reviewed-by: Charles Keepax &lt;ckeepax@opensource.cirrus.com&gt;
Link: https://patch.msgid.link/87h5v12z5e.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>ASoC: codecs: Remove redundant pm_runtime_mark_last_busy() calls</title>
<updated>2025-07-04T18:28:19Z</updated>
<author>
<name>Sakari Ailus</name>
</author>
<published>2025-07-04T07:54:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=bbe5e3c433a34e7f7bc762c390abb38205f821c5'/>
<id>urn:sha1:bbe5e3c433a34e7f7bc762c390abb38205f821c5</id>
<content type='text'>
pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(),
pm_runtime_autosuspend() and pm_request_autosuspend() now include a call
to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to
pm_runtime_mark_last_busy().

Signed-off-by: Sakari Ailus &lt;sakari.ailus@linux.intel.com&gt;
Link: https://patch.msgid.link/20250704075456.3222642-1-sakari.ailus@linux.intel.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>ASoC: rt-sdw*: add __func__ to all error logs</title>
<updated>2024-03-28T19:31:12Z</updated>
<author>
<name>Pierre-Louis Bossart</name>
</author>
<published>2024-03-25T22:18:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f892e66fcabc6161cd38c0fc86e769208174b840'/>
<id>urn:sha1:f892e66fcabc6161cd38c0fc86e769208174b840</id>
<content type='text'>
The drivers for Realtek SoundWire codecs use similar logs, which is
problematic to analyze problems reported by CI tools, e.g. "Failed to
get private value: 752001 =&gt; 0000 ret=-5". It's not uncommon to have
several Realtek devices on the same platform, having the same log
thrown makes support difficult.

This patch adds __func__ to all error logs which didn't already
include it.

No functionality change, only error logs are modified.

Signed-off-by: Pierre-Louis Bossart &lt;pierre-louis.bossart@linux.intel.com&gt;
Reviewed-by: Bard Liao &lt;yung-chuan.liao@linux.intel.com&gt;
Link: https://msgid.link/r/20240325221817.206465-7-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>ASoC: rt711: enable pm_runtime in probe, keep status as 'suspended'</title>
<updated>2023-08-07T13:32:22Z</updated>
<author>
<name>Pierre-Louis Bossart</name>
</author>
<published>2023-08-02T15:36:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a8590dd73d9f7fd955ac24a8e210d0721d5c10af'/>
<id>urn:sha1:a8590dd73d9f7fd955ac24a8e210d0721d5c10af</id>
<content type='text'>
In stress cases involving module insertion/removal followed by
playback/capture, it can happen that capture/playback is started
before the codec enumeration completes.

The codec driver registers its components with the ASoC framework
during the probe stage, so there is currently no way for the card
creation to wait for the codec enumeration/initialization to complete.

In addition, when the capture/playback starts, the ASoC framework uses
pm_runtime_get_sync() to properly refcount and power-manage
devices. This is problematic in the SoundWire case because pm_runtime
is enabled during the enumeration/initialization stage, so
pm_runtime_get_sync() will return -EACCESS which is
ignored. Additional errors will happen when setting the pm_runtime
status as 'active' because the parent is not properly resumed,
resulting in an error such as:

"rt711 sdw:0:025d:0711:00: runtime PM trying to activate child device
sdw:0:025d:0711:00 but parent (sdw-master-0) is not active"

This patch suggests enabling pm_runtime during the probe, but marking
the device as 'active' only after it is enumerated. That will force a
dependency between the card and the codec, pm_runtime_get_sync() will
have to wait for the codec device to resume and hence implicitly wait
for the enumeration/initialization to be completed. In the nominal
case where the codec device is already active the get_sync() would
only perform a ref-count increase.

Closes: https://github.com/thesofproject/linux/issues/4328
Signed-off-by: Pierre-Louis Bossart &lt;pierre-louis.bossart@linux.intel.com&gt;
Reviewed-by: Ranjani Sridharan &lt;ranjani.sridharan@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;
Link: https://lore.kernel.org/r/20230802153629.53576-5-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>ASoC: SoundWire codecs: make regmap cache-only in probe</title>
<updated>2023-08-07T13:32:20Z</updated>
<author>
<name>Pierre-Louis Bossart</name>
</author>
<published>2023-08-02T15:36:15Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=49ae74abc76b2d9be4777e7ac833674fa4749071'/>
<id>urn:sha1:49ae74abc76b2d9be4777e7ac833674fa4749071</id>
<content type='text'>
The SoundWire bus may start after the probe where the SoundWire ASoC
components are registered. This creates a time window where the card
can be created and the registers be accessed.

As discussed on the mailing list, we can't really control when codecs
are enumerated and initialized, but we can make sure the access to the
codecs is cached until the hardware is accessible.

This patch configures regcache_cache_only() with a 'true' parameter in
the probe function, and a 'false' parameter in the io_init routine.

The rt5682 is handled through a different patch due to its specific
cache handling.

Link: https://lore.kernel.org/alsa-devel/20230503144102.242240-1-krzysztof.kozlowski@linaro.org/
Signed-off-by: Pierre-Louis Bossart &lt;pierre-louis.bossart@linux.intel.com&gt;
Reviewed-by: Ranjani Sridharan &lt;ranjani.sridharan@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;
Link: https://lore.kernel.org/r/20230802153629.53576-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>ASoC: codecs: rt711-sdw: simplify set_stream</title>
<updated>2023-03-29T14:03:05Z</updated>
<author>
<name>Pierre-Louis Bossart</name>
</author>
<published>2023-03-24T01:44:03Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=fa55b31fb65347ceab617af7541f0a31b53901f1'/>
<id>urn:sha1:fa55b31fb65347ceab617af7541f0a31b53901f1</id>
<content type='text'>
Using a dynamic allocation to store a single pointer is not very
efficient/useful.

Worse, the memory is released in the SoundWire stream.c file, but
still accessed in the DAI shutdown, leading to kmemleak reports.

And last the API requires the previous stream information to be
cleared when the argument is NULL.

Simplify the code to address all 3 problems.

Signed-off-by: Pierre-Louis Bossart &lt;pierre-louis.bossart@linux.intel.com&gt;
Reviewed-by: Péter Ujfalusi &lt;peter.ujfalusi@linux.intel.com&gt;
Reviewed-by: Rander Wang &lt;rander.wang@intel.com&gt;
Signed-off-by: Bard Liao &lt;yung-chuan.liao@linux.intel.com&gt;
Link: https://lore.kernel.org/r/20230324014408.1677505-9-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>ASoC: rt: use helper function</title>
<updated>2023-01-31T11:04:57Z</updated>
<author>
<name>Kuninori Morimoto</name>
</author>
<published>2023-01-31T02:00:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8ec352362848d8cc9500ccfb051810597c0abf8a'/>
<id>urn:sha1:8ec352362848d8cc9500ccfb051810597c0abf8a</id>
<content type='text'>
Current ASoC has many helper function.
This patch use it.

Signed-off-by: Kuninori Morimoto &lt;kuninori.morimoto.gx@renesas.com&gt;
Link: https://lore.kernel.org/r/87zg9zea4w.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>ASoC: rt711: Switch to new snd_sdw_params_to_config helper</title>
<updated>2022-11-28T13:04:30Z</updated>
<author>
<name>Charles Keepax</name>
</author>
<published>2022-11-23T16:54:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=754bef6752259ce5633814a0333f96fa06f6e3e8'/>
<id>urn:sha1:754bef6752259ce5633814a0333f96fa06f6e3e8</id>
<content type='text'>
The conversion from hw_params to SoundWire config is pretty
standard as such most of the conversion can be handled by the new
snd_sdw_params_to_config helper function.

Signed-off-by: Charles Keepax &lt;ckeepax@opensource.cirrus.com&gt;
Link: https://lore.kernel.org/r/20221123165432.594972-7-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>ASoC: codecs: soundwire: call pm_runtime_resume() in component probe</title>
<updated>2022-06-17T17:37:59Z</updated>
<author>
<name>Pierre-Louis Bossart</name>
</author>
<published>2022-06-16T21:08:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=011e397f5c9c96e533d4a244af84e74c9caefb83'/>
<id>urn:sha1:011e397f5c9c96e533d4a244af84e74c9caefb83</id>
<content type='text'>
Make sure that the bus and codecs are pm_runtime active when the card
is registered/created. This avoid timeouts when accessing registers.

BugLink: https://github.com/thesofproject/linux/issues/3651
BugLink: https://github.com/thesofproject/linux/issues/3650
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: Ranjani Sridharan &lt;ranjani.sridharan@linux.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;
Link: https://lore.kernel.org/r/20220616210825.132093-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>ASoC: codecs: rt700/rt711/rt711-sdca: resume bus/codec in .set_jack_detect</title>
<updated>2022-06-07T19:37:32Z</updated>
<author>
<name>Pierre-Louis Bossart</name>
</author>
<published>2022-06-06T20:37:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e02b99e9b79ff272e8c299a3ee53bdb194ca885e'/>
<id>urn:sha1:e02b99e9b79ff272e8c299a3ee53bdb194ca885e</id>
<content type='text'>
The .set_jack_detect() codec component callback is invoked during card
registration, which happens when the machine driver is probed.

The issue is that this callback can race with the bus suspend/resume,
and IO timeouts can happen. This can be reproduced very easily if the
machine driver is 'blacklisted' and manually probed after the bus
suspends. The bus and codec need to be re-initialized using pm_runtime
helpers.

Previous contributions tried to make sure accesses to the bus during
the .set_jack_detect() component callback only happen when the bus is
active. This was done by changing the regcache status on a component
remove. This is however a layering violation, the regcache status
should only be modified on device probe, suspend and resume. The
component probe/remove should not modify how the device regcache is
handled. This solution also didn't handle all the possible race
conditions, and the RT700 headset codec was not handled.

This patch tries to resume the codec device before handling the jack
initializations. In case the codec has not yet been initialized,
pm_runtime may not be enabled yet, so we don't squelch the -EACCES
error code and only stop the jack information. When the codec reports
as attached, the jack initialization will proceed as usual.

BugLink: https://github.com/thesofproject/linux/issues/3643
Fixes: 7ad4d237e7c4a ('ASoC: rt711-sdca: Add RT711 SDCA vendor-specific driver')
Fixes: 899b12542b089 ('ASoC: rt711: add snd_soc_component remove callback')
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;
Link: https://lore.kernel.org/r/20220606203752.144159-8-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
</feed>
