From: Nicholas Smethurst <nick.smethurst@gmail.com>
To: alsa-devel@alsa-project.org
Subject: Re: Getting a full device list
Date: Mon, 14 May 2007 10:36:48 +0200 [thread overview]
Message-ID: <46481FA0.8050803@gmail.com> (raw)
In-Reply-To: <s5hfy63iea8.wl%tiwai@suse.de>
Takashi Iwai wrote:
> You can override the values easily in user configuration, e.g. by
> adding the following line to ~/.asoundrc:
>
> defaults.namehist.showall on
>
> To force to override even the variable type, you can add '!' modifier,
>
> defaults.namehist.!showall 1
>
Well I tried doing both of the above in ~/.asoundrc, but I'm still not getting
any listing of the pcm hw or plughw devices, or any plugins.
The only thing that changes is the addition the following when calling the
hints function with "hwdep":
hw:CARD=PAD
RME Digi96/8 PAD
hw:CARD=UART
MPU-401 UART
hw:CARD=V8237
VIA 8237
I'm not sure what hwdep means exactly.. Are these also pcm devices?
Here's my test application.. Is there anything wrong here?
#include <alsa/asoundlib.h>
#include <iostream>
int main()
{
size_t start, end;
std::string desc;
void ** hints, ** str_c;
char * name_c, * desc_c;
int index = 0;
const char * ifaces[] = {
"card", "pcm", "rawmidi", "timer", "seq", "hwdep", 0
};
snd_config_update();
while (ifaces[index]) {
std::cout << "---- Trying \"" << ifaces[index] << "\" ----\n\n";
if (snd_device_name_hint(-1, ifaces[index], &hints) < 0) {
std::cerr << "hint failed on \"" << ifaces[index] << "\"\n\n";
++index;
continue;
}
str_c = hints;
while (*str_c) {
name_c = snd_device_name_get_hint(*str_c, "NAME");
desc_c = snd_device_name_get_hint(*str_c, "DESC");
std::cout << name_c << "\n";
start = 0;
desc = desc_c;
do {
end = desc.find("\n", start);
std::cout << " " << desc.substr(start, end - start) << "\n";
start = end + 1;
} while (end != std::string::npos);
std::cout << "\n";
free(name_c);
free(desc_c);
++str_c;
}
snd_device_name_free_hint(hints);
++index;
}
return 0;
}
My system has two soundcards: an RME Digi96/8 PAD and an onboard VIA. The RME
has two devices, and the VIA four.
The result of the test application with showall set to on is the following:
---- Trying "card" ----
hint failed on "card"
---- Trying "pcm" ----
default:CARD=PAD
RME Digi96/8 PAD, Digi96 IEC958
Default Audio Device
null
Discard all samples (playback) or generate zero samples (capture)
default:CARD=UART
MPU-401 UART
Default Audio Device
default:CARD=V8237
VIA 8237, VIA 8237
Default Audio Device
front:CARD=V8237,DEV=0
VIA 8237, VIA 8237
Front speakers
surround40:CARD=V8237,DEV=0
VIA 8237, VIA 8237
4.0 Surround output to Front and Rear speakers
surround41:CARD=V8237,DEV=0
VIA 8237, VIA 8237
4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=V8237,DEV=0
VIA 8237, VIA 8237
5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=V8237,DEV=0
VIA 8237, VIA 8237
5.1 Surround output to Front, Center, Rear and Subwoofer speakers
iec958:CARD=V8237,DEV=0
VIA 8237, VIA 8237
IEC958 (S/PDIF) Digital Audio Output
---- Trying "rawmidi" ----
hw:CARD=PAD
RME Digi96/8 PAD
Direct rawmidi driver device
hw:CARD=UART,DEV=0
MPU-401 UART, MPU-401 UART MIDI
Direct rawmidi driver device
hw:CARD=V8237
VIA 8237
Direct rawmidi driver device
---- Trying "timer" ----
---- Trying "seq" ----
---- Trying "hwdep" ----
hw:CARD=PAD
RME Digi96/8 PAD
hw:CARD=UART
MPU-401 UART
hw:CARD=V8237
VIA 8237
next prev parent reply other threads:[~2007-05-14 8:36 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-19 14:30 alsa-lib functions reporting conflicting information with two sound cards nick smethurst
2007-04-19 15:46 ` Lee Revell
2007-04-19 18:08 ` Nicholas Smethurst
2007-04-19 18:45 ` Lee Revell
2007-05-11 10:28 ` Getting a full device list (was: alsa-lib functions reporting conflicting information with two sound cards) Nicholas Smethurst
2007-05-11 10:35 ` Jaroslav Kysela
2007-05-11 11:05 ` Getting a full device list Nicholas Smethurst
2007-05-11 11:46 ` Jaroslav Kysela
2007-05-11 15:13 ` Takashi Iwai
2007-05-11 17:01 ` Nicholas Smethurst
2007-05-14 8:36 ` Nicholas Smethurst [this message]
2007-05-14 9:18 ` Takashi Iwai
2007-05-14 9:27 ` Nicholas Smethurst
2007-05-14 9:57 ` Takashi Iwai
2007-05-14 10:38 ` Nicholas Smethurst
2007-05-14 12:55 ` Takashi Iwai
2007-04-20 10:13 ` alsa-lib functions reporting conflicting information with two sound cards Takashi Iwai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=46481FA0.8050803@gmail.com \
--to=nick.smethurst@gmail.com \
--cc=alsa-devel@alsa-project.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).