[alsa-devel] [PATCH] ASoC: add RT5670 CODEC driver

Bard Liao bardliao at realtek.com
Mon Jun 30 07:38:59 CEST 2014


> -----Original Message-----
> From: Mark Brown [mailto:broonie at kernel.org]
> Sent: Friday, June 27, 2014 11:32 PM
> To: Bard Liao
> Cc: lgirdwood at gmail.com; alsa-devel at alsa-project.org; lars at metafoo.de;
> Flove; Oder Chiou
> Subject: Re: [PATCH] ASoC: add RT5670 CODEC driver
> 
> > +static int check_dac_monor_asrc_source(struct snd_soc_dapm_widget
> *source,
> > +			 struct snd_soc_dapm_widget *sink) {
> > +	struct snd_soc_codec *codec = source->codec;
> > +
> > +	return is_using_asrc(codec, RT5670_ASRC_2, 4); }
> 
> I have to say I'm not convinced all these wrapper functions are really
> adding much - just making is_using_asrc() take a widget and passing the
> arguments directly seems as simple.

Do you mean use is_using_asrc() as the checking function for all of those
widgets, and use different arguments for different widgets?

> 
> > +	/* ASRC */
> > +	SND_SOC_DAPM_SUPPLY_S("I2S1 ASRC", 1, RT5670_ASRC_1,
> > +			      11, 0, NULL, 0),
> > +	SND_SOC_DAPM_SUPPLY_S("I2S2 ASRC", 1, RT5670_ASRC_1,
> > +			      12, 0, NULL, 0),
> > +	SND_SOC_DAPM_SUPPLY_S("DAC STO ASRC", 1, RT5670_ASRC_1,
> > +			      10, 0, NULL, 0),
> > +	SND_SOC_DAPM_SUPPLY_S("DAC MONO L ASRC", 1,
> RT5670_ASRC_1,
> > +			      9, 0, NULL, 0),
> > +	SND_SOC_DAPM_SUPPLY_S("DAC MONO R ASRC", 1,
> RT5670_ASRC_1,
> > +			      8, 0, NULL, 0),
> > +	SND_SOC_DAPM_SUPPLY_S("ADC STO1 ASRC", 1, RT5670_ASRC_1,
> > +			      3, 0, NULL, 0),
> > +	SND_SOC_DAPM_SUPPLY_S("ADC STO2 ASRC", 1, RT5670_ASRC_1,
> > +			      2, 0, NULL, 0),
> > +	SND_SOC_DAPM_SUPPLY_S("ADC MONO L ASRC", 1,
> RT5670_ASRC_1,
> > +			      1, 0, NULL, 0),
> > +	SND_SOC_DAPM_SUPPLY_S("ADC MONO R ASRC", 1,
> RT5670_ASRC_1,
> > +			      0, 0, NULL, 0),
> 
> These are all _S but they seem not to have different sequence numbers -
> do they really need to be _S.

Yes, all of them should be powered up after filter powers. But it doesn't
matter which ASRC power is power up first. That's why we set the same
sequence for each ASRC widget.

> ------Please consider the environment before printing this e-mail.


More information about the Alsa-devel mailing list