aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/pcm1789.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2020-07-16ASoC: codecs: pcm*: merge .digital_mute() into .mute_stream()Kuninori Morimoto1-2/+3
snd_soc_dai_digital_mute() is internally using both mute_stream() (1) or digital_mute() (2), but the difference between these 2 are only handling direction. We can merge digital_mute() into mute_stream int snd_soc_dai_digital_mute(xxx, int direction) { ... else if (dai->driver->ops->mute_stream) (1) return dai->driver->ops->mute_stream(xxx, direction); else if (direction == SNDRV_PCM_STREAM_PLAYBACK && dai->driver->ops->digital_mute) (2) return dai->driver->ops->digital_mute(xxx); ... } Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Link: https://lore.kernel.org/r/87zh89wix5.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
2018-06-18ASoC: codecs: PCM1789: unconditionally flush workStefan Agner1-2/+1
Work is guaranteed to be initialized on exit. Drop the unnecessary if statement and always call flush_work. This fixes a warning seen with clang: sound/soc/codecs/pcm1789.c:265:13: warning: address of 'priv->work' will always evaluate to 'true' [-Wpointer-bool-conversion] if (&priv->work) ~~ ~~~~~~^~~~ Signed-off-by: Stefan Agner <stefan@agner.ch> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-05-31ASoC: codecs: PCM1789: include gpio/consumer.hArnd Bergmann1-1/+1
When CONFIG_GPIOLIB is disabled, this codec fails to build because gpio/consumer.h is not included implicitly. sound/soc/codecs/pcm1789.c: In function 'pcm1789_common_init': sound/soc/codecs/pcm1789.c:247:19: error: implicit declaration of function 'devm_gpiod_get_optional'; did you mean 'devm_gpio_request_one'? [-Werror=implicit-function-declaration] pcm1789->reset = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_HIGH); ^~~~~~~~~~~~~~~~~~~~~~~ Fixes: 4ae340d1be36 ("ASoC: codecs: Add support for PCM1789") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Mark Brown <broonie@kernel.org>
2018-03-19ASoC: codecs: Add support for PCM1789Mylène Josserand1-0/+274
Add Texas Instruments's PCM1789 DAC support. It is a simple DAC and does not have many registers. One particularity about this DAC is that the clocks must be always enabled. Also, an entire software reset is necessary while starting to play a sound otherwise, the clocks are not synchronized (so the DAC is not able to send data). Signed-off-by: Mylène Josserand <mylene.josserand@bootlin.com> Signed-off-by: Mark Brown <broonie@kernel.org>