[alsa-devel] [PATCH] hda: add mixers for analog mixer on 92hd75xx codecs

Matthew Ranostay mranostay at embeddedalley.com
Sat Oct 11 18:31:44 CEST 2008


Takashi Iwai wrote:
> At Fri, 10 Oct 2008 09:07:23 -0400,
> Matthew Ranostay wrote:
>> Add support for mixers on the analog mixer on some 92hd75xx codecs,
>> along with adding a 'Mixer' entry for it's connection on the dmux.
>>
>> Signed-off-by: Matthew Ranostay <mranostay at embeddedalley.com>
> 
> Thanks, I applied it as is now, but...
> 
>> @@ -1095,8 +1090,17 @@ static struct snd_kcontrol_new stac92hd71bxx_analog_mixer[] = {
>>  	HDA_CODEC_MUTE("PC Beep Switch", 0x17, 0x2, HDA_INPUT),
>>  	*/
>>
>> -	HDA_CODEC_MUTE("Analog Loopback 1", 0x17, 0x3, HDA_INPUT),
>> -	HDA_CODEC_MUTE("Analog Loopback 2", 0x17, 0x4, HDA_INPUT),
>> +	HDA_CODEC_MUTE("Import0 Mux Capture Switch", 0x17, 0x3, HDA_INPUT),
>> +	HDA_CODEC_VOLUME("Import0 Mux Capture Volume", 0x17, 0x3, HDA_INPUT),
>> +
>> +	HDA_CODEC_MUTE("Import1 Mux Capture Switch", 0x17, 0x3, HDA_INPUT),
>> +	HDA_CODEC_VOLUME("Import1 Mux Capture Volume", 0x17, 0x3, HDA_INPUT),
>> +
>> +	HDA_CODEC_MUTE("DAC0 Capture Switch", 0x17, 0x3, HDA_INPUT),
>> +	HDA_CODEC_VOLUME("DAC0 Capture Volume", 0x17, 0x3, HDA_INPUT),
>> +
>> +	HDA_CODEC_MUTE("DAC1 Capture Switch", 0x17, 0x4, HDA_INPUT),
>> +	HDA_CODEC_VOLUME("DAC1 Capture Volume", 0x17, 0x4, HDA_INPUT),
> 
> This rename worries me.  One may wonder what the hell is "Import* Mux"
> at all.
>
Good question, I just noticed the typos in that code. I'll submit the changes shortly.
But the Import Mux's are 0x1a and 0x1b which have a path into the analog mixer.

Let me know if I can name the mixers somehow better.


>> @@ -4391,6 +4408,10 @@ again:
>>  	spec->multiout.num_dacs = 1;
>>  	spec->multiout.hp_nid = 0x11;
>>  	spec->multiout.dac_nids = stac92hd71bxx_dac_nids;
>> +	if (spec->dinput_mux)
>> +		spec->private_dimux.num_items +=
>> +			spec->num_dmics -
>> +				(ARRAY_SIZE(stac92hd71bxx_dmic_nids) - 1);
> 
> And, this looks a bit tricky.
> The relation between these variables is unclear in the patch...
> 
Ok I can explain this as well. If there isn't any dmics defined as in some laptops,
or if there is only one, this then removes the unneeded items from the mux. I realize
there has to be a better way to do this but seems like overkill since only one codec to
date has analog mixer.

Thanks,

Matt Ranostay

> 
> thanks,
> 
> Takashi
> 



More information about the Alsa-devel mailing list