The device has up to 5 potentially independent power supplies:
AVDD, DVDD, DVVDIO, VBAT and PVDD. The former 3 are mandatory for the
device to function. One of VBAT and PVDD should also be made available.
Regulators are enabled during probe time and will stay active except when in
suspend mode.
Futher, the chip needs to be informed about the presence of VBAT through a
bit in register 0x20a0.
Signed-off-by: Daniel Mack <daniel@zonque.org>
Link: https://lore.kernel.org/r/20220624104712.1934484-5-daniel@zonque.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Add support for the CLSA3541 ACPI device ID used on Valve's Steam Deck.
The driver is fully compatible with the indicated hardware, hence no
additional changes are required.
Signed-off-by: Cristian Ciocaltea <cristian.ciocaltea@collabora.com>
Acked-by: David Rhodes <drhodes@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20220621213819.262537-1-cristian.ciocaltea@collabora.com
Signed-off-by: Mark Brown <broonie@kernel.org>
The initial settings will be written before the codec probe function.
But, the rt711->component doesn't be assigned yet.
If IO error happened during initial settings operations, it will cause the kernel panic.
This patch changed component->dev to slave->dev to fix this issue.
Signed-off-by: Shuming Fan <shumingf@realtek.com>
Link: https://lore.kernel.org/r/20220621090719.30558-1-shumingf@realtek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Legacy or non DT boot is no longer possible on systems where the
tw4030/5030 is used.
Drop the support for handling legacy pdata and replace it with a local
board_params struct to allow further cleanups on the mfd side.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@gmail.com>
Link: https://lore.kernel.org/r/20220616153521.29701-1-peter.ujfalusi@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
The endianness flag is used on the CODEC side to specify an
ambivalence to endian, typically because it is lost over the hardware
link. This device receives audio over an I2S DAI and as such should
have endianness applied.
Fixes: 0d463d0160 ("ASoC: cs35l45: Add driver for Cirrus Logic CS35L45 Smart Amp")
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20220614131022.778057-1-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Currently wcd938x_*_put() unconditionally report that the value of the
control changed, resulting in spurious events being generated. Return 0 in
that case instead as we should. There is still an issue in the compander
control which is a bit more complex.
Signed-off-by: Mark Brown <broonie@kernel.org>
Reported-by: kernel test robot <lkp@intel.com>
Link: https://lore.kernel.org/r/20220603122526.3914942-1-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
As part of retiring the old defines used to specify DAI formats update the
hdmi_codec driver to use the modern names, including the variables in the
struct hdmi_codec_daifmt exported to the DRM drivers.
In updating this I did note that the only use of this information in DRM
drivers is to reject clock provider settings, thinking about what this
hardware is doing I rather suspect that there might not be any hardware
out there which needs the configuration so it may be worth considering
just having hdmi-codec support only clock consumer.
Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220602103029.3498791-1-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
The slimbus mux put operation unconditionally reports a change in value
which means that spurious events are generated. Fix this by exiting early
in that case.
Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220603124609.4024666-1-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Currently in slim_rx_mux_put, an RX channel gets added to a new list
even if it is already in one. This can mess up links and make either
it, the new list head, or both, get linked to the wrong entries.
This can cause an entry to link to itself which in turn ends up
making list_for_each_entry in other functions loop infinitely.
To avoid issues, always remove the RX channel from any list it's in
before adding it to a new list.
Signed-off-by: Yassine Oudjana <y.oudjana@protonmail.com>
Link: https://lore.kernel.org/r/20220606152226.149164-1-y.oudjana@protonmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Merge series from Srinivas Kandagatla <srinivas.kandagatla@linaro.org>:
Move all the digital and IIR gains form using SX_TLV to S8_TLV,
these gains are actually 8 bit gains with 7th signed bit and
ranges from -84dB to +40dB
Tested on DB410c with Headset playback
move all the digital gains form using SX_TLV to S8_TLV, these gains are
actually 8 bit gains with 7th signed bit and ranges from -84dB to +40dB
rest of the Qualcomm wcd codecs uses these properly.
Fixes: 8c4f021d80 ("ASoC: wcd9335: add basic controls")
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20220609111901.318047-3-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
move all the digital gains form using SX_TLV to S8_TLV, these gains are
actually 8 bit gains with 7th signed bit and ranges from -84dB to +40dB
rest of the Qualcomm wcd codecs uses these properly.
Fixes: ef8a4757a6 ("ASoC: msm8916-wcd-digital: Add sidetone support")
Fixes: 150db8c5af ("ASoC: codecs: Add msm8916-wcd digital codec")
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20220609111901.318047-2-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Renesas is the only user of ak4613 on upstream for now, and
commit f28dbaa958 ("ASoC: ak4613: add TDM256 support")
added TDM256 support. Renesas tested part of it, because of
board connection.
It was assuming ak4613 is probed via Audio-Graph-Card, but it
might be probed via Simple-Audio-Card either.
It will indicates WARNING in such case. This patch fixup it.
Reported-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/87h74v29f7.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Merge series from Mark Brown <broonie@kernel.org>:
Update the last batch of CODEC drivers without specific
maintainers to use the new defines for DAI clocking.
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: 7ad4d237e7 ('ASoC: rt711-sdca: Add RT711 SDCA vendor-specific driver')
Fixes: 899b12542b ('ASoC: rt711: add snd_soc_component remove callback')
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@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/20220606203752.144159-8-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
The workqueues are initialized in the io_init functions, which isn't
quite right. In some tests, this leads to warnings throw from
__queue_delayed_work()
WARN_ON_FUNCTION_MISMATCH(timer->function, delayed_work_timer_fn);
Move all the initializations to the probe functions.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@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/20220606203752.144159-7-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Realtek headset codec drivers typically check if the card is
instantiated before proceeding with the jack detection.
The rt700, rt711 and rt711-sdca are however missing a check on the
card pointer, which can lead to NULL dereferences encountered in
driver bind/unbind tests.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@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/20220606203752.144159-6-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Follow the same flow as rt711-sdca and initialize all mutexes at probe
time.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@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/20220606203752.144159-5-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
In codec driver bind/unbind test, the following warning is thrown:
DEBUG_LOCKS_WARN_ON(lock->magic != lock)
...
[ 699.182495] rt711_sdca_jack_init+0x1b/0x1d0 [snd_soc_rt711_sdca]
[ 699.182498] rt711_sdca_set_jack_detect+0x3b/0x90 [snd_soc_rt711_sdca]
[ 699.182500] snd_soc_component_set_jack+0x24/0x50 [snd_soc_core]
A quick check in the code shows that the 'calibrate_mutex' used by
this driver are not initialized at probe time. Moving the
initialization to the probe removes the issue.
BugLink: https://github.com/thesofproject/linux/issues/3644
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@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/20220606203752.144159-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
When binding/unbinding codec drivers, the following warnings are
thrown:
[ 107.266879] rt715-sdca sdw:3:025d:0714:01: Unbalanced pm_runtime_enable!
[ 306.879700] rt711-sdca sdw:0:025d:0711:01: Unbalanced pm_runtime_enable!
Add a remove callback for all Realtek/Maxim SoundWire codecs and remove this
warning.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@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/20220606203752.144159-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Merge series from Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Uwe Kleine-König <uwe@kleine-koenig.org>:
From: Uwe Kleine-König <uwe@kleine-koenig.org>
Hello,
I intended to send this after -rc1 was cut, but found a few spare
minutes to prepare this series. All four patches were sent already
before based on v5.18, but there were some conflicting changes added in
the merge window. This series contains the four patches on top of
current linus/master and so bases on a tree including the conflicting
changes. Expecting no more sound changes in this merge window, this
should apply cleanly on top of -rc1.
Best regards
Uwe
Uwe Kleine-König (4):
ASoC: ak4642: Drop no-op remove function
ASoC: da7219: Drop no-op remove function
ASoC: lm49453: Drop no-op remove function
ASoC: da732x: Drop no-op remove function
sound/soc/codecs/ak4613.c | 6 ------
sound/soc/codecs/da7219.c | 6 ------
sound/soc/codecs/da732x.c | 6 ------
sound/soc/codecs/lm49453.c | 6 ------
4 files changed, 24 deletions(-)
base-commit: 50fd82b3a9
--
2.36.1
Merge series from Hui Wang <hui.wang@canonical.com>:
Taking your advice and try to enable internal PLL to get a more
accurate sample rate. And I also changed the fsl-asoc-card.c to support
the nau8822 codec, now the sound quality is pretty good on my imx6sx
EVB.
Merge series from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>:
This can probably wait for the next merge window, I found a number of
cppcheck warnings that I didn't see in my last checks. The irony is
that the only really important issue found by cppcheck was on one of
my previous DPCM changes (submitted separately as a fix).
Merge series from Cezary Rojewski <cezary.rojewski@intel.com>
From there on is a range of boards appended. All of them follow the same:
This series focuses on populating boards/ subdirectory with supported
configurations by the avs-driver. Note: it is independent of recently
provided "Driver code and PCM operations" series [1], that is, code
found here should not collide with it.
Series starts with a small change that adds a helper to sound pcm
header, allowing for retrieving string naming a direction without the
need of substream pointer. Said helper is used by codec driver code that
follows it but I believe it's generic and helpful enough that it can be
called an independent addition to the sound core.
Code for generic HD-Audio codec driver follows. It is a ASoC wrapper for
existing HD-Audio codec code found in sound/pci/hda/. There is basically
no custom logic involved up to the point that driver follows
HDA_DEV_LEGACY convention, rather than the HDA_DEV_ASOC one. Commit
message for the given patch iterates on this and explains crucial parts
of the implementation.
From there on is a range of boards appended. All of them follow the same
scheme:
- define avs_create_dai_link() so DAI-LINKs can be created dynamically,
based on the link_mask (I2S) or the number of entries in the
->pcm_list_head list (HDA)
- define avs_create_dapm_routes() so DAPM routes can be created
dynamically, same rules as above apply
- define probe() function that creates new ASoC card, assign all
required operations and resources along with calling the two above
Changes in v2:
- 'link_mask' usage replaced with 'i2s_link_mask' as requested by
Pierre
- 'ssp_test' board renamed to 'i2s_test' to match naming convention used
for other i2s machine boards
- enriched commit message and Kconfig for the 'HD-Audio codec driver'
patch as requested by Kai
[1]: https://lore.kernel.org/all/20220426172346.3508411-1-cezary.rojewski@intel.com/
Amadeusz Sławiński (1):
ASoC: Intel: avs: Add max98373 machine board
Cezary Rojewski (13):
ALSA: Add snd_pcm_direction_name() helper
ASoC: codecs: Add HD-Audio codec driver
ASoC: Intel: avs: Add HDAudio machine board
ASoC: Intel: avs: Add DMIC machine board
ASoC: Intel: avs: Add I2S-test machine board
ASoC: Intel: avs: Add rt274 machine board
ASoC: Intel: avs: Add rt286 machine board
ASoC: Intel: avs: Add rt298 machine board
ASoC: Intel: avs: Add rt5682 machine board
ASoC: Intel: avs: Add nau8825 machine board
ASoC: Intel: avs: Add ssm4567 machine board
ASoC: Intel: avs: Add max98357a machine board
ASoC: Intel: avs: Add da7219 machine board
include/sound/pcm.h | 19 +-
sound/soc/codecs/Kconfig | 10 +
sound/soc/codecs/Makefile | 2 +
sound/soc/codecs/hda-dai.c | 102 +++++++
sound/soc/codecs/hda.c | 395 +++++++++++++++++++++++++
sound/soc/codecs/hda.h | 19 ++
sound/soc/intel/Kconfig | 3 +
sound/soc/intel/avs/Makefile | 3 +
sound/soc/intel/avs/boards/Kconfig | 121 ++++++++
sound/soc/intel/avs/boards/Makefile | 27 ++
sound/soc/intel/avs/boards/da7219.c | 282 ++++++++++++++++++
sound/soc/intel/avs/boards/dmic.c | 93 ++++++
sound/soc/intel/avs/boards/hdaudio.c | 294 ++++++++++++++++++
sound/soc/intel/avs/boards/i2s_test.c | 180 +++++++++++
sound/soc/intel/avs/boards/max98357a.c | 154 ++++++++++
sound/soc/intel/avs/boards/max98373.c | 239 +++++++++++++++
sound/soc/intel/avs/boards/nau8825.c | 353 ++++++++++++++++++++++
sound/soc/intel/avs/boards/rt274.c | 310 +++++++++++++++++++
sound/soc/intel/avs/boards/rt286.c | 281 ++++++++++++++++++
sound/soc/intel/avs/boards/rt298.c | 281 ++++++++++++++++++
sound/soc/intel/avs/boards/rt5682.c | 340 +++++++++++++++++++++
sound/soc/intel/avs/boards/ssm4567.c | 271 +++++++++++++++++
22 files changed, 3775 insertions(+), 4 deletions(-)
create mode 100644 sound/soc/codecs/hda-dai.c
create mode 100644 sound/soc/codecs/hda.c
create mode 100644 sound/soc/codecs/hda.h
create mode 100644 sound/soc/intel/avs/boards/Kconfig
create mode 100644 sound/soc/intel/avs/boards/Makefile
create mode 100644 sound/soc/intel/avs/boards/da7219.c
create mode 100644 sound/soc/intel/avs/boards/dmic.c
create mode 100644 sound/soc/intel/avs/boards/hdaudio.c
create mode 100644 sound/soc/intel/avs/boards/i2s_test.c
create mode 100644 sound/soc/intel/avs/boards/max98357a.c
create mode 100644 sound/soc/intel/avs/boards/max98373.c
create mode 100644 sound/soc/intel/avs/boards/nau8825.c
create mode 100644 sound/soc/intel/avs/boards/rt274.c
create mode 100644 sound/soc/intel/avs/boards/rt286.c
create mode 100644 sound/soc/intel/avs/boards/rt298.c
create mode 100644 sound/soc/intel/avs/boards/rt5682.c
create mode 100644 sound/soc/intel/avs/boards/ssm4567.c
--
2.25.1
Merge series from Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>:
Small updates to add initial tables for MeteorLake, SoundWire machine
driver support for tests without HDMI and RT1019 for consistency on
Chromebooks.
Merge series from Vitaly Rodionov <vitalyr@opensource.cirrus.com>:
The CS35L41 Amplifier contains a DSP, capable of running firmware.
The firmware can run algorithms such as Speaker Protection, to ensure
that playback at high gains do not harm the speakers. This exports some
interfaces to allow more use of this DSP by the HDA version of the driver.
Mt6366 is a new version of mt6358, and they are same about audio part.
So we can reuse the driver of mt6358 that add a new compatible string
inside of the mt6358 driver.
Signed-off-by: Jiaxin Yu <jiaxin.yu@mediatek.com>
Link: https://lore.kernel.org/r/20220523132858.22166-2-jiaxin.yu@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
As part of moving to remove the old style defines for the bus clocks update
the tlv320dac3x driver to use more modern terminology for clocking.
Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220602135316.3554400-21-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
As part of moving to remove the old style defines for the bus clocks update
the tlv320aic33 driver to use more modern terminology for clocking.
Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220602135316.3554400-20-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
As part of moving to remove the old style defines for the bus clocks update
the tlv320aic32x4 driver to use more modern terminology for clocking.
Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220602135316.3554400-19-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
As part of moving to remove the old style defines for the bus clocks update
the tlv320aic31xx driver to use more modern terminology for clocking.
Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220602135316.3554400-18-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
As part of moving to remove the old style defines for the bus clocks update
the tlv320aic26 driver to use more modern terminology for clocking.
Signed-off-by: Mark Brown <broonie@kernel.org>
Reported-by: kernel test robot <lkp@intel.com>
Link: https://lore.kernel.org/r/20220602135316.3554400-17-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
As part of moving to remove the old style defines for the bus clocks update
the tlv320aic23 driver to use more modern terminology for clocking.
Signed-off-by: Mark Brown <broonie@kernel.org>
Reported-by: kernel test robot <lkp@intel.com>
Link: https://lore.kernel.org/r/20220602135316.3554400-16-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
As part of moving to remove the old style defines for the bus clocks update
the tlv320adcx140 driver to use more modern terminology for clocking.
Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220602135316.3554400-15-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
As part of moving to remove the old style defines for the bus clocks update
the tlv320aic3xxx driver to use more modern terminology for clocking.
Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220602135316.3554400-14-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
As part of moving to remove the old style defines for the bus clocks update
the uda1334 driver to use more modern terminology for clocking.
Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20220602135316.3554400-13-broonie@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>