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

Daniel Mack zonque at gmail.com
Fri Mar 8 13:31:53 CET 2013


On 08.03.2013 13:26, Daniel Mack wrote:
> 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?

Ah, sorry. Got it. stream == SNDRV_PCM_STREAM_PLAYBACK. Will send a new
version soon.


Daniel



More information about the Alsa-devel mailing list