Commit Graph

5 Commits

Author SHA1 Message Date
Pierre-Louis Bossart f3da2ed110
ASoC: rt1712-sdca: enable pm_runtime in probe, keep status as 'suspended'
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.

The changes are directly inspired by RT711 and RT711-sdca changes.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20230802153629.53576-8-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-08-07 14:32:25 +01:00
Shuming Fan 7a8735c155
ASoC: rt712-sdca: fix for JD event handling in ClockStop Mode0
When the system suspends, peripheral SDCA interrupts are disabled.
When system level resume is invoked, the peripheral SDCA interrupts
should be enabled to handle JD events.
Enable SDCA interrupts in resume sequence when ClockStop Mode0 is applied.

Signed-off-by: Shuming Fan <shumingf@realtek.com>
Reported-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com>
Link: https://lore.kernel.org/r/20230721090721.128264-1-shumingf@realtek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-07-25 12:09:57 +01:00
Mark Brown f438c799aa
ASoC: rt712: Use maple tree register cache
The rt712 can only support single register read and write operations so
does not benefit from block writes. This means it gets no benefit from
using the rbtree register cache over the maple tree register cache so
convert it to use maple trees instead, it is more modern.

Tested-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20230609-asoc-rt-sdw-maple-v1-3-85ee50c93905@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-06-14 12:26:41 +01:00
Krzysztof Kozlowski 5cd02f96f4
ASoC: codecs: rt712-sdca: do not store status in state container
Driver in its update status callback stores Soundwire device status in
state container but it never uses it later.  Simplify the code a bit.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com
Link: https://lore.kernel.org/r/20230518072753.7361-10-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org
2023-05-18 19:25:22 +09:00
Shuming Fan 6c39710da7
ASoC: rt712-sdca: Add RT712 SDCA driver for Jack and Amp topology
This is the initial codec driver for rt712 SDCA (Jack+Amp topology).
The host should connect with rt712 SdW1 interface.

Signed-off-by: Shuming Fan <shumingf@realtek.com>
Link: https://lore.kernel.org/r/20230207090946.20659-1-shumingf@realtek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2023-02-09 16:06:39 +00:00