<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/sound/soc/codecs/rt711-sdca.c, branch master</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=master</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2025-11-17T00:16:09Z</updated>
<entry>
<title>ASoC: codecs: rt711-sdca: convert to snd_soc_dapm_xxx()</title>
<updated>2025-11-17T00:16:09Z</updated>
<author>
<name>Kuninori Morimoto</name>
<email>kuninori.morimoto.gx@renesas.com</email>
</author>
<published>2025-11-11T00:25:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=49a22e9811e1524cf4ee6c84e795526104f4fc3c'/>
<id>urn:sha1:49a22e9811e1524cf4ee6c84e795526104f4fc3c</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/87ikfh2z5h.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
<entry>
<title>ASoC: codecs: rt711-sdca: use snd_kcontrol_chip() instead of snd_soc_kcontrol_component()</title>
<updated>2025-10-20T01:43:25Z</updated>
<author>
<name>Kuninori Morimoto</name>
<email>kuninori.morimoto.gx@renesas.com</email>
</author>
<published>2025-10-14T04:24:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d7e1399884a65e868f7b121b8ca5d613cfac6538'/>
<id>urn:sha1:d7e1399884a65e868f7b121b8ca5d613cfac6538</id>
<content type='text'>
We have very similar name functions (A)(B). Both gets component from
snd_kcontrol, but (A) is used in callback functions which is registered
through snd_soc_add_component_controls(), (B) is used through
snd_soc_dapm_new_widgets().

	(A) snd_soc_kcontrol_component()
	(B) snd_soc_dapm_kcontrol_component()

(B) is using very picky way to get component but using it is necessary in
ASoC. But (A) is just wrapper function to snd_kcontrol_chip(), and directly
using it without wrapper is very common way on ALSA.
To reduce confusions of similar function, let's use common way on (A).

Signed-off-by: Kuninori Morimoto &lt;kuninori.morimoto.gx@renesas.com&gt;
Link: https://patch.msgid.link/87zf9up0v3.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>
<email>sakari.ailus@linux.intel.com</email>
</author>
<published>2025-07-04T07:54:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/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: rt711-sdca: add GE selected mode control</title>
<updated>2024-06-25T18:12:44Z</updated>
<author>
<name>Shuming Fan</name>
<email>shumingf@realtek.com</email>
</author>
<published>2024-06-25T08:43:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=50b8affb5665efa028998ad2c116b1106623409e'/>
<id>urn:sha1:50b8affb5665efa028998ad2c116b1106623409e</id>
<content type='text'>
The SDCA spec defines a 'selected_mode' control which can override
the 'detected_mode' reported by hardware.
This is useful for platform integration as well as in cases
where the hardware(e.g. 3.5mm jack cable) is not able to accurately detect the jack type.

Signed-off-by: Shuming Fan &lt;shumingf@realtek.com&gt;
Tested-by: yung-chuan.liao@linux.intel.com
Link: https://patch.msgid.link/20240625084303.2273911-1-shumingf@realtek.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>
<email>pierre-louis.bossart@linux.intel.com</email>
</author>
<published>2024-03-25T22:18:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/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-sdca: enable pm_runtime in probe, keep status as 'suspended'</title>
<updated>2023-08-07T13:32:23Z</updated>
<author>
<name>Pierre-Louis Bossart</name>
<email>pierre-louis.bossart@linux.intel.com</email>
</author>
<published>2023-08-02T15:36:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0c321fb857707ef68ffdb4f9672beb664e6679cc'/>
<id>urn:sha1:0c321fb857707ef68ffdb4f9672beb664e6679cc</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-6-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>
<email>pierre-louis.bossart@linux.intel.com</email>
</author>
<published>2023-08-02T15:36:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/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-sdca: simplify set_stream</title>
<updated>2023-03-29T14:03:06Z</updated>
<author>
<name>Pierre-Louis Bossart</name>
<email>pierre-louis.bossart@linux.intel.com</email>
</author>
<published>2023-03-24T01:44:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b2790eccc0bc755d37ed5cd8d225cec0d72798c8'/>
<id>urn:sha1:b2790eccc0bc755d37ed5cd8d225cec0d72798c8</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-10-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>
<email>kuninori.morimoto.gx@renesas.com</email>
</author>
<published>2023-01-31T02:00:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/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-sdca: add jack detection mode for JD2 100K</title>
<updated>2022-12-25T23:33:19Z</updated>
<author>
<name>Shuming Fan</name>
<email>shumingf@realtek.com</email>
</author>
<published>2022-12-23T05:58:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=51ea51b18904cd1a0fb244ce41dfd903c2ada628'/>
<id>urn:sha1:51ea51b18904cd1a0fb244ce41dfd903c2ada628</id>
<content type='text'>
This patch adds another jack detection mode for JD2 with an external resistor of 100k.

Signed-off-by: Shuming Fan &lt;shumingf@realtek.com&gt;
Link: https://lore.kernel.org/r/20221223055846.3285-1-shumingf@realtek.com
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
</content>
</entry>
</feed>
