From: Lee Revell <rlrevell@joe-job.com>
To: Adrian McMenamin <adrian@mcmen.demon.co.uk>
Cc: alsa-devel@alsa-project.org
Subject: Re: Can anyone help?
Date: Thu, 09 Feb 2006 18:19:29 -0500 [thread overview]
Message-ID: <1139527169.30058.130.camel@mindpipe> (raw)
In-Reply-To: <1139526455.9296.5.camel@localhost.localdomain>
On Thu, 2006-02-09 at 23:07 +0000, Adrian McMenamin wrote:
> I cannot get aplay to work on my architecture (afaics anyway) eg
>
> / # aplay -D hw:0,0 /bin/busybox
> aplay: pcm.c: 2119: snd_pcm_open: Assertion `pcmp && name' failed.
> Aborted
>
> (Nobody has explained to me what that error is - and my reading of the
> code hasn't helped too much :-< )
>
> So how can I test my driver code?
>
> I can do things like this:
>
> / # cat /bin/busybox > /dev/snd/pcmC0D0p
> ALSA /home/adrian/aica/aica/snd_card_aica.c:151: In snd_aicapcm_pcm_open
> cat: Write Error: File descriptor in bad state
> / # Feb 10 00:01:02 dreamy user.warn kernel:
> ALSA /home/adrian/aica/aica/snd_card_aica.c:151: In snd_aicapcm_pcm_open
>
> But as the above fragment shows this opens the device file but not much
> else (as I assume it has no automagic way of accessing the alsa
> subsystem)
It looks like you fail to set card->id in your __devinit routine. This
field is used by the alsa-lib to find the right config file
in /usr/share/alsa/cards/. For example if alsa-lib is supposed to use
/usr/share/alsa/cards/Audigy2.conf set it to "Audigy2".
The ID is available in /proc/asound/cardX/id.
Here is the code from the emu10k1 driver:
if (!*card->id && c->id) {
int i, n = 0;
strlcpy(card->id, c->id, sizeof(card->id));
for (;;) {
for (i = 0; i < snd_ecards_limit; i++) {
if (snd_cards[i] && !strcmp(snd_cards[i]->id, card->id))
break;
}
if (i >= snd_ecards_limit)
break;
n++;
if (n >= SNDRV_CARDS)
break;
snprintf(card->id, sizeof(card->id), "%s_%d", c->id, n);
}
}
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
next prev parent reply other threads:[~2006-02-09 23:19 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-09 23:07 Can anyone help? Adrian McMenamin
2006-02-09 23:19 ` Lee Revell [this message]
2006-02-09 23:33 ` Adrian McMenamin
2006-02-09 23:39 ` Lee Revell
2006-02-13 0:04 ` Adrian McMenamin
2006-02-13 0:25 ` Lee Revell
2006-02-13 0:34 ` Lee Revell
2006-02-09 23:42 ` Lee Revell
2006-02-13 0:28 ` Lee Revell
2006-02-13 0:42 ` Adrian McMenamin
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=1139527169.30058.130.camel@mindpipe \
--to=rlrevell@joe-job.com \
--cc=adrian@mcmen.demon.co.uk \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.