[alsa-devel] Missing beep controls for Via HDA codec (snd_hda_codec_via)
W. Trevor King
wking at tremily.us
Sun Mar 22 08:54:49 CET 2015
My VT1802 chip has a beep-generating node:
$ cat /proc/asound/card1/codec#0
Codec: VIA VT1802
...
Vendor Id: 0x11068446
Subsystem Id: 0x15587410
Revision Id: 0x100000
...
Node 0x22 [Beep Generator Widget] wcaps 0x70040c: Mono Amp-Out
Amp-Out caps: ofs=0x0a, nsteps=0x12, stepsize=0x05, mute=1
Amp-Out vals: [0x0a]
Power states: D0 D1 D2 D3
Power: setting=D0, actual=D0
...
But I'm missing the:
Control: name=...
entries that I think I need to manage this widget from alsamixer. For
example, sambrian posts codec output for a CX20561 chip which has [1]:
Node 0x13 [Beep Generator Widget] wcaps 0x70000c: Mono Amp-Out
Control: name="Beep Playback Volume", index=0, device=0
ControlAmp: chs=1, dir=Out, idx=0, ofs=0
Control: name="Beep Playback Switch", index=0, device=0
ControlAmp: chs=1, dir=Out, idx=0, ofs=0
Amp-Out caps: ofs=0x03, nsteps=0x03, stepsize=0x17, mute=0
Amp-Out vals: [0x00]
I can patch with something like this:
diff --git a/sound/pci/hda/patch_via.c b/sound/pci/hda/patch_via.c
index 3de6d3d..85a0c08 100644
--- a/sound/pci/hda/patch_via.c
+++ b/sound/pci/hda/patch_via.c
@@ -1520,8 +1520,10 @@ static int patch_vt2002P(struct hda_codec *codec)
spec->gen.mixer_nid = 0x21;
override_mic_boost(codec, 0x2b, 0, 3, 40);
override_mic_boost(codec, 0x29, 0, 3, 40);
- if (spec->codec_type == VT1802)
+ if (spec->codec_type == VT1802) {
+ spec->gen.beep_nid = 0x22;
fix_vt1802_connections(codec);
+ }
add_secret_dac_path(codec);
snd_hda_pick_fixup(codec, NULL, vt2002p_fixups, via_fixups);
to get a dmesg entry like:
input: HDA Digital PCBeep as /devices/pci0000:00/0000:00:1b.0/sound/card1/hdaudioC1D0/input15
but that doesn't add the beep controls. Looking at patch_analog.c,
patch_conexant.c, and patch_realtek.c for inspiration, I expect we'll
need an HDA_CODEC_MUTE_BEEP(_MONO) entry, and possibly an
HDA_CODEC_VOLUME(_MONO) entry, but I'm not sure if these should be
mono or not, or if they should be inputs (following patch_realtek.c)
or outputs (following patch_analog.c and patch_conexant.c). I've
filled out Via's datasheet-request form [2], but I don't know how
likely that is to be accepted.
Does anyone have a VT1802 datasheet that they're allowed to share (or
some free time to fill in Via beep support on their own)? Or am I
barking up the wrong tree? My only previous experience with this
code-base was a beep-tweak for a previous box's Realtek chip [3], but
I love my beeps and am happy to poke around with a datasheet until I
get this working ;). Maybe folks with more experience can just guess
the right code without needing to see specs for the VT1802?
Cheers,
Trevor
[1]: http://forums.fedoraforum.org/archive/index.php/t-265822.html
[2]: http://www.via.com.tw/en/support/contact_us/
[3]: http://thread.gmane.org/gmane.linux.alsa.devel/121300
--
This email may be signed or encrypted with GnuPG (http://www.gnupg.org).
For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20150322/80b998ee/attachment.sig>
More information about the Alsa-devel
mailing list