You are not logged in.

#1 2019-06-29 23:44:44

spittlbm
Member
Registered: 2019-06-29
Posts: 2

alsa asoundrc debugging

I have 2 soundcards, hw:1,0 and hw:2,0.  They are identical and connected by usb.

Each of these outputs properly:

speaker-test -D hw:1,0 -c2
speaker-test -D hw:2,0 -c2

I'd like to combine them for semi-unified playback (ie going for 2 zones)

sudo nano ~/.asoundrc

has been modified to:

pcm.quad {
    type multi
    slaves.a.pcm "hw:1,0"
    slaves.a.channels 2
    slaves.b.pcm "hw:2,0"
    slaves.b.channels 2
    bindings.0.slave a
    bindings.0.channel 0
    bindings.1.slave a
    bindings.1.channel 1
    bindings.2.slave b
    bindings.2.channel 0
    bindings.3.slave b
    bindings.3.channel 1
}
pcm.quad2 {
    type route
    slave.pcm "quad"
    ttable.0.0 1
    ttable.1.1 1
    ttable.2.2 1
    ttable.3.3 1
}

Now when I execute the following:

speaker-test -D quad or speaker-test -D quad2 (with or without -c#)

Instead of playback on both hw:1,0 and hw:2,0, I get this error:

Channels count (1) not available for playbacks: Invalid argument
Setting of hwparams failed: Invalid argument

I have verified that

aplay -L

shows quad and quad2.

Humbly, any suggestions?

Offline

#2 2019-06-30 11:02:28

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,423

Re: alsa asoundrc debugging

You get the "same" error? Channel counts of 1 are rarely valid, in this case -c4 should get you something

Offline

#3 2019-06-30 17:26:42

spittlbm
Member
Registered: 2019-06-29
Posts: 2

Re: alsa asoundrc debugging

-c4 allows speaker-test to work as I expect it to.

Now the following produce "aplay: set_params:1305: Channels count non available"

aplay -D quad2 Noise.wav
aplay -D quad2 -c 4 Noise.wav

Offline

#4 2019-07-03 13:44:39

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,423

Re: alsa asoundrc debugging

Use a plug pcm instead of a route pcm, it should do automatic channel conversions as necessary

Offline

Board footer

Powered by FluxBB