History log of /linux-master/sound/soc/codecs/max98396.c
Revision Date Author Comments
# 0a5b7ee0 11-Sep-2023 Linus Walleij <linus.walleij@linaro.org>

ASoC: max98396: Drop pointless include

This driver is already using solely GPIO descriptors and
do not need to include the legacy header <linux/gpio.h>.
Drop it.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20230911-descriptors-asoc-max-v2-5-b9d793fb768e@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>


# 70f29a30 25-Aug-2023 Linus Walleij <linus.walleij@linaro.org>

ASoC: max98396: Drop pointless include

This driver is already using solely GPIO descriptors and
do not need to include the legacy header <linux/gpio.h>.
Drop it.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Link: https://lore.kernel.org/r/20230825-descriptors-asoc-max-v1-5-b212292b2f08@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>


# 9abcd240 25-Apr-2023 Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

ASoC: Switch i2c drivers back to use .probe()

After commit b8a1a4cd5a98 ("i2c: Provide a temporary .probe_new()
call-back type"), all drivers being converted to .probe_new() and then
03c835f498b5 ("i2c: Switch .probe() to not take an id parameter") convert
back to (the new) .probe() to be able to eventually drop .probe_new() from
struct i2c_driver.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de
Link: https://lore.kernel.org/r/20230425095716.331419-1-u.kleine-koenig@pengutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org


# 2ff85020 18-Nov-2022 Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

ASoC: max98396: Convert to i2c's .probe_new()

.probe_new() doesn't get the i2c_device_id * parameter, so determine
that explicitly in the probe function.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20221118224540.619276-603-uwe@kleine-koenig.org
Signed-off-by: Mark Brown <broonie@kernel.org>


# 33b7504a 26-Aug-2022 Daniel Mack <daniel@zonque.org>

ASoC: max98396: Make data monitor features configurable

Allow the data monitor features to be enabled explicitly, and enable control
over their details.

Signed-off-by: Daniel Mack <daniel@zonque.org>
Link: https://lore.kernel.org/r/20220826085927.2336224-2-daniel@zonque.org
Signed-off-by: Mark Brown <broonie@kernel.org>


# d29e0a6e 28-Jun-2022 Daniel Mack <daniel@zonque.org>

ASoC: max98396: Fix TDM mode BSEL settings

In TDM mode, the BSEL register value must be set according to table 5 in the
datasheet. This patch adds a lookup function and uses it in
max98396_dai_tdm_slot().

As the first 3 entries can also be used for non-TDM setups, the code re-uses
the same table for such scenarios.

Signed-off-by: Daniel Mack <daniel@zonque.org>
Link: https://lore.kernel.org/r/20220629050630.2848317-1-daniel@zonque.org
Signed-off-by: Mark Brown <broonie@kernel.org>


# d2d3219e 23-Jun-2022 Charles Keepax <ckeepax@opensource.cirrus.com>

ASoC: max*: Remove now redundant non_legacy_dai_naming flag

The ASoC core has now been changed to default to the non-legacy DAI
naming, as such drivers using the new scheme no longer need to specify
the non_legacy_dai_naming flag.

Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20220623125250.2355471-53-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>


# f42924b4 23-Jun-2022 Daniel Mack <daniel@zonque.org>

ASoC: max98396: Implement DSP speaker monitor

Allow the selection of the TDM slot that is used to send back speaker
monitor data. The DT property adi,spkfb-slot-no can be used to configure
this setting which defaults to 2.

Signed-off-by: Daniel Mack <daniel@zonque.org>
Link: https://lore.kernel.org/r/20220624104712.1934484-8-daniel@zonque.org
Signed-off-by: Mark Brown <broonie@kernel.org>


# c529fd62 23-Jun-2022 Daniel Mack <daniel@zonque.org>

ASoC: max98396: Fix register access for PCM format settings

max98396_dai_set_fmt() modifes register 2041 and touches bits in the mask
0x3a. Make sure to use the right mask for that operation.

Signed-off-by: Daniel Mack <daniel@zonque.org>
Link: https://lore.kernel.org/r/20220624104712.1934484-7-daniel@zonque.org
Signed-off-by: Mark Brown <broonie@kernel.org>


# a8c1dc9e 23-Jun-2022 Daniel Mack <daniel@zonque.org>

ASoC: max98396: Improve some error prints

Let's log what actually failed and log at some more places.

Signed-off-by: Daniel Mack <daniel@zonque.org>
Link: https://lore.kernel.org/r/20220624104712.1934484-6-daniel@zonque.org
Signed-off-by: Mark Brown <broonie@kernel.org>


# 703ee055 23-Jun-2022 Daniel Mack <daniel@zonque.org>

ASoC: max98396: add voltage regulators

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>


# 9e51ac6e 23-Jun-2022 Daniel Mack <daniel@zonque.org>

ASoC: max98396: Fix register access for PCM format settings

max98396_dai_set_fmt() modifes register 2041 and touches bits in the mask
0x3a. Make sure to use the right mask for that operation.

Signed-off-by: Daniel Mack <daniel@zonque.org>
Link: https://lore.kernel.org/r/20220624104712.1934484-7-daniel@zonque.org
Signed-off-by: Mark Brown <broonie@kernel.org>


# 0b7f644f 12-May-2022 Hui Tang <tanghui20@huawei.com>

ASoC: max98396: Fix build error for implicit function declaration

sound/soc/codecs/max98396.c: In function ‘max98396_i2c_probe’:
sound/soc/codecs/max98396.c:1555:25: error: implicit declaration of function ‘devm_gpiod_get_optional’; did you mean ‘devm_regulator_get_optional’? [-Werror=implicit-function-declaration]
max98396->reset_gpio = devm_gpiod_get_optional(&i2c->dev,
^~~~~~~~~~~~~~~~~~~~~~~
devm_regulator_get_optional
sound/soc/codecs/max98396.c:1556:23: error: ‘GPIOD_OUT_HIGH’ undeclared (first use in this function); did you mean ‘GPIOF_INIT_HIGH’?
"reset", GPIOD_OUT_HIGH);
^~~~~~~~~~~~~~
GPIOF_INIT_HIGH
sound/soc/codecs/max98396.c:1556:23: note: each undeclared identifier is reported only once for each function it appears in
sound/soc/codecs/max98396.c:1565:3: error: implicit declaration of function ‘gpiod_set_value_cansleep’; did you mean ‘gpio_set_value_cansleep’? [-Werror=implicit-function-declaration]
gpiod_set_value_cansleep(max98396->reset_gpio, 0);
^~~~~~~~~~~~~~~~~~~~~~~~
gpio_set_value_cansleep
cc1: all warnings being treated as errors

Include header file <linux/gpio/consumer.h>

Fixes: b58581136770 ("ASoC: max98396: add amplifier driver")
Signed-off-by: Hui Tang <tanghui20@huawei.com>
Link: https://lore.kernel.org/r/20220512074640.75550-2-tanghui20@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>


# b5858113 22-Apr-2022 Ryan Lee <ryan.lee.analog@gmail.com>

ASoC: max98396: add amplifier driver

This series of patches adds support for Analog Devices MAX98396
mono amplifier with IV sense. The device provides a PCM interface
for audio data and a standard I2C interface for control data
communication. This driver also supports MAX98397 which is
a variant of MAX98396 with wide input supply range.

Signed-off-by: Ryan Lee <ryan.lee.analog@gmail.com>
Reported-by: kernel test robot <lkp@intel.com>
Link: https://lore.kernel.org/r/20220423021558.1773598-1-ryan.lee.analog@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>