[alsa-devel] [PATCH 01/19] ASoC: upd9976: Add Renesas uPD9976 codec driver

Lu Guanqun guanqun.lu at intel.com
Thu May 5 02:30:58 CEST 2011


On Wed, May 04, 2011 at 11:38:33PM +0800, Takashi Iwai wrote:
> At Wed, 4 May 2011 23:18:27 +0800,
> Lu Guanqun wrote:
> > 
> > On Wed, May 04, 2011 at 11:07:24PM +0800, Takashi Iwai wrote:
> > > At Wed, 4 May 2011 15:34:51 +0100,
> > > Mark Brown wrote:
> > > > 
> > > > On Wed, May 04, 2011 at 09:44:58PM +0800, Lu Guanqun wrote:
> > > > 
> > > > > +static const struct snd_kcontrol_new upd9976_snd_controls[] = {
> > > > > +	SOC_DOUBLE_R_TLV("Headphone & Speaker Volume",
> > > > 
> > > > Master Volume would be a better name.
> > > 
> > > Yes, also in general, try to avoid special letters like "&".
> > 
> > I once used letter "/", but then it failed to create the corresponding
> > debugfs directory... :)
> 
> Yeah, "/" can be used for control names for now because they aren't
> exposed in fs, but better to avoid if possible, too.
> 
> > Oh, btw: There are another register that's related to volume control,
> > it's before DAC (not added in this patchset yet, for simplicity, will
> > add it later). so the connection looks something like this:
> > 
> > [volume gain A] --> [DAC] --> [Mixer Volume] -> [Output Pins]
> > 
> > Which volume control should be the master volume? I'm a bit unclear on
> > this one.
> 
> If it's the only output, any of them can be a "Master" volume.
> But if there are other outputs, it shouldn't be named as "Master" at
> all. 

Thanks for the info.
There are other outputs in this codec.
                            .-> [Mixer Volume for Earpiece] -> [output pins]
                           /
[volume gain A] --> [DAC] --> [Mixer Volume for HP/Spkr] -> [Output Pins]
                           \
                            `-> [Mixer Volume for LineOut] -> [LineOut Pins]

So in this case, I'll make the [volume gain A] as the master volume.

> 
> Master volume is like Highlander(*), there can be only one :)
> 
> 
> Takashi
> 
> (*) doesn't mean guys in Edinburgh

-- 
guanqun


More information about the Alsa-devel mailing list