All of lore.kernel.org
 help / color / mirror / Atom feed
* default is working, but hw:0,0 is do not...
@ 2012-01-24 19:15 Dmitrij K
  2012-01-24 20:00 ` David Henningsson
  0 siblings, 1 reply; 3+ messages in thread
From: Dmitrij K @ 2012-01-24 19:15 UTC (permalink / raw)
  To: alsa-devel

Hi all.

I have problem with openning a device for playback.


this is working code:
snd_pcm_open(&handle, "default", SND_PCM_STREAM_PLAYBACK, 0);


but this is not working:
snd_pcm_open(&handle, "hw:0,0", SND_PCM_STREAM_PLAYBACK, 0);

I get this is: Device or resource busy


PS: I have been started the `phonon' (KDE sound daemon), and the amarok (audio 
player).


My question: what I need to do for correct open "hw:0,0" for multiply playback 
?


Thanks.

The Best Regards.

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

* Re: default is working, but hw:0,0 is do not...
  2012-01-24 19:15 default is working, but hw:0,0 is do not Dmitrij K
@ 2012-01-24 20:00 ` David Henningsson
  2012-01-24 20:12   ` Dmitrij K
  0 siblings, 1 reply; 3+ messages in thread
From: David Henningsson @ 2012-01-24 20:00 UTC (permalink / raw)
  To: Dmitrij K; +Cc: alsa-devel

On 01/24/2012 08:15 PM, Dmitrij K wrote:
> Hi all.
>
> I have problem with openning a device for playback.
>
>
> this is working code:
> snd_pcm_open(&handle, "default", SND_PCM_STREAM_PLAYBACK, 0);
>
>
> but this is not working:
> snd_pcm_open(&handle, "hw:0,0", SND_PCM_STREAM_PLAYBACK, 0);
>
> I get this is: Device or resource busy
>
>
> PS: I have been started the `phonon' (KDE sound daemon), and the amarok (audio
> player).
>
>
> My question: what I need to do for correct open "hw:0,0" for multiply playback
> ?

Make sure that nobody else is using the device at the same time. 
"hw:0,0" requires exclusive access to the device.

You can see who is currently using your sound device(s) using this command:

sudo fuser -v /dev/snd/*

-- 
David Henningsson, Canonical Ltd.
http://launchpad.net/~diwic

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

* Re: default is working, but hw:0,0 is do not...
  2012-01-24 20:00 ` David Henningsson
@ 2012-01-24 20:12   ` Dmitrij K
  0 siblings, 0 replies; 3+ messages in thread
From: Dmitrij K @ 2012-01-24 20:12 UTC (permalink / raw)
  To: alsa-devel

David Henningsson wrote:
> Make sure that nobody else is using the device at the same time.
> "hw:0,0" requires exclusive access to the device.

OK! Thanks for the important information!


I have used RtAudio library (not worked for me), and this is:

RtAudio::StreamOptions options;
options.flags = RTAUDIO_ALSA_USE_DEFAULT;

has solved the problem...


The Best Regards.

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

end of thread, other threads:[~2012-01-24 20:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-24 19:15 default is working, but hw:0,0 is do not Dmitrij K
2012-01-24 20:00 ` David Henningsson
2012-01-24 20:12   ` Dmitrij K

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.