Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* list all available devices
@ 2006-02-06  9:25 Timo Steuerwald
  2006-02-06 10:19 ` Giuliano Pochini
  0 siblings, 1 reply; 8+ messages in thread
From: Timo Steuerwald @ 2006-02-06  9:25 UTC (permalink / raw)
  To: alsa-devel

Hi all,

can someone point me to the right location where I can find information 
about listing all available devices in ALSA?
A code sample will be also very nice :-)

Cheers,

Timo


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: list all available devices
  2006-02-06  9:25 list all available devices Timo Steuerwald
@ 2006-02-06 10:19 ` Giuliano Pochini
  2006-02-06 10:32   ` Timo Steuerwald
  2006-02-06 18:00   ` Lee Revell
  0 siblings, 2 replies; 8+ messages in thread
From: Giuliano Pochini @ 2006-02-06 10:19 UTC (permalink / raw)
  To: Timo Steuerwald; +Cc: alsa-devel



On Mon, 6 Feb 2006, Timo Steuerwald wrote:

> Hi all,
>
> can someone point me to the right location where I can find information
> about listing all available devices in ALSA?
> A code sample will be also very nice :-)

aplay -l
arecord -l


--
Giuliano.


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: list all available devices
  2006-02-06 10:19 ` Giuliano Pochini
@ 2006-02-06 10:32   ` Timo Steuerwald
  2006-02-06 18:00   ` Lee Revell
  1 sibling, 0 replies; 8+ messages in thread
From: Timo Steuerwald @ 2006-02-06 10:32 UTC (permalink / raw)
  To: Giuliano Pochini; +Cc: alsa-devel


Giuliano Pochini wrote:

>aplay -l
>arecord -l
>  
>
Hi Giuliano,

thanks a lot! That's what I was searching for! :-)

Cheers,

Timo


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: list all available devices
  2006-02-06 10:19 ` Giuliano Pochini
  2006-02-06 10:32   ` Timo Steuerwald
@ 2006-02-06 18:00   ` Lee Revell
  2006-02-06 18:10     ` Timo Steuerwald
  1 sibling, 1 reply; 8+ messages in thread
From: Lee Revell @ 2006-02-06 18:00 UTC (permalink / raw)
  To: Giuliano Pochini; +Cc: Timo Steuerwald, alsa-devel

On Mon, 2006-02-06 at 11:19 +0100, Giuliano Pochini wrote:
> 
> On Mon, 6 Feb 2006, Timo Steuerwald wrote:
> 
> > Hi all,
> >
> > can someone point me to the right location where I can find information
> > about listing all available devices in ALSA?
> > A code sample will be also very nice :-)
> 
> aplay -l
> arecord -l

Are you sure that's good enough?  It does not list the PCMs in a format
useful to the application (like "default", hw:0", "surround51", "dmix"
etc).  AFAICT "aplay -l" doesn't give an application enough information
to populate a drop-down list.

This is a problem already for apps like "wengophone" - ALSA does not
provide a sane API for enumerating all usable PCMs so it only lists
"hw:x" PCMS and whatever is directly defined in .asoundrc (but NOT the
PCMs defined under /usr/share/alsa/* - probably it parses .asoundrc
directly, ugh)

Lee



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: list all available devices
  2006-02-06 18:00   ` Lee Revell
@ 2006-02-06 18:10     ` Timo Steuerwald
  2006-02-06 18:13       ` Lee Revell
  0 siblings, 1 reply; 8+ messages in thread
From: Timo Steuerwald @ 2006-02-06 18:10 UTC (permalink / raw)
  To: Lee Revell; +Cc: Giuliano Pochini, alsa-devel

Lee Revell wrote:

>Are you sure that's good enough?  It does not list the PCMs in a format
>useful to the application (like "default", hw:0", "surround51", "dmix"
>etc).  AFAICT "aplay -l" doesn't give an application enough information
>to populate a drop-down list.
>
>  
>
Hmmh, I haven't already taken a look at the code, but I thought this can 
be extended easily...

>This is a problem already for apps like "wengophone" - ALSA does not
>provide a sane API for enumerating all usable PCMs so it only lists
>"hw:x" PCMS and whatever is directly defined in .asoundrc (but NOT the
>PCMs defined under /usr/share/alsa/* - probably it parses .asoundrc
>directly, ugh)
>
>  
>
Uh, not very good :-/

Cheers,

Timo


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: list all available devices
  2006-02-06 18:10     ` Timo Steuerwald
@ 2006-02-06 18:13       ` Lee Revell
  2006-02-06 18:30         ` Matthias König
  0 siblings, 1 reply; 8+ messages in thread
From: Lee Revell @ 2006-02-06 18:13 UTC (permalink / raw)
  To: Timo Steuerwald; +Cc: Giuliano Pochini, alsa-devel

On Mon, 2006-02-06 at 19:10 +0100, Timo Steuerwald wrote:
> Hmmh, I haven't already taken a look at the code, but I thought this
> can 
> be extended easily...
> 

It's insane to expect every app to use 100 lines of code list to list
available PCMs.  It should be a single function call.

Lee



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: list all available devices
  2006-02-06 18:13       ` Lee Revell
@ 2006-02-06 18:30         ` Matthias König
  2006-02-06 18:58           ` Lee Revell
  0 siblings, 1 reply; 8+ messages in thread
From: Matthias König @ 2006-02-06 18:30 UTC (permalink / raw)
  To: alsa-devel

Hi,

Lee Revell <rlrevell@joe-job.com> writes:

> It's insane to expect every app to use 100 lines of code list to list
> available PCMs.  It should be a single function call.

Hmm, doesn't this exist already? What about this:

int snd_names_list(const char *iface, snd_devname_t **list)
Give a list of device names and associated comments for selected interface. 

Regards,
Matthias


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: list all available devices
  2006-02-06 18:30         ` Matthias König
@ 2006-02-06 18:58           ` Lee Revell
  0 siblings, 0 replies; 8+ messages in thread
From: Lee Revell @ 2006-02-06 18:58 UTC (permalink / raw)
  To: Matthias König; +Cc: alsa-devel

On Mon, 2006-02-06 at 19:30 +0100, Matthias König wrote:
> Hi,
> 
> Lee Revell <rlrevell@joe-job.com> writes:
> 
> > It's insane to expect every app to use 100 lines of code list to list
> > available PCMs.  It should be a single function call.
> 
> Hmm, doesn't this exist already? What about this:
> 
> int snd_names_list(const char *iface, snd_devname_t **list)
> Give a list of device names and associated comments for selected interface. 
> 

No, that's something different (and does not even work here):

$ aplay -n
ALSA lib names.c:173:(snd_names_list) cannot access
file /etc/asound.names
aplay: names_list:199: snd_names_list error: No such file or directory

Lee



-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2006-02-06 18:58 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-02-06  9:25 list all available devices Timo Steuerwald
2006-02-06 10:19 ` Giuliano Pochini
2006-02-06 10:32   ` Timo Steuerwald
2006-02-06 18:00   ` Lee Revell
2006-02-06 18:10     ` Timo Steuerwald
2006-02-06 18:13       ` Lee Revell
2006-02-06 18:30         ` Matthias König
2006-02-06 18:58           ` Lee Revell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox