Subject: azalia and headphone sockets
To: None <port-i386@netbsd.org>
From: Simon Burge <simonb@NetBSD.org>
List: port-i386
Date: 10/28/2006 17:57:03
I have a Dell Inspiron 640m with azalia audio.  When I plug some
headphones in to the socket, both the speakers and the phones get the
sound.  Anyone seen anything like this?

I notice in dev/pci/azalia_codec.c there's a bit where if it's using the
Realtek ALC260 codec that does:

		/* If the headphone presents, mute the internal speaker */
		...

but there's no equivalent section for the Sigmatel STAC9220 codec.

AZALIA_DEBUG also doesn't show anything about headphones vs speakers,
and no debug output of any type when headphone is plugged in or removed.

Here's the dmesg bits:

azalia0 at pci0 dev 27 function 0: Generic High Definition Audio Controller
azalia0: interrupting at irq 10
azalia0: host: Intel 82801GB/GR High Definition Audio Controller (rev. 1)
azalia0: host: High Definition Audio rev. 1.0
...
azalia0: codec[0]: Sigmatel STAC9220 (rev. 34.1)
azalia0: codec[0]: High Definition Audio rev. 1.0
azalia0: playback: max channels=2, encodings=1<PCM>
azalia0: playback: PCM formats=e07e0<24bit,20bit,16bit,192kHz,176.4kHz,96kHz,88.2kHz,48kHz,44.1kHz>
azalia0: recording: max channels=2, encodings=1<PCM>
azalia0: recording: PCM formats=e07e0<24bit,20bit,16bit,192kHz,176.4kHz,96kHz,88.2kHz,48kHz,44.1kHz>
azalia0: codec[1]: 0x14f1/0x2bfa (rev. 0.0)
azalia0: codec[1]: High Definition Audio rev. 0.9
azalia0: codec[1]: No support for modem function groups
azalia0: codec[1] has no audio function groups
audio0 at azalia0: full duplex, independent

mixerctl -a says:

outputs.source=dac
outputs.spdif.source=dac
outputs.selector.mute=off
outputs.selector=255,255
outputs.master.mute=off
outputs.master=255,255
inputs.selector.source=mic1
outputs.headphones.boost=off
outputs.speaker.boost=off
outputs.mono.mute=off
outputs.mono=0
outputs.beep.mute=off
outputs.beep=85
playback.mode=analog
record.mode=analog

Playing with any of the output settings makes no difference - sound
always comes out of the speakers.

Simon.