[alsa-devel] [PATCH] ASoC: tegra: TrimSlice machine support

Mark Brown broonie at opensource.wolfsonmicro.com
Mon Apr 18 16:40:50 CEST 2011


On Sun, Apr 17, 2011 at 08:45:22AM -0700, Stephen Warren wrote:

> Also, I renamed harmony.c to be tegra_wm8903.c since there are a number of
> boards using Tegra with that codec. I wonder if we'll have the same
> situation with this codec, such that this new combination should be e.g.
> SND_SOC_TEGRA_TLV320AIC2x and tegra_tlv320aic2x.c?

I'm not a massive fan of this if people aren't cloning a single
reference design - it seems better to factor out the code when we see
it's being shared and that there's not lots of side warts that cause
hassle.

> // First line cribbed from tlv320aic3x.c.
> // Yes, that's not the codec here, but the logic applies I think.
> fsref = (srate % 11025 == 0) ? 44100 : 48000;
> mclk = 256 * fsref;

That's pretty much illegible due to the ternery operator and...

> ... although the rate calculations in tlv320aic23.c are more complex, so
> I could be persuaded otherwise.

...it's for a completely different CODEC with different requirements and
features.

> > +static const struct snd_soc_dapm_route trimslice_audio_map[] = {
> > +	{"Headphone Jack", NULL, "LOUT"},
> > +	{"Headphone Jack", NULL, "ROUT"},

> Isn't this "Line Out" if LOUT/ROUT are correct. Or, should this be
> LHPOUT/RHPOUT if this is a headphone out.

Depends on what the jack is labelled as.  Headphone and line outputs are
typically at the same level and many line outputs will drive headphone
loads just fine.


More information about the Alsa-devel mailing list