* SND_PCM_OPEN_PLAYBACK & SND_PCM_OPEN_CAPTURE
@ 2003-08-13 10:05 Damien Sandras
2003-08-13 11:50 ` Damien Sandras
0 siblings, 1 reply; 5+ messages in thread
From: Damien Sandras @ 2003-08-13 10:05 UTC (permalink / raw)
To: alsa-devel
Hello,
I would like to know if it is always possible to open the same device
twice at the same time : once with SND_PCM_OPEN_PLAYBACK and once with
SND_PCM_OPEN_CAPTURE.
I know it is not possible with OSS, but I wanted to know if ALSA makes
it possible or if the device has to be opened only once with
SND_PCM_OPEN_DUPLEX in that case.
Thanks a lot!
--
Damien Sandras <dsandras@seconix.com>
-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: SND_PCM_OPEN_PLAYBACK & SND_PCM_OPEN_CAPTURE
2003-08-13 10:05 SND_PCM_OPEN_PLAYBACK & SND_PCM_OPEN_CAPTURE Damien Sandras
@ 2003-08-13 11:50 ` Damien Sandras
2003-08-13 13:58 ` Paul Davis
0 siblings, 1 reply; 5+ messages in thread
From: Damien Sandras @ 2003-08-13 11:50 UTC (permalink / raw)
To: alsa-devel
I just noticed I was looking at the old API :)
With the new API, I think it always work to open the same device twice
(once for PLAYBACK STREAM and once for CAPTURE STREAM) at least for
full-duplex soundcards. If I'm wrong, can somebody correct me?
Thanks,
Le mer 13/08/2003 à 12:05, Damien Sandras a écrit :
> Hello,
>
> I would like to know if it is always possible to open the same device
> twice at the same time : once with SND_PCM_OPEN_PLAYBACK and once with
> SND_PCM_OPEN_CAPTURE.
>
> I know it is not possible with OSS, but I wanted to know if ALSA makes
> it possible or if the device has to be opened only once with
> SND_PCM_OPEN_DUPLEX in that case.
>
> Thanks a lot!
--
Damien Sandras <dsandras@seconix.com>
-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Re: SND_PCM_OPEN_PLAYBACK & SND_PCM_OPEN_CAPTURE
2003-08-13 11:50 ` Damien Sandras
@ 2003-08-13 13:58 ` Paul Davis
2003-08-13 14:56 ` Damien Sandras
0 siblings, 1 reply; 5+ messages in thread
From: Paul Davis @ 2003-08-13 13:58 UTC (permalink / raw)
To: Damien Sandras; +Cc: alsa-devel
>I just noticed I was looking at the old API :)
>
>With the new API, I think it always work to open the same device twice
>(once for PLAYBACK STREAM and once for CAPTURE STREAM) at least for
>full-duplex soundcards. If I'm wrong, can somebody correct me?
yes, if the h/w can do full-duplex, then this will always work (and as
you noticed, there is no "DUPLEX" mode anymore - you always get one
handle for playback and a different one for capture).
note that some cards (the early SB series come to mind) will not
support the same parameters for playback and capture when opened for
duplex usage, so it can a bit more complex than you'd really like.
--p
-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Re: SND_PCM_OPEN_PLAYBACK & SND_PCM_OPEN_CAPTURE
2003-08-13 13:58 ` Paul Davis
@ 2003-08-13 14:56 ` Damien Sandras
2003-08-13 15:18 ` Paul Davis
0 siblings, 1 reply; 5+ messages in thread
From: Damien Sandras @ 2003-08-13 14:56 UTC (permalink / raw)
To: Paul Davis; +Cc: alsa-devel
Le mer 13/08/2003 à 15:58, Paul Davis a écrit :
> yes, if the h/w can do full-duplex, then this will always work (and as
> you noticed, there is no "DUPLEX" mode anymore - you always get one
> handle for playback and a different one for capture).
>
That is a good news for me.
> note that some cards (the early SB series come to mind) will not
> support the same parameters for playback and capture when opened for
> duplex usage, so it can a bit more complex than you'd really like.
>
How can I determine that and solve that problem? Is there a source code
example that I could look at?
Many thanks for your support.
I'm currently porting GnomeMeeting to be able to use native ALSA.
--
Damien Sandras <dsandras@seconix.com>
-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Re: SND_PCM_OPEN_PLAYBACK & SND_PCM_OPEN_CAPTURE
2003-08-13 14:56 ` Damien Sandras
@ 2003-08-13 15:18 ` Paul Davis
0 siblings, 0 replies; 5+ messages in thread
From: Paul Davis @ 2003-08-13 15:18 UTC (permalink / raw)
To: Damien Sandras; +Cc: alsa-devel
>> note that some cards (the early SB series come to mind) will not
>> support the same parameters for playback and capture when opened for
>> duplex usage, so it can a bit more complex than you'd really like.
>>
>
>How can I determine that and solve that problem? Is there a source code
>example that I could look at?
you can only find out by trying it.
if you always open "plughw:N" (where N is going to be 0 for most
users, since most people have only soundcard), this won't matter,
because a "plughw" device will support (almost) any parameters you
use.
the limitations of the hardware only matter if you try to open "hw:N",
which will expose the stupid (cheap) design of the soundcard. there is
no workaround for "hw" device other than to use a "plughw" device
instead.
--p
-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2003-08-13 15:18 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-08-13 10:05 SND_PCM_OPEN_PLAYBACK & SND_PCM_OPEN_CAPTURE Damien Sandras
2003-08-13 11:50 ` Damien Sandras
2003-08-13 13:58 ` Paul Davis
2003-08-13 14:56 ` Damien Sandras
2003-08-13 15:18 ` Paul Davis
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.