[alsa-devel] [PATCH] ALSA: ASoC: add codec driver for TI TAS5086

Daniel Mack zonque at gmail.com
Fri Mar 8 13:26:35 CET 2013

Hi Mark,

thanks for your quick review.

On 08.03.2013 12:42, Mark Brown wrote:
> On Fri, Mar 08, 2013 at 12:07:13PM +0100, Daniel Mack wrote:

>> +static int tas5086_digital_mute(struct snd_soc_dai *dai, int mute)
>> +{
>> +	struct snd_soc_codec *codec = dai->codec;
>> +	struct tas5086_private *priv = snd_soc_codec_get_drvdata(codec);
>> +
>> +	return regmap_write(priv->regmap, TAS5086_SOFT_MUTE,
>> +			    mute ? 0x3f : 0x00);
> Please avoid the ternery operator.  It'd be nice to switch over to
> mute_stream() too.

I wasn't aware of steam_mute. How's that supposed to be used? I'm asking
because when using 4-channel playback, the driver gets this callback for
stream == 0 only. Am I supposed to (un)mute all channels here,
regardless of the stream parameter passed in?

>> +#ifdef CONFIG_PM
>> +static int tas5086_soc_suspend(struct snd_soc_codec *codec)
>> +{
>> +	return 0;
>> +}
> Empty functions can just be omitted, though it might make sense to hold
> the device in reset over suspend.

I can't test this at the moment, so I'll skip suspend functionality
support for now. Will send another follow-up patch in the future for this.


More information about the Alsa-devel mailing list