Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
setting up multichannel output with alsa
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
curmudgeon
Veteran
Veteran


Joined: 08 Aug 2003
Posts: 1741

PostPosted: Mon May 04, 2015 10:38 am    Post subject: setting up multichannel output with alsa Reply with quote

Yes, I have read https://wiki.gentoo.org/wiki/ALSA

Everything works perfectly with two channel stereo (except that every time I plug in or remove a flash drive, KDE is always telling me that certain devices are either unavailable or available again).

Aplay shows plenty of devices (with lots of channels): :)

Code:

$ aplay -L
null
    Discard all samples (playback) or generate zero samples (capture)
default:CARD=MID
    HDA Intel MID, ALC889 Analog
    Default Audio Device
sysdefault:CARD=MID
    HDA Intel MID, ALC889 Analog
    Default Audio Device
front:CARD=MID,DEV=0
    HDA Intel MID, ALC889 Analog
    Front speakers
surround21:CARD=MID,DEV=0
    HDA Intel MID, ALC889 Analog
    2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=MID,DEV=0
    HDA Intel MID, ALC889 Analog
    4.0 Surround output to Front and Rear speakers
surround41:CARD=MID,DEV=0
    HDA Intel MID, ALC889 Analog
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=MID,DEV=0
    HDA Intel MID, ALC889 Analog
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=MID,DEV=0
    HDA Intel MID, ALC889 Analog
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=MID,DEV=0
    HDA Intel MID, ALC889 Analog
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=MID,DEV=0
    HDA Intel MID, ALC889 Digital
    IEC958 (S/PDIF) Digital Audio Output


But it won't test:

Code:

$ /usr/bin/speaker-test -c 6 -t wav

speaker-test 1.0.28

Playback device is default
Stream parameters are 48000Hz, S16_LE, 6 channels
WAV file(s)
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 2048 to 16384
Period size range from 1024 to 1024
Using max buffer size 16384
Periods = 4
was set period_size = 1024
was set buffer_size = 16384
 0 - Front Left
 1 - Front Right
 2 - Unused
 3 - Unused
 4 - Unused
 5 - Unused
Time per period = 8.298641

$ /usr/bin/speaker-test -c 6 -D surround51 -t wav

speaker-test 1.0.28

Playback device is surround51
Stream parameters are 48000Hz, S16_LE, 6 channels
WAV file(s)
Playback open error: -16,Device or resource busy


What am I doing wrong?
Back to top
View user's profile Send private message
rkfsm
Tux's lil' helper
Tux's lil' helper


Joined: 03 Jun 2005
Posts: 100
Location: Charleston, SC, USA

PostPosted: Tue May 05, 2015 2:54 pm    Post subject: Reply with quote

I had a similar problem. Take a look at this thread and see if it helps.

RK
Back to top
View user's profile Send private message
curmudgeon
Veteran
Veteran


Joined: 08 Aug 2003
Posts: 1741

PostPosted: Thu May 07, 2015 7:40 pm    Post subject: Reply with quote

rkfsm wrote:
I had a similar problem. Take a look at this thread and see if it helps.


Unfortunately, it didn't (I am not using pulseaudio), but thanks.
Back to top
View user's profile Send private message
mimosinnet
l33t
l33t


Joined: 10 Aug 2006
Posts: 713
Location: Barcelona, Spain

PostPosted: Thu May 28, 2015 10:42 pm    Post subject: Re: setting up multichannel output with alsa Reply with quote

curmudgeon wrote:
But it won't test:

Code:

$ /usr/bin/speaker-test -c 6 -t wav

speaker-test 1.0.28

Playback device is default
Stream parameters are 48000Hz, S16_LE, 6 channels
WAV file(s)
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 2048 to 16384
Period size range from 1024 to 1024
Using max buffer size 16384
Periods = 4
was set period_size = 1024
was set buffer_size = 16384
 0 - Front Left
 1 - Front Right
 2 - Unused
 3 - Unused
 4 - Unused
 5 - Unused
Time per period = 8.298641



What am I doing wrong?


Do you hear any sound? speaker-test -c 6 -t wav gives me the same result than you. With 4 speakers (front/rear), this works for me:

Code:
speaker-test -D plug:surround40 -twav -c 4

speaker-test 1.0.28

Playback device is plug:surround40
Stream parameters are 48000Hz, S16_LE, 4 channels
WAV file(s)
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 32 to 8192
Period size range from 16 to 4096
Using max buffer size 8192
Periods = 4
was set period_size = 2048
was set buffer_size = 8192
 0 - Front Left
 1 - Front Right
 3 - Rear Right
 2 - Rear Left
Time per period = 5,718027


Cheers!
_________________
Please add [solved] to the initial post's subject line if you feel your problem is resolved.
Take care of the community answering unanswered posts.
Back to top
View user's profile Send private message
curmudgeon
Veteran
Veteran


Joined: 08 Aug 2003
Posts: 1741

PostPosted: Sun Jun 07, 2015 12:52 pm    Post subject: Re: setting up multichannel output with alsa Reply with quote

mimosinnet wrote:

Do you hear any sound? speaker-test -c 6 -t wav gives me the same result than you. With 4 speakers (front/rear), this works for me:

Code:
speaker-test -D plug:surround40 -twav -c 4

speaker-test 1.0.28

Playback device is plug:surround40
Stream parameters are 48000Hz, S16_LE, 4 channels
WAV file(s)
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 32 to 8192
Period size range from 16 to 4096
Using max buffer size 8192
Periods = 4
was set period_size = 2048
was set buffer_size = 8192
 0 - Front Left
 1 - Front Right
 3 - Rear Right
 2 - Rear Left
Time per period = 5,718027



I get absolutely nothing for anything more than two channels (either output or test). No sound, and either "unused" (if I just specify the number of channels) or "Device or resource busy" (if I try to specify a device).
Back to top
View user's profile Send private message
mimosinnet
l33t
l33t


Joined: 10 Aug 2006
Posts: 713
Location: Barcelona, Spain

PostPosted: Tue Jun 09, 2015 12:57 am    Post subject: Re: setting up multichannel output with alsa Reply with quote

curmudgeon wrote:
or "Device or resource busy" (if I try to specify a device).


Do you mean that you get the message "Device or resource busy" with this command:

Code:
aplay -D surround40 test.wav


There may be another program using the card. For example, this command:

Code:
$ aplay -D surround40 test.wav & aplay -D surround40 test.wav
[1] 7354
Playing WAVE 'test.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo
aplay: main:722: audio open error: El dispositiu o recurs es troba ocupat


gives me this same error. Could that be something related with KDE? Do you get the same error if you issue the command before starting KDE?

Cheers
_________________
Please add [solved] to the initial post's subject line if you feel your problem is resolved.
Take care of the community answering unanswered posts.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum