IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
Two sound cards in parallel on Ubuntu Linux -- How?, Chaintech AV-710 and VIA8237
Demetris
post 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:
  • Since I deleted /etc/asound.conf, I cannot get sound from the AV710 by copying it back. The card works, but not when I log in. (There is the drumming sound at the login screen, and then nothing.)
  • When /etc/asound.conf is in place, I don't have sound from VIA8237 either. (I have tried various combinations from this guide and from the sound panel in GNOME, all to no avail.)
  • In all players I tried (Rhythmbox, Exaile, Quod Libet, MPD with GMPC, and maybe some others I don't remember) I cannot find a GUI option to set the output device. How is this set?
Here is the output from cat /proc/asound/cards:

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:
  • Is there some documentantion for beginners, that will help me make this work?
  • Is it worth the try if you are a beginner, non-technical user?
  • Should I get another card instead of the difficult AV710, and, if yes, can you suggest an affordable one?

These are the guides that seemed the most promising to me up to now:Thanks for reading. :-)
Go to the top of the page
 
+Quote Post
[JAZ]
post 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
Go to the top of the page
 
+Quote Post
gkmeyer
post 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
Go to the top of the page
 
+Quote Post
Demetris
post 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?
Go to the top of the page
 
+Quote Post
cabbagerat
post 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
asoundconf list
look at the list of cards and choose the one you want as default
asoundconf set-default-card CARDNAME
The CARDNAME must be exactly (case and everything) identical to one of the card names returned by asoundconf list.

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/
Go to the top of the page
 
+Quote Post
Demetris
post 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.
Go to the top of the page
 
+Quote Post
cabbagerat
post 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/
Go to the top of the page
 
+Quote Post
Demetris
post 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! beer.gif

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! beer.gif
Go to the top of the page
 
+Quote Post
cabbagerat
post Sep 17 2006, 14:39
Post #9





Group: Members
Posts: 1018
Joined: 27-September 03
From: Cape Town
Member No.: 9042



QUOTE (Demetris @ Sep 17 2006, 05:25) *
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 smile.gif

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/
Go to the top of the page
 
+Quote Post
Demetris
post Sep 17 2006, 14:47
Post #10





Group: Members
Posts: 105
Joined: 12-January 06
Member No.: 27057



Ok! Thanks!
Go to the top of the page
 
+Quote Post
Demetris
post Apr 27 2007, 21:42
Post #11





Group: Members
Posts: 105
Joined: 12-January 06
Member No.: 27057



QUOTE (cabbagerat @ Sep 17 2006, 16:39) *
That's the problem smile.gif

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. :-)
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 22nd November 2009 - 04:17