Skip to contentSkip to conversation

Two sound cards, only sound out of one

DISCUSSION Erik de Castro Lopo 5 participants 14 messages Aug 24, 2003 – Aug 29, 2003

lore
Share & tools
lore
#0 lore raw

Hi all,

Using version 0.9.6 of alsa-*.

I have two ENS1371 based cards plugged into the one machine:

    root@sound:~# cat /proc/asound/cards
    0 [AudioPCI       ]: ENS1371 - Ensoniq AudioPCI
                         Ensoniq AudioPCI ENS1371 at 0xa400, irq 10
    1 [AudioPCI_1     ]: ENS1371 - Ensoniq AudioPCI
                         Ensoniq AudioPCI ENS1371 at 0x9400, irq 5

I have also set up a /etc/asound.conf file containing aliases for the cards named "card0" and "card1".

I have also run alsamixergui with "-c 0" and "-c 1" parameters to set up output volumes on the two cards (and the controls on the two alsamixergui instances behave independantly).

However, when I playback a sound file using:

aplay -D card0 a.wav
aplay -D card1 a.wav

Only card0 produces sound. I have also tried physically swapping the cards but only card0 produces sound. I have also tried the -v option to aplay to confirm that the output is going to device 0 and device 1.

The relevant sections of /etc/modules.conf looks like this:

alias char-major-116 snd
alias snd-card-0 snd-ens1371
alias snd-card-1 snd-ens1371
alias char-major-14 soundcore
alias sound-slot-0 snd-card-0
alias sound-slot-1 snd-card-1
alias sound-service-0-0 snd-mixer-oss
alias sound-service-0-1 snd-seq-oss
alias sound-service-0-3 snd-pcm-oss
alias sound-service-0-8 snd-seq-oss
alias sound-service-0-12 snd-pcm-oss
alias sound-service-1-0 snd-mixer-oss
alias sound-service-1-1 snd-seq-oss
alias sound-service-1-3 snd-pcm-oss
alias sound-service-1-8 snd-seq-oss
alias sound-service-1-12 snd-pcm-oss
options snd major=116 cards_limit=2 device_gid=29 device_mode=0660 options snd-ens1371 index=0,1

Anybody got any idea why this is not working?

Thanks,
Erik

Signature · 12 lines
+-----------------------------------------------------------+
  Erik de Castro Lopo  [email protected] (Yes it's valid)
+-----------------------------------------------------------+
"If you don't know what you need Windows NT for, you don't need it."
  - Bill Gates


-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines
at the same time. Free trial click here:http://www.vmware.com/wl/offer/358/0
#1 lore raw

--- Erik de Castro Lopo <[email protected]>

Quoted 13 lines · wrote:

Using version 0.9.6 of alsa-*.

I have two ENS1371 based cards plugged into the one machine:

    root@sound:~# cat /proc/asound/cards
    0 [AudioPCI       ]: ENS1371 - Ensoniq AudioPCI
                         Ensoniq AudioPCI ENS1371 at
0xa400, irq 10
    1 [AudioPCI_1     ]: ENS1371 - Ensoniq AudioPCI
                         Ensoniq AudioPCI ENS1371 at
0x9400, irq 5
Quoted 8 lines

However, when I playback a sound file using:

aplay -D card0 a.wav
aplay -D card1 a.wav

Only card0 produces sound.

Anybody got any idea why this is not working?

Just checking the obvious: have you plugged any
speakers into the second sound card?

Chris

________________________________________________________________________
Want to chat instantly with your online friends? Get the FREE Yahoo! Messenger http://uk.messenger.yahoo.com/

-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine. WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the same time. Free trial click here:http://www.vmware.com/wl/offer/358/0

#2 lore raw
Quoted 2 lines · On Sun, 24 Aug 2003 10:51:20 +0100 (BST) Chris Rankin <[email protected]>…

Just checking the obvious: have you plugged any
speakers into the second sound card?

Errr, headphones actually. Do you think speakers would be better? :-)

Jokes aside, card0 works just as I would expect it to and card1 is completely silent.

Erik

Signature · 15 lines
+-----------------------------------------------------------+
  Erik de Castro Lopo  [email protected] (Yes it's valid)
+-----------------------------------------------------------+
Journalist: Microsoft CEO Steve Ballmer has finally said Linux 
            is the No. 1 threat to Windows. What's your response to that? 
Linus     : "Tag, you're it." I don't care. They've had a lot of 
            enemies in their time. Let them fight one enemy that
            doesn't care for a change. 


-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines
at the same time. Free trial click here:http://www.vmware.com/wl/offer/358/0
#3 lore raw
Quoted 1 line · Erik de Castro Lopo

Errr, headphones actually. Do you think speakers would be better? :-)

:-) Yes. ;-)

Quoted 3 lines

Jokes aside, card0 works just as I would expect it to and card1 is completely silent.

Erik,
As I've watched this thread I wonder how sure you are that amixer
settings for the second card are actually going to the second card? Are you able to set different volume and mute settings for the two cards and show that they are truly different values?

Also, I've had real problems recently with aplay, and unfortunately
haven't gotten much response on the couple of reflectors that I've asked questions on, so I wouldn't be surprised if some of this isn't more aplay problems.

My experience with aplay is:

1) It plays stereo files only to channels 1 and 2, which isn't so bad.

2) It plays mono files to ALL channels

Personally I wouldn't be surprised if it turned out part of the problem hee was that aplay was sending no data to the second card.

Have you tried a two card virtual setup yet? That and something like
qjackconnect would be good for making sure you were sending data to the second card. I'd try this and not worry about the clocking issues, or give the second card a clock based on the first card's outputs if you have the right hardware. (spdif clocks, etc.)

Good luck,
Mark

Quoted 2 lines

Erik

-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine. WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the same time. Free trial click here:http://www.vmware.com/wl/offer/358/0

#4 lore raw
Quoted 2 lines · On Tue, 26 Aug 2003 09:13:27 -0700 Mark Knecht <[email protected]> wrote:

Erik,
As I've watched this thread

Thanks :-).

Quoted 4 lines

I wonder how sure you are that amixer
settings for the second card are actually going to the second card? Are you able to set different volume and mute settings for the two cards and show that they are truly different values?

I'm running two instances of alsamixergui using:

alsamixergui -c 0 &
alsamixergui -c 1 &

The resulting windows are slightly different (due I believe to the different manufacturers supplying slightly different features) and the controls act completely independantly.

If the alsamixergui instances were talking to the same card I would expect the windows to be the same, and movement of the controls on one window to be reflcected in the other (I have tested this).

Quoted 1 line

Also, I've had real problems recently with aplay,

Well if this is a problem with aply, I hope that this might shake it out. I really don't have very much free time at the moment and I would prefer not to add more variables to the situation because that is only likely to confuse the issue.

Erik

Signature · 11 lines
+-----------------------------------------------------------+
  Erik de Castro Lopo  [email protected] (Yes it's valid)
+-----------------------------------------------------------+
"Microsoft treats security vulnerabilities as public relations problems." 
 -- Bruce Schneier


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
#5 lore raw
Quoted 6 lines · Erik de Castro Lopo

Well if this is a problem with aply, I hope that this might shake it out. I really don't have very much free time at the moment and I would prefer not to add more variables to the situation because that is only likely to confuse the issue.

Erik

Makes sense not to confuse things, but from my experience aplay really does strange things based on how many channels the wave file is that it's playing. Alsa, my experience with aplay is that you cannot control what output channels it puts audio on. I wouldn't be the least bit surprised, based on how few multicard setups have been tested, that it doesn't really send audio to the second card at all, but I've said that already I think.

As an alternative, what about using Jack, two instances of alsaplayer and qjackconnect to control where Jack believes it's sending the audio?

Or maybe something similar on the input side using meterbridge instances and looking at what signals come in? When Thomas and I were debugging the HDSP 9652 driver recently it turned out to be a better strategy, in my case, to look at inputs before I looked at outputs.

Anyway, maybe some of this will give you some ideas. I hope you find the solution. I'm interested in what you're trying as I'd like to do it myself one of these days.

Best of luck,
Mark

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

#6 lore raw
In reply to Erik de Castro Lopo

At Sun, 24 Aug 2003 12:13:53 +1000,

Quoted 20 lines · Erik de Castro Lopo

Hi all,

Using version 0.9.6 of alsa-*.

I have two ENS1371 based cards plugged into the one machine:

    root@sound:~# cat /proc/asound/cards
    0 [AudioPCI       ]: ENS1371 - Ensoniq AudioPCI
                         Ensoniq AudioPCI ENS1371 at 0xa400, irq 10
    1 [AudioPCI_1     ]: ENS1371 - Ensoniq AudioPCI
                         Ensoniq AudioPCI ENS1371 at 0x9400, irq 5

I have also set up a /etc/asound.conf file containing aliases for the cards named "card0" and "card1".

I have also run alsamixergui with "-c 0" and "-c 1" parameters to set up output volumes on the two cards (and the controls on the two alsamixergui instances behave independantly).

Quoted 8 lines

However, when I playback a sound file using:

aplay -D card0 a.wav
aplay -D card1 a.wav

Only card0 produces sound. I have also tried physically swapping the cards but only card0 produces sound. I have also tried the -v option to aplay to confirm that the output is going to device 0 and device 1.

if aplay -vv shows the correct configuration and VU meters, i'd suspect it's a hardware issue. i.e. mixer mutes or physical connection. to check the card's playback without physical connection, you can record via loopback like the following procedure:

1. choose "Mix" as the capture source.
2. turn on "Capture" switch.
3. raise "Capture" volume.
4. adjust "PCM" and "Master" volumees and switches.
5. play a file and record at the same time.
6. check the recorded file

also, you can try to swap the card order,

	options snd-ens1371 index=1,0

Takashi

-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine. WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the same time. Free trial click here:http://www.vmware.com/wl/offer/358/0

#7 lore raw
Quoted 1 line · On Mon, 25 Aug 2003 12:59:37 +0200 Takashi Iwai <[email protected]> wrote:

if aplay -vv shows the correct configuration and VU meters,

It does.

Quoted 11 lines

i'd
suspect it's a hardware issue. i.e. mixer mutes or physical connection. to check the card's playback without physical connection, you can record via loopback like the following procedure:

1. choose "Mix" as the capture source.
2. turn on "Capture" switch.
3. raise "Capture" volume.
4. adjust "PCM" and "Master" volumees and switches.
5. play a file and record at the same time.
6. check the recorded file

I'm not really sure how to do all this but it does seem like a good debugging method. Could you be a little bit more explicit about how the above steps are carried out?

Quoted 3 lines

also, you can try to swap the card order,

	options snd-ens1371 index=1,0

Tired this, ran "update-modules" and restarted alsa.

This changes the way that the two cards are listed in the /proc/asound/cards output but otherwise not much else changes. The same physical card that works before still works while the one that never worked still doesn't work.

Erik

Signature · 12 lines
+-----------------------------------------------------------+
  Erik de Castro Lopo  [email protected] (Yes it's valid)
+-----------------------------------------------------------+
"Compiling C code with warnings switched off is like practicing
high wire trapeze without a safety net. Even experienced
practitioners try to avoid it." -- me


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
#8 lore raw
Quoted 11 lines · Erik de Castro Lopo
Quoted 3 lines

also, you can try to swap the card order,

	options snd-ens1371 index=1,0

Tired this, ran "update-modules" and restarted alsa.

This changes the way that the two cards are listed in the /proc/asound/cards output but otherwise not much else changes. The same physical card that works before still works while the one that never worked still doesn't work.

Erik

I'm sure you've tried this, but if the card that doesn't work in this configuration is the only card in the system, does it work?

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

#9 lore raw
Quoted 2 lines · On Thu, 28 Aug 2003 21:16:23 -0700 Mark Knecht <[email protected]> wrote:

I'm sure you've tried this, but if the card that doesn't work in this configuration is the only card in the system, does it work?

I'm sure I had tried this, but I thought i would try it again.

Got inside the box, unplugged the good card, tried the other one, no good, unplugged the bad card, plugged in the good card, still no good, plugged in both cards, still no good. Scrounged around for another Es1371 based card, plugged that in by itself and it worked.

Anyway to cut a long story short, after about 200 reboots and at least twice that in plugging/unplugging cards, I have the original two cards in the machine, in their two original slots and they both work.

I have no idea what the problem was. If it ever happens again, I won't know how to fix it.

Erik

Signature · 15 lines
+-----------------------------------------------------------+
  Erik de Castro Lopo  [email protected] (Yes it's valid)
+-----------------------------------------------------------+
"An older MS internal whitepaper from August 2000 on switching 
Hotmail, which MS acquired in 1997, from front-end servers 
running FreeBSD and back-end database servers running Solaris 
to a whole farm running Win2K, reads like a veritable sales 
brochure for UNIX" 
-- http://www.theregister.co.uk/content/4/28226.html


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
#10 lore raw
Quoted 8 lines · Erik de Castro Lopo
Quoted 2 lines

Is the output of "lspci -x" the same for both cards (except port and irq settings)?

Slightly different:

    00:0a.0 Multimedia audio controller: Ensoniq 5880 AudioPCI (rev 02)
    [... port 0xa400, irq 10 ...]
    00:0d.0 Multimedia audio controller: Ensoniq ES1371 [AudioPCI-97] (rev 08)
    [... port 0x9400, irq 5 ...]

These are different cards.

If these were in the same slots as in your previous mails, the ES1371 worked while the 5880 didn't.

Quoted 4 lines

I have the original two cards in the machine, in their two original slots and they both work.

I have no idea what the problem was.

What is the output of "lspci -x" now?

Regards,
Clemens

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

#11 lore raw
In reply to Erik de Castro Lopo

At Fri, 29 Aug 2003 13:21:14 +1000,

Quoted 13 lines · Erik de Castro Lopo
Quoted 6 lines

i'd
suspect it's a hardware issue. i.e. mixer mutes or physical connection. to check the card's playback without physical connection, you can record via loopback like the following procedure:

Quoted 6 lines

1. choose "Mix" as the capture source.
2. turn on "Capture" switch.
3. raise "Capture" volume.
4. adjust "PCM" and "Master" volumees and switches.
5. play a file and record at the same time.
6. check the recorded file

Quoted 3 lines

I'm not really sure how to do all this but it does seem like a good debugging method. Could you be a little bit more explicit about how the above steps are carried out?

the method above will give you recording the signals you're playing through the loopback from DAC. thus, you can check whether signal comes out without the physical cable connection (i.e. one less artificial possible mistake).

this method is generally available on every ac97 codec.

Takashi

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf

#12 lore raw
In reply to Erik de Castro Lopo
Quoted 15 lines · Erik de Castro Lopo

I have two ENS1371 based cards plugged into the one machine:

    root@sound:~# cat /proc/asound/cards
    0 [AudioPCI       ]: ENS1371 - Ensoniq AudioPCI
                         Ensoniq AudioPCI ENS1371 at 0xa400, irq 10
    1 [AudioPCI_1     ]: ENS1371 - Ensoniq AudioPCI
                         Ensoniq AudioPCI ENS1371 at 0x9400, irq 5

I have also set up a /etc/asound.conf file containing aliases for the cards named "card0" and "card1".

I have also run alsamixergui with "-c 0" and "-c 1" parameters to set up output volumes on the two cards (and the controls on the two alsamixergui instances behave independantly).

Quoted 8 lines

However, when I playback a sound file using:

aplay -D card0 a.wav
aplay -D card1 a.wav

Only card0 produces sound. I have also tried physically swapping the cards but only card0 produces sound. I have also tried the -v option to aplay to confirm that the output is going to device 0 and device 1.

The same happens with "hw:1" instead of "card1"?

Is the output of "lspci -x" the same for both cards (except port and irq settings)?

Are the mixer controls really exactly the same (run "alsactl store" and look into /etc/asound.state)?

HTH
Clemens

-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine. WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the same time. Free trial click here:http://www.vmware.com/wl/offer/358/0

#13 lore raw

Hi Clemens,

Sorry for the delay in responding to this.

Quoted 1 line · On Mon, 25 Aug 2003 13:13:37 +0200 (METDST) Clemens Ladisch…

The same happens with "hw:1" instead of "card1"?

Hmm, I think this might be some interesting info:

These two commands work:

    root@sound:~# aplay -vv -D hw:1 a.wav 
    Playing WAVE 'a.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Mono
    Hardware PCM card 1 'Ensoniq AudioPCI' device 0 subdevice 0
    root@sound:~# aplay -vv -D card0 a.wav 
    Playing WAVE 'a.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Mono
    Hardware PCM card 1 'Ensoniq AudioPCI' device 0 subdevice 0

while these two don't:

    root@sound:~# aplay -vv -D hw:0 a.wav 
    Playing WAVE 'a.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Mono
    Hardware PCM card 0 'Ensoniq AudioPCI' device 0 subdevice 0
    root@sound:~# aplay -vv -D card1 a.wav 
    Playing WAVE 'a.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Mono
    Hardware PCM card 0 'Ensoniq AudioPCI' device 0 subdevice 0

So obviously I have my definitions in /etc/asound.conf a little mixed up but I still have one card working and one not.

Quoted 2 lines

Is the output of "lspci -x" the same for both cards (except port and irq settings)?

Slightly different:

    00:0a.0 Multimedia audio controller: Ensoniq 5880 AudioPCI (rev 02)
    00: 74 12 80 58 05 00 10 24 02 00 01 04 00 20 00 00
    10: 01 a4 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    20: 00 00 00 00 00 00 00 00 00 00 00 00 74 12 00 20
    30: 00 00 00 00 dc 00 00 00 00 00 00 00 0a 01 0c 80
    
    00:0d.0 Multimedia audio controller: Ensoniq ES1371 [AudioPCI-97] (rev 08)
    00: 74 12 71 13 05 00 10 24 08 00 01 04 00 20 00 00
    10: 01 94 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    20: 00 00 00 00 00 00 00 00 00 00 00 00 74 12 71 13
    30: 00 00 00 00 dc 00 00 00 00 00 00 00 05 01 0c 80
Quoted 2 lines

Are the mixer controls really exactly the same (run "alsactl store" and look into /etc/asound.state)?

Well I'm actually running two instances of alsamixergui using:

alsamixergui -c 0 &
alsamixergui -c 1 &

The devices shown by the two instances are slightly different and the controls work independantly.

Erik

Signature · 13 lines
+-----------------------------------------------------------+
  Erik de Castro Lopo  [email protected] (Yes it's valid)
+-----------------------------------------------------------+
"The lusers I know are so clueless, that if they were dipped in clue
 musk and dropped in the middle of pack of horny clues, on clue prom
 night during clue happy hour, they still couldn't get a clue."
--Michael Girdwood, in the monastery


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf