From: "Clemens Ladisch" <cladisch@fastmail.net>
To: Alan Horstmann <gineera@aspect135.co.uk>,
ALSA devel <alsa-devel@alsa-project.org>
Cc: Takashi Iwai <tiwai@suse.de>
Subject: Re: Alsa-OSS Duplex bug (revisited)
Date: Wed, 30 May 2007 08:47:14 +0200 [thread overview]
Message-ID: <1180507634.27605.1192457693@webmail.messagingengine.com> (raw)
In-Reply-To: <200705292316.17947.gineera@aspect135.co.uk>
Alan Horstmann wrote:
> On Tuesday 29 May 2007 17:55, you wrote:
> > While I see the advantage by your hack (small and backward
> > compatible), I feel that it's too hackish -- it introduces an
> > incompatible way of the existing ioctl.
>
> Do you mean in that ioctls in general are not meant to work like that, in
> effect passing 2 numbers rather than one?
No, packing two values into one numbers is done with other ioctls too,
e.g., SNDCTL_DSP_SETFRAGMENT.
The problem I see is that your patch changes the OSS API in a way that
is incompatible with every implementation other than ALSA's. The whole
purpose of providing the OSS API in the first place is to be compatible
with other implementations.
> > After a quick thought, another possible fix would be to let apps open
> > each direction separately. For that,
> >
> > - add some way to make the given PCM stream to non-fullduplex
> > (proc or module options?)
>
> Are you thinking that if an option were set, Alsa-OSS would create separate
> devices for capture and playback rather than a single duplex device?
No; just a way to disable DSP_CAP_DUPLEX and/or SNDCTL_DSP_SETDUPLEX.
When these do not work, applications are forced to open the playback
and capture devices separately, e.g.:
fd_playback = open("/dev/dsp", O_WRONLY);
fd_capture = open("/dev/dsp", O_RDONLY);
> > - change portaudio to open each direction separately, O_RDONLY and
> > O_WRONLY at first, then use O_RDWR as fallback
This would be the preferred way. After all, this is the only way that
is possible with the existing OSS API when you want to use different
sample formats, and it is recommended in all cases (see
<http://manuals.opensound.com/developer/full_duplex.html>).
Regards,
Clemens
next prev parent reply other threads:[~2007-05-30 6:47 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-27 22:23 Alsa-OSS Duplex bug (revisited) Alan Horstmann
2007-05-29 16:55 ` Takashi Iwai
2007-05-29 22:16 ` Alan Horstmann
2007-05-30 6:47 ` Clemens Ladisch [this message]
2007-05-30 17:05 ` Takashi Iwai
2007-05-30 22:12 ` Alan Horstmann
2007-05-31 21:00 ` Alan Horstmann
2007-06-01 9:56 ` Takashi Iwai
2007-06-03 19:55 ` Alan Horstmann
2007-06-04 8:45 ` Clemens Ladisch
2007-06-04 11:51 ` Alan Horstmann
2007-06-04 8:50 ` Takashi Iwai
2007-06-04 11:53 ` Alan Horstmann
2007-06-04 12:21 ` Takashi Iwai
2007-06-04 20:42 ` Alan Horstmann
2007-06-04 21:14 ` Takashi Iwai
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=1180507634.27605.1192457693@webmail.messagingengine.com \
--to=cladisch@fastmail.net \
--cc=alsa-devel@alsa-project.org \
--cc=gineera@aspect135.co.uk \
--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 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.