Non-continous channel map?
Hi!
ALSA uses a rather strict default channel map, just a simple list. This is insufficient for the polypaudio plug-in I wrote, as the polypaudio server might have an output of e.g. just the center channel and a subwoofer. I'm wondering how to properly represent this in ALSA.
For the PCM, there is no problem as we as clients decide which channels are to be set up. The server will then need to map these to actual hardware.
For mixer, however, we're modifying the server hardware so we will need to adapt to whatever channels it has. So provided I have a device with channels "left", "right", "center" and "subwoofer", should I:
a) Just expose "left" and "right" since "rear left" isn't present (the
next in ALSA's list).
b) Expose all channels until I can cover my four and simply filter out
the ones that aren't present on the server.
c) Ignore ALSA's list completely and leave it to the user to figure
out what the channel map is.
d) Something else?
Input appreciated.
Signature · 9 lines
Pierre Ossman Telephone: +46-13-21 46 00 Cendio AB Web: http://www.cendio.com ------------------------------------------------------- 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
Quoted 1 line · Pierre Ossman
ALSA uses a rather strict default channel map, just a simple list.
Does it? AFAIK ALSA devices just have a specific number of channels and leave the interpretation to the application.
The default channel order is just a convention.
HTH
Clemens
-------------------------------------------------------
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
Quoted 8 lines · Clemens Ladisch
Quoted 1 line · Pierre Ossman
ALSA uses a rather strict default channel map, just a simple list.
Does it? AFAIK ALSA devices just have a specific number of channels and leave the interpretation to the application.
The default channel order is just a convention.
A convention that isn't followed is just as bad, if not worse, than no convention at all.
So what you're saying is that any application that wants to output more than one channel must have the user inform it of how channels are mapped?
Signature · 9 lines
Pierre Ossman Telephone: +46-13-21 46 00 Cendio AB Web: http://www.cendio.com ------------------------------------------------------- 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
At Wed, 03 May 2006 14:43:51 +0200,
Quoted 5 lines · Pierre Ossman
Quoted 3 lines · Clemens Ladisch
Quoted 1 line · Pierre Ossman
ALSA uses a rather strict default channel map, just a simple list.
Quoted 8 lines
Quoted 5 lines
Does it? AFAIK ALSA devices just have a specific number of channels and leave the interpretation to the application.
The default channel order is just a convention.
A convention that isn't followed is just as bad, if not worse, than no convention at all.
Most apps do follow the convention :)
Takashi
-------------------------------------------------------
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
At Thu, 27 Apr 2006 07:52:35 +0200,
Quoted 21 lines · Pierre Ossman
Hi!
ALSA uses a rather strict default channel map, just a simple list. This is insufficient for the polypaudio plug-in I wrote, as the polypaudio server might have an output of e.g. just the center channel and a subwoofer. I'm wondering how to properly represent this in ALSA.
For the PCM, there is no problem as we as clients decide which channels are to be set up. The server will then need to map these to actual hardware.
For mixer, however, we're modifying the server hardware so we will need to adapt to whatever channels it has. So provided I have a device with channels "left", "right", "center" and "subwoofer", should I:
a) Just expose "left" and "right" since "rear left" isn't present (the
next in ALSA's list).b) Expose all channels until I can cover my four and simply filter out
the ones that aren't present on the server.
Quoted 6 lines
c) Ignore ALSA's list completely and leave it to the user to figure
out what the channel map is.d) Something else?
Input appreciated.
I vote for (b). The method is simple enough.
Does the server-side configuration change on the fly, or the setup is fixed once after the server-client connection is established? In theory, ALSA controls can dynamically added/removed. But this may rather confuse some applications that don't support the dynamic change of control elements.
Takashi
-------------------------------------------------------
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
Quoted 2 lines · Takashi Iwai
I vote for (b). The method is simple enough.
Ok. I'll start implementing that then. :)
Quoted 3 lines
Does the server-side configuration change on the fly, or the setup is fixed once after the server-client connection is established?
Yes and no. A back end specifies its channel map during creation, so it's static during its lifetime. But we identify the back end using a name, so it is possible that "our" back end could get removed and another loaded with the same name.
It is possible to get notifications when this happens though, so we can handle this gracefully.
Quoted 3 lines
In theory, ALSA controls can dynamically added/removed. But this may rather confuse some applications that don't support the dynamic change of control elements.
Something that Polypaudio itself is probably guilty of. ;)
Rgds
Signature · 9 lines
Pierre Ossman Telephone: +46-13-21 46 00 Cendio AB Web: http://www.cendio.com ------------------------------------------------------- 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