VIA VT1708B HDA: ALSA and alternative

Problems and successes with specific brands/models of computer audio hardware
Post Reply
Message
Author
User avatar
Patriot
Posts: 733
Joined: Thu 15 Jan 2009, 19:04

VIA VT1708B HDA: ALSA and alternative

#1 Post by Patriot »

Hmmm .....

ALSA is still flaky with HDA codecs. I've already spent nearly a week trying to get vt1708b HDA to fully work but it still won't play nicely. Is the HDA hardware defective? How can it be defective when it's fully working in WinXP?

Device in question: VIA VT1708B High Definition Audio (Class: 0403, VID/PID: 1106,3288)

With alsa 1.0.16, vt1708b is detected and audio ouput can be heard but volume mixers are not working. Not even the pcm mixer is available. Alsamixer/amixer will not load, giving an error everytime. I grabbed alsa 1.0.20 and made a full set of binaries. Alas, the same still happens with alsa 1.0.20. Tinkering with Alsa sources led me to believe that something's not right during driver initialization.

Unable to tinker deeper into alsa, I review what my bottomline is. Well, the vt1708b is detected and audio does gets through. So, my current bottomline is to have at least a working volume mixer control. Ok, I tinker a little bit here and a little bit there and stumbled on an occasion when an extra pcm slider suddenly pops out in sGmixer. Yes, yes, finally some progress.

Let's cut short and just see how to get that volume mixer working shall we ?

0. Pre-requisite: Of course, first setup audio with alsaconf (Alsa sound wizard). A reboot may be required to have a normalized set of hda modules loaded.

1. Open a terminal and do :

Code: Select all

# cat /proc/asound/card0/oss_mixer
2. Look for the PCM entry. It may look something like this:

Code: Select all

...
SYNTH "" 0
PCM "" 0
SPEAKER "" 0
LINE "Line" 0
...
3. If the PCM mapping entry (between the "") is empty, open /etc/rc.d/rc.services and add the line in blue below (somewhere in lines 18-20). If it is not empty, skip to step 6.

...
#v406 comment out, have restored aliases in /etc/modprobe.conf... v407 back in... v411 properly back in...
aplay /usr/share/audio/bark.au
modprobe snd-mixer-oss
modprobe snd-seq-oss
modprobe snd-pcm-oss
...

(I don't know why. Playing an audio before loading oss mixer emulation layer enables the pcm mixer.)

4. Reboot. (It's possible not to reboot but then its a much more lengthy tale)

5. Open a terminal and do :

Code: Select all

# cat /proc/asound/card0/oss_mixer
6. Look for the PCM entry. It may look something like this:

Code: Select all

...
SYNTH "" 0
PCM "PCM" 0
SPEAKER "" 0
LINE "Line" 0
...
7. If PCM entry is still empty then your volume mixer control journey have ended. If PCM entry contains a mapping (within the "") then it can be used to some extent as a volume mixer (to be precise, the pcm/wave volume mixer). Do this :

Code: Select all

# echo 'VOLUME "PCM" 0' > /proc/asound/card0/oss_mixer
(note 1: replace PCM above with the actual mapping within the "" for PCM mapping)

8. Right click on the systray volume mixer applet. This opens sGmixer and you should get a Volume slider and Pcm slider control. They're the same thing but, the absvolume systray applet uses Volume slider control exclusively.

9. Test it by playing an audio file while adjusting the volume slider.

10. If you want it to be set automatically, create a script in your /root/Startup folder and put in the echo command in step 5 or place it in rc.services after modprobe snd-pcm-oss. Remember to mark 'em script file executable.

Sample mixer mapping script:

Code: Select all

#!/bin/sh
echo 'VOLUME "PCM" 0' > /proc/asound/card0/oss_mixer
(note 2: There is also a possibility that alsa higher than 1.0.16 is required to make all this to work. I'm unable to test every single possibility though.)


Ok, what if one insists on having full mixer controls?

Currently, the only fully working (with some minor known issues) audio driver for VT1708B HDA is OSSv4.1 ... I recommend installing OSSv4.1 if you absolutely must have full mixer controls for this device. A full range of controls is available. A virtual master volume mixer, separate volume mixers for each channel (7.1 channels anyone?) and a bunch of other stuffs will be at your disposal. The price for such an install would be the inconvenience of installing it from source and reconfiguring the systray with oss volume mixer. Alsa only apps will still work by using the alsa's library plugins (except for alsa mixer controls).

Yeah, a few would be asking, isn't OSS a commercial product? Yes and no. There's now a GPL version available and the one I tested (OSSv4.1 GPL) does everything I wanted so far ...

I'll re-visit alsa drivers/controls again sometime in the future when I have more time to tinker with it ...


Rgds

haizaar
Posts: 2
Joined: Mon 15 Feb 2010, 15:31

#2 Post by haizaar »

Good day!

It seems like we are the only persons in the world that are stuck with this G41 ICH7 + VIA VT1708B audio problem. I've described my troubles here: http://www.linuxquestions.org/questions ... rk-789041/

Have you got any success with ALSA since you've written this post?

Another question: I've tried to work with OSS. I've downloaded latest OSSv4.2 tarball for my AMD64 (I'm using Debian Lenny), unpacked and run:

Code: Select all

$ LD_LIBRARY_PATH=$PWD/usr/lib ./usr/bin/ossmix
No such file or directory
Here is a strace output of the above: http://pastebin.com/med64bd

Any help from you will be highly appreciated!

Thank you in advance!

haizaar
Posts: 2
Joined: Mon 15 Feb 2010, 15:31

#3 Post by haizaar »

OK, some progress with OSS - installed deb file, that did a lot of things, including kernel modules build, etc. Now ossmix gives this:

Code: Select all

Selected mixer 0/High Definition Audio 0x1106e721
Known controls are:
jack.jack1c.mute ON|OFF (currently OFF)
jack.jack1c.pcm11 [<leftvol>:<rightvol>] (currently 50.9:50.9 dB)
jack.jack1c.pcm12 [<leftvol>:<rightvol>] (currently 38.9:38.9 dB)
jack.jack1c.int-cd [<leftvol>:<rightvol>] (currently 38.9:38.9 dB)
jack.jack1c.pcm3 [<leftvol>:<rightvol>] (currently 38.9:38.9 dB)
jack.jack1c.pcm2 [<leftvol>:<rightvol>] (currently 38.9:38.9 dB)
jack.jack1c.jack6 [<leftvol>:<rightvol>] (currently 38.9:38.9 dB)
jack.jack1c.jack5 [<leftvol>:<rightvol>] (currently 38.9:38.9 dB)
jack.jack1c.pcm4 [<leftvol>:<rightvol>] (currently 38.9:38.9 dB)
jack.jack1d.mute ON|OFF (currently OFF)
jack.jack1e.mute ON|OFF (currently OFF)
record.select1.select1 <int-cd|pcm3|pcm2|jack6|jack5|mix> (currently pcm3)
record.select1 [<leftvol>:<rightvol>] (currently 38.9:38.9 dB)
record.jack6 [<leftvol>:<rightvol>] (currently 38.9:38.9 dB)
misc.pcm2 [<leftvol>:<rightvol>] (currently 50.9:50.9 dB)
misc.mute1 ON|OFF (currently OFF)
misc.pcm3 [<leftvol>:<rightvol>] (currently 50.9:50.9 dB)
misc.pcm4 [<leftvol>:<rightvol>] (currently 50.9:50.9 dB)
misc.mute2 ON|OFF (currently OFF)
misc.mute3 ON|OFF (currently OFF)
vmix0-enable ON|OFF (currently ON)
vmix0-rate <decimal value> (currently 48000) (Read-only)
vmix0-channels <Stereo|Multich> (currently Stereo)
vmix0-src <Fast|High|OFF> (currently Fast)
vmix0-outvol <monovol> (currently 25.0 dB)
vmix0-invol <monovol> (currently 25.0 dB)
vmix0.pcm7 [<leftvol>:<rightvol>] (currently 25.0:25.0 dB)
vmix0.pcm8 [<leftvol>:<rightvol>] (currently 25.0:25.0 dB)
vmix0.pcm9 [<leftvol>:<rightvol>] (currently 25.0:25.0 dB)
vmix0.pcm10 [<leftvol>:<rightvol>] (currently 25.0:25.0 dB)
The question is... some applications like Skype 2.1 do not support OSS any more (and for good reason :) ). Do you know whether OSS can somehow emulate ALSA?

User avatar
Patriot
Posts: 733
Joined: Thu 15 Jan 2009, 19:04

#4 Post by Patriot »

Hmmm .....

So far, from what I understand, the VIA vt1708b is an 8 channels audio codec ... but some board manufacturer chose to wire the pins for only 6 channels, this somehow borks previous alsa versions ... This seems to be the trend with low-cost boards (and it's not an issue to me as the specs on the motherboard clearly indicates as such) ...

Well, I seem to have my mixer issues resolved since upgrading to alsa-1.0.22.1 recently ... The mixers are now working without patching and it is now showing several options that were not available in alsa-1.0.20 and earlier ... I haven't been able to properly test all alsa functions yet to post an update here ... but if you'd prefer alsa, then you may want to try latest alsa drivers ... I would suggest upgrading the 3 alsa core components (minimum: drivers, libs and utils) to the same version as mixing them up may cause weird issues ...

I have both OSS and alsa installed on a test bed machine ... Seems easier to use alsa nowadays but the OSS virtual mixer is quite useful ... Yes, there is alsa emulation in OSS but like any emulated thing, its not perfect ... Please take a look at OSS wiki pages here ...


Rgds

Post Reply