[alsa-devel] HDA Mono out
How can the driver differentiate those mono internal chassis speaker of desktop from those subwoofer speaker of laptop?
https://launchpadlibrarian.net/34863455/Card0.Codecs.codec.2.txt
Node 0x13 [Pin Complex] wcaps 0x40010c: Mono Amp-Out Amp-Out caps: ofs=0x1f, nsteps=0x1f, stepsize=0x05, mute=1 Amp-Out vals: [0x00] Pincap 0x00000010: OUT Pin Default 0x911711f0: [Fixed] Speaker at Int Rear Conn = Analog, Color = Black DefAssociation = 0xf, Sequence = 0x0 Misc = NO_PRESENCE Pin-ctls: 0x40: OUT Connection: 1 0x2d
refer to the patch
hda: Added mono_out_pin to autoconfig
Added a mono_out_pin field to autocfg struct, and code to parse for the mono_out_line.
http://git.kernel.org/?p=linux/kernel/git/tiwai/sound.git;a=blobdiff;f=sound...
does any computer really has the mono jack using the mono pin complex?
do pulseaudio classify those mono internal chassis speaker as desktop speaker path or speaker path?
http://cgit.freedesktop.org/pulseaudio/pulseaudio/tree/src/modules/alsa/mixe...
in patch_analog.c, "mono playback switch" is created in 6stack. 3stack and laptop model. the auto model need to handle the speaker of the laptop implementation but lenovo 3000 workstation contain the internal chassis speaker which hda auto parser put it in speaker_pins instead of mono_out
if ((err = ad1988_auto_create_multi_out_ctls(spec, &spec->autocfg)) < 0 || (err = ad1988_auto_create_extra_out(codec, spec->autocfg.speaker_pins[0], "Speaker")) < 0 || (err = ad1988_auto_create_extra_out(codec, spec->autocfg.hp_pins[0], "Headphone")) < 0 || (err = ad1988_auto_create_analog_input_ctls(codec, &spec->autocfg)) < 0) return err;
one possible way to fix this bug for lenovo 3000 by checking wcaps of the pin support mono/stereo in ad1988_auto_create_extra_out and create the mono playback switch for the internal chassis speaker instead of the speaker playback volume/switch since mono out pin have to share audio output 0x04 with green jack at rear panel.
At Sat, 11 Aug 2012 20:19:43 +0800, Raymond Yau wrote:
How can the driver differentiate those mono internal chassis speaker of desktop from those subwoofer speaker of laptop?
It depends on the configuration. In general, if multiple speaker pins are specified, it's handled as surround. (We have still an open issue how to handle LFE speaker pin, though.)
OTOH, there is usually a single mono pin, and if specified, usually there is no other speaker pin. So, mono pin is most likely a speaker (unless conflicting with others).
https://launchpadlibrarian.net/34863455/Card0.Codecs.codec.2.txt
Node 0x13 [Pin Complex] wcaps 0x40010c: Mono Amp-Out Amp-Out caps: ofs=0x1f, nsteps=0x1f, stepsize=0x05, mute=1 Amp-Out vals: [0x00] Pincap 0x00000010: OUT Pin Default 0x911711f0: [Fixed] Speaker at Int Rear Conn = Analog, Color = Black DefAssociation = 0xf, Sequence = 0x0 Misc = NO_PRESENCE Pin-ctls: 0x40: OUT Connection: 1 0x2d
refer to the patch
hda: Added mono_out_pin to autoconfig
Added a mono_out_pin field to autocfg struct, and code to parse for the mono_out_line.
http://git.kernel.org/?p=linux/kernel/git/tiwai/sound.git;a=blobdiff;f=sound...
does any computer really has the mono jack using the mono pin complex?
Yes.
do pulseaudio classify those mono internal chassis speaker as desktop speaker path or speaker path?
http://cgit.freedesktop.org/pulseaudio/pulseaudio/tree/src/modules/alsa/mixe...
in patch_analog.c, "mono playback switch" is created in 6stack. 3stack and laptop model. the auto model need to handle the speaker of the laptop implementation but lenovo 3000 workstation contain the internal chassis speaker which hda auto parser put it in speaker_pins instead of mono_out
if ((err = ad1988_auto_create_multi_out_ctls(spec, &spec->autocfg)) < 0 || (err = ad1988_auto_create_extra_out(codec, spec->autocfg.speaker_pins[0], "Speaker")) < 0 || (err = ad1988_auto_create_extra_out(codec, spec->autocfg.hp_pins[0], "Headphone")) < 0 || (err = ad1988_auto_create_analog_input_ctls(codec, &spec->autocfg)) < 0) return err;
one possible way to fix this bug for lenovo 3000 by checking wcaps of the pin support mono/stereo in ad1988_auto_create_extra_out and create the mono playback switch for the internal chassis speaker instead of the speaker playback volume/switch since mono out pin have to share audio output 0x04 with green jack at rear panel.
AD codec parser needs a bigger rewrite... In near future, it could just follow the standard auto-parser. But due to lack of time, the work for the improved generic auto-parser has stalled, so far.
Takashi
participants (2)
-
Raymond Yau
-
Takashi Iwai