[alsa-devel] Possible problem with snd_pcm_oss_sync()
Takashi Iwai
tiwai at suse.de
Wed May 21 12:44:30 CEST 2008
At Tue, 20 May 2008 11:03:42 -0500,
Timur Tabi wrote:
>
>
>
> -------- Original Message --------
> Subject: RE: Regarding MPC8610 BSP question and issue
> Date: Tue, 20 May 2008 08:55:46 -0700
> From: Hayasaka Manabu <manabu.hayasaka at freescale.com>
> To: Hayasaka Manabu <manabu.hayasaka at freescale.com>, Johnson Kelly
> <Kelly.Johnson at freescale.com>
> CC: sun york <yorksun at freescale.com>, Namiki Ayumi
> <namiki at freescale.com>, Beck Glenn <Glenn.Beck at freescale.com>, Cox Kevin
> <K.Cox at freescale.com>, Hamano Masahiro <M.Hamano at freescale.com>, Tabi
> Timur <timur at freescale.com>
> References:
> <E03EE6E38549E949AE8138F60493E1E801C49A0C at zja67exm20.fsl.freescale.net>
> <4807899D.3000901 at freescale.com>
> <E03EE6E38549E949AE8138F60493E1E801DA1B11 at zja67exm20.fsl.freescale.net>
> <48110FCF.7070302 at freescale.com>
> <BD243C8D8F65694A966948E9D51F9815C29409 at zja67exm21.fsl.freescale.net>
> <48189540.9060309 at freescale.com>
> <BD243C8D8F65694A966948E9D51F9815C29422 at zja67exm21.fsl.freescale.net>
> <E03EE6E38549E949AE8138F60493E1E801DA25D9 at zja67exm20.fsl.freescale.net>
> <4821CA02.2020504 at freescale.com>
> <E03EE6E38549E949AE8138F60493E1E801FA11C8 at zja67exm20.fsl.freescale.net>
> <4829C444.7010206 at freescale.com>
> <E03EE6E38549E949AE8138F60493E1E801FA13D2 at zja67exm20.fsl.freescale.net>
> <482B1D10.7090402 at freescale.com> <482B2699.8020409 at freescale.com>
>
> I'm working with a customer that has discovered a possible problem with OSS
> emulation. Unfortunately, I don't have a lot of experience with OSS, so I need
> help understanding whether the customer's observations point to a real problem
> or not.
>
> The customer is using an old application called "bplay" to test OSS audio
> support on our hardware. The application works fine on x86, but fails on our
> PowerPC board. It could be an endian issue, but I doubt it.
>
> Here is the forwarded email (slightly edited). Can someone familiar with the
> OSS "sync" functionality comment?
>
> ---------------
>
> They reported that it seemed some ioctl commands in the OSS emulation did not
> work correctly.
>
> The tested procedure of the ioctl commands are as following,
>
> #1) Stopped audio stream output after doing followings:
> 1. Opening /dev/mixer
> 2. Getting a channel value (0x00000001) that is used for "ioctl(fd,
> SOUND_MIXER_READ_DEVMASK, &Sndsts);".
> 3. Write audio volume information by "ioctl(fd,
> SOUND_MIXER_WRITE_VOLUME, &Value);",
This looks weird. The mixer ioctl is independent from the PCM,
basically.
> #2) Stopped audio stream output after doing following:
> 1. Opening /dev/dsp
> 2. Executing command "ioctl(fd, SNDCTL_DSP_SYNC, NULL);",
The sync ioctl is to block the operation until all samples are
played. But, it's a bit strange that the stream stops after this. It
should be an underrun instead (and OSS recovers by itself).
Takashi
>
> XXXX found that by commenting out the "sync_audio" function on the source
> code of "bplay" made "bplay" work. So XXXX suspects the implementation of the
> ioctl on the OSS emulation may have a problem.
>
> --
> Timur Tabi
> Linux kernel developer at Freescale
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel at alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
>
More information about the Alsa-devel
mailing list