At Mon, 19 Jun 2006 15:15:28 +0100, Alan H wrote: > > There is considered by some to be a duplex bug in alsa-OSS, which affects for > example audacity, which uses portaudio. As this affects myself very much I > have investigated. > > The cause is that the OSS ioctl SNDCTL_DSP_CHANNELS cannot set separately the > playback and capture channels. With the original OSS this was not a problem > AFAICT because separate playback and capture devices are created. Really? How? /dev/dsp0 and /dev/dsp1 for playback and capture? > However, > with the alsa-emulation, only a single device is created. Thus it is not > possible to record 4 chs while playing 2. > > It seems to me that some method of separately setting playback and capture > channels should be included in the emulation. This could be through new > ioctls eg SNDCTL_DSP_PCHANNELS and SNDCTL_DSP_CCHANNELS; Introducing new ioctls doesn't make sense because the purpose of aoss is to emulate the OSS, not creating a new one. > I have devised an > alternative using the existing SNDCTL_DSP_CHANNELS, by passing 'channels' > calculated as (playback_channels + 256 * capture_channels) so that in effect > the first 8 bits are playback, the 2nd 8 bits are capture. The result is > compatible with the existing, as numbers < 255 are treated in the existing > way, setting playback and capture the same if the sub-streams are active. > Thus it has simply added an enhanced mode. > > Diff is attached; I wonder what your thoughts are on this?? I have been able > to very simply patch portaudio to use this facility and the system now works > great. I don't think it's a right solution. This simply introduces an incompatibility with the existing OSS ioctl... Takashi _______________________________________________ Alsa-devel mailing list Alsa-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.sourceforge.net/lists/listinfo/alsa-devel