Two sound cards in parallel on Ubuntu Linux -- How?, Chaintech AV-710 and VIA8237 |
![]() ![]() |
Two sound cards in parallel on Ubuntu Linux -- How?, Chaintech AV-710 and VIA8237 |
Sep 16 2006, 16:06
Post
#1
|
|
|
Group: Members Posts: 105 Joined: 12-January 06 Member No.: 27057 |
Please be gentle, I'm new to Linux! Now read ahead. :-)
In a fresh Ubuntu installation, I copied this asound.conf to /etc, rebooted and had sound from the Chaintech AV710. Then I deleted /etc/asound.conf, to get sound from the onboard device (VIA8237), and now I want to set up the two devices to work in parallel: AV710 only for the audio player, and VIA8237 for all other sounds. My problems:
CODE 0 [V8237 ]: VIA8237 - VIA 8237 VIA 8237 with ALC658D at 0xc400, irq 193 1 [AV710 ]: ICE1724 - Chaintech AV-710 Chaintech AV-710 at 0x9000, irq 201 The only device that works is the VIA8237 (it works fine everywhere: multimedia. system sounds, Skype, etc.) So, my questions are:
These are the guides that seemed the most promising to me up to now:
|
|
|
|
Sep 16 2006, 16:37
Post
#2
|
|
|
Group: Members Posts: 1047 Joined: 24-June 02 From: Catalunya(Spain) Member No.: 2383 |
Try with this:
CODE # Sets the default soundcard for the system pcm.!default { type plug slave.pcm "dmixer0" } # Defines a mixer soundcard (sound output, multiple outs) pcm.dmixer1 { type dmix ipc_key 1024 slave { pcm "hw:1,1" format S32_LE period_time 0 period_size 1024 # increased buffer_size because in my system 1024 cause bad # audio performance (for totem media player and mplayer) buffer_size 8096 rate 44100 } bindings { 0 0 1 1 } } # Defines a recorder soundcard (sound input, multiple outs) pcm.drecord1 { type dsnoop ipc_key 2048 slave { pcm "hw:1,1" format S32_LE period_size 1024 rate 44100 } bindings { 0 0 1 1 } } # Defines a combo of input and output. (this allows to audio fullduplex operations) pcm.fullduplex1 { type asym playback.pcm "dmixer1" capture.pcm "drecord1" } #mixer controls ctl.dmixer1 { type hw card 1 device 1 } # Defines a mixer soundcard (sound output, multiple outs) pcm.dmixer0 { type dmix ipc_key 1024 #ipc_key_add_uid false #ipc_perm 0666 slave { pcm "hw:0,0" #rate 48000 period_size 512 } } # Defines a recorder soundcard (sound input, multiple outs) pcm.drecord0 { type dsnoop ipc_key 2048 slave { pcm "hw:0,0" #rate 48000 #period_size 128 } } # Defines a combo of input and output. (this allows to audio fullduplex operations) pcm.fullduplex0 { type asym playback.pcm "dmixer0" capture.pcm "drecord0" } pcm.via8237 { type plug slave.pcm "fullduplex0" } pcm.av710 { type plug slave.pcm "fullduplex1" } # Defines a legacy "dsp0" soundcard for OSS applications. pcm.dsp0 { type plug slave.pcm "fullduplex0" } I haven't tested it, but it is based on the asound.conf you linked to, and the configuration for my soundcard. I've set it up so that you have two fullduplex soundcards ( av710 and via ), being the default soundcard the via one. to configure applications for the via, nothing should be required (at most, select the "default" option). for av710, you have to type av710 as the audio device in the config of the audio application. good luck. Edit: btw... if you have a file ".asoundrc" in your home dir, you might need to delete it. (move it to somewhere else just in case the above code doesn't work) This post has been edited by [JAZ]: Sep 16 2006, 16:47 |
|
|
|
Sep 16 2006, 16:58
Post
#3
|
|
|
Group: Members Posts: 47 Joined: 9-May 04 Member No.: 13985 |
QUOTE ' date='Sep 16 2006, 07:37' post='431646'] I've set it up so that you have two fullduplex soundcards ( av710 and via ), being the default soundcard the via one. to configure applications for the via, nothing should be required (at most, select the "default" option). for av710, you have to type av710 as the audio device in the config of the audio application. BTW, both cards should be working all the time without an asound config file just by specfying the device in your applications output configuration. Since you see them noth in the /proc/asound/cards output, you shouldn't need a big configuration to do to use it. The syntax is hw:{card},{dac}, so to use the first dac on your first card (usually the onboard), you just specify hw:0,0. To use the second dac (the good one on the Chaintech) you should have to specify hw:1,1. You can use the asoundrc to alias this, so you can use a more descriptive name. Also: QUOTE ' date='Sep 16 2006, 07:37' post='431646'] Try with this: CODE # Defines a mixer soundcard (sound output, multiple outs) pcm.dmixer1 { type dmix Doesn't the use of dmix force resampling to 48k. For just music playback on the higher quality device, I'd think it would make more sense to access the hardware device directly, or am I missing something in my dmix knowledge? This post has been edited by gkmeyer: Sep 16 2006, 16:59 |
|
|
|
Sep 16 2006, 17:11
Post
#4
|
|
|
Group: Members Posts: 105 Joined: 12-January 06 Member No.: 27057 |
Thank you [JAZ] and gkmeyer!
I'm off now -- I'll test as soon as I get back. Another question: how do I set output device in Rhythmbox? There is no GUI option, rhythmbox --help does not have anything I can understand (maybe load-modules?), and I can find no documentation... Do I have to go to the GStreamer? Won't this affect other apps? |
|
|
|
Sep 17 2006, 10:50
Post
#5
|
|
![]() Group: Members Posts: 1018 Joined: 27-September 03 From: Cape Town Member No.: 9042 |
Ok, this is harder than it should be, primarily because ALSA's enumeration system is broken (the ALSA devs know it's broken, and fixing it looks like it's going to be fairly tough). I have nearly the identical setup - an AV-710 I use for music and a VIA8237 onboard I use for bings and flash with a set of very cheap speakers.
First, some background. In your home directory you have two files: .asoundrc and .asoundrc.asoundconf. By default in Ubuntu, .asoundrc just contains a line to include .asoundrc.asoundconf. This file is managed by a program called asoundconf (who would have guessed), which is used by the Gnome control panel to set the default card. If things go wrong with this system, the best and quickest way to fix things is like this: CODE rm ~/.asoundrc.asoundconf The CARDNAME must be exactly (case and everything) identical to one of the card names returned by asoundconf list.asoundconf list look at the list of cards and choose the one you want as default asoundconf set-default-card CARDNAME Set your VIA8237 card as the default, then set your music player to play through the AV-710. This is easy in QuodLibet - this page in the manual describes how to set it up. I don't know why they have GUI for it, but the procedure described here works. Other than the little bit of fiddling required to get it to work, the AV-710 works perfectly under Linux. -------------------- Simulate your radar: http://www.brooker.co.za/fers/
|
|
|
|
Sep 17 2006, 11:37
Post
#6
|
|
|
Group: Members Posts: 105 Joined: 12-January 06 Member No.: 27057 |
Thanks, cabbagerat! I'm off to reboot and try -- as soon as the album that plays in foobar is over :-)
PROGRESS UP TO NOW With [JAZ]'s configuration I had sound from VIA but no sound at all from the AV710. The only player I tried was VLC: it is the only one that has a GUI option for output device, it detected both DACs in the AV710, but no sound is coming out. I did not know any CLI parameters for other players. I'm going to try with Quod Libet now. |
|
|
|
Sep 17 2006, 12:54
Post
#7
|
|
![]() Group: Members Posts: 1018 Joined: 27-September 03 From: Cape Town Member No.: 9042 |
To test your AV710, run aplay -l. The output of this will be something like:
CODE **** List of PLAYBACK Hardware Devices **** card 0: V8237 [VIA 8237], device 0: VIA 8237 [VIA 8237] Subdevices: 3/4 Subdevice #0: subdevice #0 Subdevice #1: subdevice #1 Subdevice #2: subdevice #2 Subdevice #3: subdevice #3 card 0: V8237 [VIA 8237], device 1: VIA 8237 [VIA 8237] Subdevices: 1/1 Subdevice #0: subdevice #0 card 1: AV710 [Chaintech AV-710], device 0: ICE1724 [ICE1724] Subdevices: 1/1 Subdevice #0: subdevice #0 card 1: AV710 [Chaintech AV-710], device 1: IEC1724 IEC958 [IEC1724 IEC958] Subdevices: 1/1 Subdevice #0: subdevice #0 Then, to play a .wav file on my AV710, a do aplay -D plughw:1,0 whatever.wav. From the listing you can see that the AV710 is card 1 and the standard DAC (and the Wolfson) on it is device 0. If it doesn't work, I will send you my state file to try. I think the SPDIF output on the AV710 is hw1,1, which is the one you want to use for your audio player (use plughw:1,1). -------------------- Simulate your radar: http://www.brooker.co.za/fers/
|
|
|
|
Sep 17 2006, 14:25
Post
#8
|
|
|
Group: Members Posts: 105 Joined: 12-January 06 Member No.: 27057 |
I'm a very happy man! Thank you very much, cabbagerat!
I set the default device in the way you said, and then did the test: CODE demetris@******:/usr/share/sounds$ aplay -D plughw:0,1 login.wav Playing WAVE 'login.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo I edited the pipeline option in the Quod Libet config file: CODE pipeline = alsasink device=plughw:0,1 An now music is coming out of the AV710. :-) Quod Libet version is 0.18, from the Ubuntu repositories. Also, in /etc there is no asound.conf. It seems this is not needed after all. One last question: will the order of the two devices stay the same, or do I have to do something to make it stick? Thanks again, cabbagerat! |
|
|
|
Sep 17 2006, 14:39
Post
#9
|
|
![]() Group: Members Posts: 1018 Joined: 27-September 03 From: Cape Town Member No.: 9042 |
One last question: will the order of the two devices stay the same, or do I have to do something to make it stick? That's the problem I am not sure if it's an ALSA problem or a kernel problem, but devices are enumerated differently every time you boot up. The default setting refers to the cards by name, but your pipeline line will work 50% of the time and fail horribly 50% of the time. It's not too hard to fix this so your pipeline refers to the cards by name. Apparently a fix for the root problem is in the works, so you shouldn't have too much trouble. -------------------- Simulate your radar: http://www.brooker.co.za/fers/
|
|
|
|
Sep 17 2006, 14:47
Post
#10
|
|
|
Group: Members Posts: 105 Joined: 12-January 06 Member No.: 27057 |
Ok! Thanks!
|
|
|
|
Apr 27 2007, 21:42
Post
#11
|
|
|
Group: Members Posts: 105 Joined: 12-January 06 Member No.: 27057 |
That's the problem I am not sure if it's an ALSA problem or a kernel problem, but devices are enumerated differently every time you boot up. [...] I have booted six or seven times into a clean install of Ubuntu 7.04, and the enumeration stays the same. I suppose this was fixed, whatever it was. Just reporting. :-) |
|
|
|
![]() ![]() |
|
Lo-Fi Version | Time is now: 22nd November 2009 - 04:17 |