I have a diagnosis and a suggested fix.
The ioctl call SNDCTL_DSP_SETTRIGGER is first calling the low-level
trigger function (eg., sb16_audio_trigger) twice. Once from
DMAbuf_launch_output (or from DMAbuf_activate_recording) the second time
directly:
if (changed && audio_devs[dev]->d->trigger)
audio_devs[dev]->d->trigger(dev, bits * audio_devs[dev]->go);
This second call is redundant and causes the reverse stereo. Some cards
(eg. ad1848 based) ignore it. Other cards (SB) restart playing at the
sample which belongs to the wrong channel.
>
> > Linux 2.1.90 introduced a new problem WRT mmapped audio output. It
> > produces clicks (estimated on every 4KB = frag size) where output was
> > smooth in 2.1.89. I suspect some changes in dmabuf.c are responsible
> > for that.
>
> No clicks here with write. I'll test mmap tomorrow
>
I'm using mmap_test.c from
<ftp://ftp.4front-tech.com/ossfree/mmap_test.c>.
Trivial modification to play stereo, 8 bit, 8000 samples/second.
Incrementing the 'extra' from 16 to 128 makes a big improvement. This
points the problem at the value returned by SNDCTL_DSP_GETOPTR, or to
the select call.
Itai
-- Itai Nahshon nahshon@actcom.co.il Also nahshon@vnet.ibm.com- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu