All of lore.kernel.org
 help / color / mirror / Atom feed
From: thomas schorpp <thomas.schorpp@googlemail.com>
To: alsa-devel@alsa-project.org
Cc: Ekiga-devel-list@gnome.org
Subject: Re: Pls don't require exclusive Alsa audio device access, use snd_pcm_dmix_open ()
Date: Wed, 28 Nov 2007 10:06:18 +0100	[thread overview]
Message-ID: <474D2F8A.9090001@googlemail.com> (raw)
In-Reply-To: <47201223.5050304@googlemail.com>

thomas schorpp wrote:
> thomas schorpp wrote:
>> since dmix is enabled by libasound2 by default for cards not 
>> supporting h/w mixing.
>>
>> skype can access the audio device using snd_pcm_dmix_open () if other 
>> app has already opened it, ekiga throws error msgboxes.

skype      5089   skype  mem    CHR 116,24       7792 /dev/snd/pcmC0D0c
skype      5089   skype  mem    CHR 116,16       7784 /dev/snd/pcmC0D0p
kio_file   5422 schorpp    0r   CHR    1,3        956 /dev/null
kio_uiser  6025 schorpp    0r   CHR    1,3        956 /dev/null
iceape-bi 30161 schorpp  mem    CHR 116,16       7784 /dev/snd/pcmC0D0p
iceape-bi 30161 schorpp    0r   CHR    1,3        956 /dev/null
iceape-bi 30161 schorpp   66r   CHR 116,33       7473 /dev/snd/timer
iceape-bi 30161 schorpp   67u   CHR 116,16       7784 /dev/snd/pcmC0D0p

>>
>> y
>> tom
>>
> 
> hmm. takeback. future removal warning in alsa lib doc. well for 
> experiments (in ptlib plugin):
> 
> Index: sound_alsa.cxx
> ===================================================================
> --- sound_alsa.cxx      (Revision 18763)
> +++ sound_alsa.cxx      (Arbeitskopie)
> @@ -344,13 +344,15 @@
>     }
>   }
> 
> -  if (snd_pcm_open (&os_handle, real_device_name, stream, 
> SND_PCM_NONBLOCK) < 0) {
> +  if (snd_pcm_open (&os_handle, real_device_name, stream, 
> SND_PCM_NONBLOCK) < 0)
> 
> -    PTRACE (1, "ALSA\tOpen Failed");
> -    return FALSE;
> -  }
> -  else
> -    snd_pcm_nonblock (os_handle, 0);
> +    if (_snd_pcm_dmix_open (&os_handle, real_device_name, snd_config_t* 
> root, snd_config_t* sconf, stream, SND_PCM_NONBLOCK) < 0) {
> +
> +      PTRACE (1, "ALSA\tOpen Failed");
> +      return FALSE;
> +    }
> +    else
> +      snd_pcm_nonblock (os_handle, 0);
> 
>   /* save internal parameters */
>   device = real_device_name;
> 
> i cant find any sample code for the missing params, google is full of 
> alsa user issues ;)
> 
> y
> tom
> 

@alsa devs
any hints?

       reply	other threads:[~2007-11-28  9:06 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <471FE2A7.9080309@googlemail.com>
     [not found] ` <47201223.5050304@googlemail.com>
2007-11-28  9:06   ` thomas schorpp [this message]
2007-11-28  9:17     ` Pls don't require exclusive Alsa audio device access, use snd_pcm_dmix_open () Jaroslav Kysela
2007-11-28 11:36       ` Colin Guthrie
2007-11-28 16:01         ` [Ekiga-devel-list] " thomas schorpp
2007-11-28 16:22           ` Takashi Iwai
2007-11-28 18:16             ` thomas schorpp

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=474D2F8A.9090001@googlemail.com \
    --to=thomas.schorpp@googlemail.com \
    --cc=Ekiga-devel-list@gnome.org \
    --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.