Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Multimedia
  • Search

setting up multichannel output with alsa

Help with creation, editing, or playback of sounds, images, or video. Amarok, audacious, mplayer, grip, cdparanoia and anything else that makes a sound or plays a video.
Post Reply
Advanced search
6 posts • Page 1 of 1
Author
Message
curmudgeon
Veteran
Veteran
Posts: 1746
Joined: Fri Aug 08, 2003 1:39 pm

setting up multichannel output with alsa

  • Quote

Post by curmudgeon » Mon May 04, 2015 10:38 am

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: Select all

$ 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: Select all

$ /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?
Top
rkfsm
Tux's lil' helper
Tux's lil' helper
Posts: 100
Joined: Fri Jun 03, 2005 2:54 pm
Location: Charleston, SC, USA

  • Quote

Post by rkfsm » Tue May 05, 2015 2:54 pm

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

RK
Top
curmudgeon
Veteran
Veteran
Posts: 1746
Joined: Fri Aug 08, 2003 1:39 pm

  • Quote

Post by curmudgeon » Thu May 07, 2015 7:40 pm

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.
Top
mimosinnet
l33t
l33t
User avatar
Posts: 720
Joined: Thu Aug 10, 2006 4:20 pm
Location: Barcelona, Spain
Contact:
Contact mimosinnet
Website

Re: setting up multichannel output with alsa

  • Quote

Post by mimosinnet » Thu May 28, 2015 10:42 pm

curmudgeon wrote:But it won't test:

Code: Select all

$ /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: Select all

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.
Top
curmudgeon
Veteran
Veteran
Posts: 1746
Joined: Fri Aug 08, 2003 1:39 pm

Re: setting up multichannel output with alsa

  • Quote

Post by curmudgeon » Sun Jun 07, 2015 12:52 pm

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: Select all

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).
Top
mimosinnet
l33t
l33t
User avatar
Posts: 720
Joined: Thu Aug 10, 2006 4:20 pm
Location: Barcelona, Spain
Contact:
Contact mimosinnet
Website

Re: setting up multichannel output with alsa

  • Quote

Post by mimosinnet » Tue Jun 09, 2015 12:57 am

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: Select all

aplay -D surround40 test.wav
There may be another program using the card. For example, this command:

Code: Select all

$ 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.
Top
Post Reply

6 posts • Page 1 of 1

Return to “Multimedia”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic