Skip to contentSkip to conversation

Everything You Could Ever Need to Know About ALSA - ALSA docs

DISCUSSION Patrick Strasser 2 participants 5 messages May 14, 2006

lore
Share & tools
lore
#0 lore raw

Hello!

Before I get to the point (see next paragraph) I want to say some words about ALSA documentation: I can't say more than: I'm confused and frustrated. That's incidentally the best description of the current documentation. I've looked into the archives, and it was the same state about 2 or 3 years before.

I need ALSA, so i need to know ALSA, what it can do, what it can't do, and how to get it doing what I want. For now I can't see through all the fog of incomplete, not helpful or not existent documentation at all. I've dug through the wiki and came to AlsaComplaint page [0].

I've come to the result that I want to understand ALSA and want to share
my knowledge. I want to write the famous but nevertheless not yet existing "Everything You Could Ever Need to Know About ALSA"-document.

I need some help for this. I think I'm quite qualified for this task as I don't know much about ALSA, so I can ask the right questions. But I need people answering my questions.

Let's get into it:

What is this thing about the device?

First the most important question:
I know for now that in a standard configuration "hw:0,0" is quite fine. For the second card "hw:1,0" is hopefully working. What exactly does that mean? Sometimes I see "plughw:0,0". What's the difference to "hw:0,0"?
How can I find out which device strings are valid (except for guessing?)

Next: How can I find out which device is the device my speakers are connected to?

More will follow...

Patrick

[0] http://alsa.opensrc.org/AlsaComplaint

Signature · 11 lines
Engineers motto: cheap, good, fast: choose any two
Patrick Strasser <patrick dot strasser at  tugraz dot at>
Student of Telematik, Techn. University Graz, Austria



-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
#1 lore raw
Quoted 11 lines · Patrick Strasser

What is this thing about the device?

First the most important question:
I know for now that in a standard configuration "hw:0,0" is quite fine.
For the second card "hw:1,0" is hopefully working. What exactly does that mean?
Sometimes I see "plughw:0,0". What's the difference to "hw:0,0"? How can I find out which device strings are valid (except for guessing?)

Not quite, you should just use "default" (or "default:0" for the first card, "default:1" for the second). Only use hw:x if you know what you are doing.

Really, you should not have to know this - the app should have a drop down menu to select the device.

This page explains the varous devices:

http://www.alsa-project.org/alsa-doc/alsa-lib/pcm_plugins.html

Quoted 3 lines

Next: How can I find out which device is the device my speakers are connected to?

You can't. Speaker jacks don't normally support this. You just have to select the various devices in your app and see which one gives you sound. It's no different from any other OS.

Lee

-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

#2 lore raw
Quoted 10 lines · Lee Revell
Quoted 8 lines · Patrick Strasser

What is this thing about the device?

First the most important question:
I know for now that in a standard configuration "hw:0,0" is quite
fine. For the second card "hw:1,0" is hopefully working. What exactly does that mean? Sometimes I see "plughw:0,0". What's the difference to "hw:0,0"?
How can I find out which device strings are valid (except for guessing?)

Quoted 2 lines

Not quite, you should just use "default" (or "default:0" for the first card, "default:1" for the second).

Ok.
I just nowhere found a definition for this :-)

Quoted 2 lines

Only use hw:x if you know what you
are doing.

I need something to select my CD sound to record from.

Quoted 2 lines

Really, you should not have to know this - the app should have a drop down menu to select the device.

Command lines don't have dropdowns. Aplayer does _not_ give you a list with default, default:0, default:1, hw:0,0, hw:0,1 and sensible device descriptions for copy-paste.

Quoted 3 lines

This page explains the varous devices:

http://www.alsa-project.org/alsa-doc/alsa-lib/pcm_plugins.html

I read this. One primary fact that is missing:
What is a slave?
I don't want a syntactical description, but a semantical. It's used in the before mentioned document, but I couldn't find paragraph about slaves.

Quoted 4 lines
Quoted 2 lines

Next: How can I find out which device is the device my speakers are connected to?

You can't. Speaker jacks don't normally support this.

Of course ;->

Quoted 3 lines

You just have to
select the various devices in your app and see which one gives you sound.

I thought of some tool that scans through all available channels (left, right, center, rear left, rear right, subwoofer, etc.) and pronounce the device name and the channel name. So you would connect your speakers like you think it could work and try to get some info about device+channel to speaker mapping.

Patrick

Signature · 10 lines
Engineers motto: cheap, good, fast: choose any two
Patrick Strasser <patrick dot strasser at  tugraz dot at>
Student of Telematik, Techn. University Graz, Austria


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
#3 lore raw
Quoted 8 lines · Patrick Strasser

I thought of some tool that scans through all available channels (left,
right, center, rear left, rear right, subwoofer, etc.) and pronounce the
device name and the channel name. So you would connect your speakers like you think it could work and try to get some info about device+channel to speaker mapping.

speaker-test from alsa-utils

Lee

-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642

#4 lore raw
In reply to Patrick Strasser
Quoted 5 lines · Patrick Strasser
Quoted 2 lines

Only use hw:x if you know what you
are doing.

I need something to select my CD sound to record from.

You can't select to record from the CD with an ALSA PCM device. You have to record from default:x (where x is 0 for the first card, 1 for the second, etc) and set the capture source to "CD" in alsamixer.

Lee

-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642