History log of /linux-master/sound/soc/codecs/max98363.c
Revision Date Author Comments
# fd38b4e4 08-Feb-2024 Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

ASoC: codecs: constify static sdw_slave_ops struct

The struct sdw_slave_ops is not modified and sdw_driver takes pointer to
const, so make it a const for code safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20240208105011.128294-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>


# d6ce2856 02-Aug-2023 Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>

ASoC: max98363: 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-16-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>


# 49ae74ab 02-Aug-2023 Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>

ASoC: SoundWire codecs: make regmap cache-only in probe

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 <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-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>


# 38531110 03-Aug-2023 Bard Liao <yung-chuan.liao@linux.intel.com>

ASoC: max98363: don't return on success reading revision ID

max98363_io_init needs to keep going when we read revision ID
successfully.

Fixes: 18c0af945fa3 ("ASoC: max98363: add soundwire amplifier driver")
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20230804034734.3848227-1-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>


# 997905d5 09-Jun-2023 Mark Brown <broonie@kernel.org>

ASoC: max98363: Remove cache defaults for volatile registers

The max98363 driver provides cache defaults for a number of volatile
registers. This is not meaningful, the cache values will never be used so
at best they will just consume memory and at worst they will be used in
preference to real values from the device, remove them.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20230609-asoc-mx98363-volatile-v1-1-7acad55f5dd6@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>


# 3a67ad17 01-Jun-2023 Ryan Lee <ryans.lee@analog.com>

ASoC: max98363: limit the number of channel to 1

MAX98363 is a mono amplifier. The number of channel needs to be always 1.

Signed-off-by: Ryan Lee <ryans.lee@analog.com>
Link: https://lore.kernel.org/r/20230601130600.25344-2-ryan.lee.analog@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>


# 0e2ee345 01-Jun-2023 Ryan Lee <ryans.lee@analog.com>

ASoC: max98363: Removed 32bit support

MAX98363 does not support 32bit depth audio.
Removed 32bit from the supported format list.
Instead, added 16bit and 24bit to the list.

Signed-off-by: Ryan Lee <ryans.lee@analog.com>
Link: https://lore.kernel.org/r/20230601130600.25344-1-ryan.lee.analog@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>


# 80a4623e 06-Apr-2023 Tom Rix <trix@redhat.com>

ASoC: max98363: Make soc_codec_dev_max98363 static

smatch reports
sound/soc/codecs/max98363.c:392:39: warning: symbol
'soc_codec_dev_max98363' was not declared. Should it be static?

This variable is only used in one file so should be static.

Signed-off-by: Tom Rix <trix@redhat.com>
Link: https://lore.kernel.org/r/20230406152300.1954292-1-trix@redhat.com
Signed-off-by: Mark Brown <broonie@kernel.org>


# 18c0af94 30-Mar-2023 Ryan Lee <ryans.lee@analog.com>

ASoC: max98363: add soundwire amplifier driver

Added Analog Devices MAX98363 SoundWire Amplifier Driver.
The MAX98363 is a SoundWire peripheral device that supports
MIPI SoundWire v1.2-compatible digital interface for audio and
control data.

Signed-off-by: Ryan Lee <ryans.lee@analog.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20230330234319.6841-1-ryan.lee.analog@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>