Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: stan <stanl@cox.net>
To: Takashi Iwai <tiwai@suse.de>,
	ALSA Developers <alsa-devel@alsa-project.org>
Subject: Re: Unable to open plughw:0,0 from user program.
Date: Thu, 23 Aug 2007 14:02:56 -0700	[thread overview]
Message-ID: <46CDF600.6030509@cox.net> (raw)
In-Reply-To: <s5hlkc2yrax.wl%tiwai@suse.de>

Takashi Iwai wrote:
> At Thu, 23 Aug 2007 11:44:56 -0700,
> stan wrote:
>   
>> Hi,
>>
>> I am unable to use plughw:0,0 as a device string while calling
>> err = snd_pcm_open (&alsa_dev, hw_from_default, SND_PCM_STREAM_PLAYBACK, 0);
>>
>> The same call works with hw_from_default == 'default', but fails when it 
>> is 'plughw:0,0'.
>> The error is
>> cannot open audio device "plughw:0,0" (Device or resource busy)
>>     
>
> Maybe the devce is really in use?
> Try "fuser /dev/snd/*"
>
>   
I don't think so.  Here is the output of fuser /dev/snd/*
/dev/snd/pcmC0D0p:    3069m
/dev/snd/timer:       3069

And I open default just before this in order to get its info so I can 
build the plughw.
Default device number (0)
Default subdevice number (0)
Default stream number (0)
Default card number (-1)
Default id (dmix:0,FORMAT=S32_LE)
Default name (dmix:0,FORMAT=S32_LE)
Default subname (dmix:0,FORMAT=S32_LE)
Default dev_class (0)
Default dev_subclass (0)
Default subdevices_count (1)
Default subdevices_avail (0)
Plughw  plughw:0,0  numchars 10
cannot open audio device "plughw:0,0" (Device or resource busy)

>> I am using the latest snapshot of alsa-lib, alsa-lib20070821.  I tried 
>> debugging but I cannot trace through the macros.  As near as I can tell 
>> there have been no changes to alsa.conf, and this worked just fine 
>> before the latest upgrade alsa package alsa-lib.1.0.14-3
>>
>> Is this a deliberate change in alsa that is known about, and is there a 
>> way to still get the functionality?
>>     
>
> The old library binary might still remain.  Some distros install
> libasound in /lib (or /lib64), instead of /usr/lib (or /usr/lib64).
>
>   
I'm changing  the links to point to the new library, and adding an alsa 
file in /etc/ld.so.conf.d/ so that the cache points to my library.  When 
I run ldd on the binary it points to the library I've compiled.
 ldd discord
        linux-gate.so.1 =>  (0x00110000)
        libm.so.6 => /lib/libm.so.6 (0x00939000)
        libpthread.so.0 => /lib/libpthread.so.0 (0x0096b000)
*        libasound.so.2 => /usr/local/lib/alsa/libasound.so.2 (0x00111000)*
        libncurses.so.5 => /lib/libncurses.so.5 (0x06707000)
        libsndfile.so.1 => /usr/lib/libsndfile.so.1 (0x001f7000)
        libsamplerate.so.0 => /usr/lib/libsamplerate.so.0 (0x00257000)
        libc.so.6 => /lib/libc.so.6 (0x007e2000)
        /lib/ld-linux.so.2 (0x007c3000)
        libdl.so.2 => /lib/libdl.so.2 (0x00964000)
        libtinfo.so.5 => /lib/libtinfo.so.5 (0x066ed000)

> Takashi
>
>   
I can see it call snd_config_search_alias_hooks () in conf.c, but lose 
the debug in the macros, and it comes back from the macros with the 
negative error code.

Thanks for your help.

  reply	other threads:[~2007-08-23 21:02 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-23 18:44 Unable to open plughw:0,0 from user program stan
2007-08-23 18:48 ` stan
2007-08-23 19:38 ` Takashi Iwai
2007-08-23 21:02   ` stan [this message]
2007-08-23 21:29     ` Lee Revell
2007-08-23 21:50       ` stan
2007-08-23 22:13         ` Lee Revell
2007-08-23 22:31           ` stan

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=46CDF600.6030509@cox.net \
    --to=stanl@cox.net \
    --cc=alsa-devel@alsa-project.org \
    --cc=tiwai@suse.de \
    /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