Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Sound on ThinkPad T500 (with small patch)



Hi,

Couple of observations (current/amd64):

1) cdplay only works when using the digital option.  Perhaps the analog 
connection between the DVD player and the audio output is missing.

2) The keyboard volume controls only work after applying this patch

Index: src/sys/dev/pci/azalia_codec.c
===================================================================
RCS file: /cvsroot/src/sys/dev/pci/azalia_codec.c,v
retrieving revision 1.77
diff -u -r1.77 azalia_codec.c
--- src/sys/dev/pci/azalia_codec.c      7 Apr 2009 14:47:53 -0000       1.77
+++ src/sys/dev/pci/azalia_codec.c      15 Jul 2009 21:32:05 -0000
@@ -303,6 +303,11 @@
                this->name = "Analog Devices AD1988B";
                this->init_dacgroup = ad1988_init_dacgroup;
                break;
+       case 0x14f15051:
+               this->name = "Conexant CX20561";
+               this->mixer_init = generic_mixer_autoinit;
+               this->init_widget = generic_mixer_init_widget;
+               break;
        case 0x434d4980:
                this->name = "CMedia CMI9880";
                this->init_dacgroup = cmi9880_init_dacgroup;

3) The keyboard volume controls stop working when starting X because 
src/dev/audio.c no longer receives the events.  xev shows that the button 
presses are passed to X.  I do not know if this is the intended behavior.

4) While troubleshooting this, I came across the following code in 
src/dev/audio.c (line 443)

                        if (strcmp(mi.label.name, AudioNdac) == 0 &&
                            sc->sc_outports.master == -1)
                                sc->sc_outports.master = mi.index;

which looks for a DAC that can be used to control the master output volume.  
For the Conexant CX20561, this does not work because the strcmp ends up 
comparing, e.g., the strings "dac10" and "dac", which, of couse, do not match.  
When I changed strcmp statement to

        strncmp(mi.label.name, AudioNdac, strlen(AudioNdac))

the first DAC would end up as output master.  This change, however, assumes 
that "dac10" has a lower index than, e.g., "dac10.lrswap" which may not be a 
safe assumption.  Anyway, with the patch in (2), the change is not needed but 
I wonder if the existing code is correct.

Regards,
Sverre

PS For reference, here's the mixerctl -av output

inputs.dac10=198,198  delta=3
inputs.dac10.lrswap=off  [ off on ]
inputs.dac11=126,126  delta=3
inputs.dac11.lrswap=off  [ off on ]
inputs.beep13=85  delta=85
outputs.adc14.source=imic  [ imic ]
record.adc14=126,126  delta=3
record.adc14.lrswap=off  [ off on ]
record.adc15=126,126  delta=3
record.adc15.lrswap=off  [ off on ]
outputs.hp.front.source=dac10  [ dac10 dac11 ]
outputs.hp.front.boost=off  [ off on ]
outputs.mic.front=126,126  delta=63
outputs.ispkr.source=dac10  [ dac10 dac11 ]
outputs.ispkr.eapd=on  [ off on ]
outputs.imic=126,126  delta=63
playback.mode=10  [ 10 11 12 ]
record.mode=14  [ 14 15 ]
outputs.master=198,198  delta=3
inputs.dac=198,198  delta=3
record.volume=126,126  delta=3





Home | Main Index | Thread Index | Old Index