[alsa-devel] [PATCH] ASoC: ssm4567: Add driver for Analog Devices SSM4567 amplifier
Lars-Peter Clausen
lars at metafoo.de
Fri Sep 26 19:13:45 CEST 2014
On 09/26/2014 06:08 PM, Anatol Pomozov wrote:
> Analog Devices SSM4567 is a boost class-D audio amplifier.
>
> Signed-off-by: Anatol Pomozov <anatol.pomozov at gmail.com>
Looks mostly okay. I also have a driver for this chip which is getting ready
for upstream. It is a bit more complete feature wise, but I can rebase it
ontop of your driver.
https://github.com/analogdevicesinc/linux/blob/asoc-ssm4329/sound/soc/codecs/ssm4567.c
[...]
> diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig
> index 8ab1547..da45b5a 100644
> --- a/sound/soc/codecs/Kconfig
> +++ b/sound/soc/codecs/Kconfig
> @@ -94,6 +94,7 @@ config SND_SOC_ALL_CODECS
[...]
> +config SND_SOC_SSM4567
> + tristate "Analog Devices ssm4567 amplifier driver support"
depends on I2C
> +
> config SND_SOC_STA32X
> tristate
>
> diff --git a/sound/soc/codecs/ssm4567.c b/sound/soc/codecs/ssm4567.c
> new file mode 100644
> index 0000000..fb92248
> --- /dev/null
> +++ b/sound/soc/codecs/ssm4567.c
[...]
> +#include <linux/gpio.h>
> +#include <linux/of_gpio.h>
No gpios in this driver
[...]
> +
> +static const struct snd_kcontrol_new ssm4567_snd_controls[] = {
[...]
> + SOC_SINGLE("Master Playback Switch", SSM4567_REG_DAC_CTRL, 6, 1, 1),
This one and ...
[...]
> +};
> +
[...]
> +static int ssm4567_mute(struct snd_soc_dai *dai, int mute)
> +{
> + struct ssm4567 *ssm4567 = snd_soc_codec_get_drvdata(dai->codec);
> + unsigned int val;
> +
> + val = mute ? SSM4567_DAC_MUTE : 0;
> + return regmap_update_bits(ssm4567->regmap, SSM4567_REG_DAC_CTRL,
> + SSM4567_DAC_MUTE, val);
... this one control the same bit, so there will be conflicts.
> +}
> +
More information about the Alsa-devel
mailing list