* alsa-oss emulation bug?
@ 2003-11-17 22:02 Roderick Colenbrander
2003-11-18 10:33 ` Takashi Iwai
0 siblings, 1 reply; 2+ messages in thread
From: Roderick Colenbrander @ 2003-11-17 22:02 UTC (permalink / raw)
To: alsa-devel
Hi,
At the moment I'm debugging an alsa-oss emulation related bug. I'm using
alsa .9.8 on a i810 card. Using native alsa code I can query the capabilities
of the card. Alsa tells that only some 16bit formats are supported which is
is correct. When I'm in oss emulation mode, the driver also advertises
various 8bit formats which is wrong. Because of this problem the app I'm
debugging (Wine) is crashing as it tries to use 8bit while it isn't
supported.
After some digging in the alsa oss source I found this in
snd_pcm_oss_get_formats of pcm_oss.c:
if ((err = snd_pcm_oss_get_active_substream(pcm_oss_file, &substream))
< 0)
return err;
if (atomic_read(&substream->runtime->mmap_count)) {
direct = 1;
} else {
snd_pcm_oss_setup_t *setup = substream->oss.setup;
direct = (setup != NULL && setup->direct);
}
if (!direct)
return AFMT_MU_LAW | AFMT_U8 |
AFMT_S16_LE | AFMT_S16_BE |
AFMT_S8 | AFMT_U16_LE |
AFMT_U16_BE;
The supported formats alsa returns in my case is what you see behind the
if(!direct) line, so for some reason direct = 0. As I barely know anything
about alsa I hope you guys can help me out.
Thanks in advance,
Roderick Colenbrander
-------------------------------------------------------
This SF. Net email is sponsored by: GoToMyPC
GoToMyPC is the fast, easy and secure way to access your computer from
any Web browser or wireless device. Click here to Try it Free!
https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: alsa-oss emulation bug?
2003-11-17 22:02 alsa-oss emulation bug? Roderick Colenbrander
@ 2003-11-18 10:33 ` Takashi Iwai
0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2003-11-18 10:33 UTC (permalink / raw)
To: Roderick Colenbrander; +Cc: alsa-devel
At Mon, 17 Nov 2003 23:02:04 +0100,
Roderick Colenbrander wrote:
>
> Hi,
>
> At the moment I'm debugging an alsa-oss emulation related bug. I'm using
> alsa .9.8 on a i810 card. Using native alsa code I can query the capabilities
> of the card. Alsa tells that only some 16bit formats are supported which is
> is correct. When I'm in oss emulation mode, the driver also advertises
> various 8bit formats which is wrong. Because of this problem the app I'm
> debugging (Wine) is crashing as it tries to use 8bit while it isn't
> supported.
>
> After some digging in the alsa oss source I found this in
> snd_pcm_oss_get_formats of pcm_oss.c:
> if ((err = snd_pcm_oss_get_active_substream(pcm_oss_file, &substream))
> < 0)
> return err;
> if (atomic_read(&substream->runtime->mmap_count)) {
> direct = 1;
> } else {
> snd_pcm_oss_setup_t *setup = substream->oss.setup;
> direct = (setup != NULL && setup->direct);
> }
> if (!direct)
> return AFMT_MU_LAW | AFMT_U8 |
> AFMT_S16_LE | AFMT_S16_BE |
> AFMT_S8 | AFMT_U16_LE |
> AFMT_U16_BE;
>
> The supported formats alsa returns in my case is what you see behind the
> if(!direct) line, so for some reason direct = 0. As I barely know anything
> about alsa I hope you guys can help me out.
see alsa-kernel/Documentation/OSS-Emulation.txt, section "PCM mode".
the default (plugin) mode is sometimes problematic when mmap is used.
Takashi
-------------------------------------------------------
This SF. Net email is sponsored by: GoToMyPC
GoToMyPC is the fast, easy and secure way to access your computer from
any Web browser or wireless device. Click here to Try it Free!
https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-11-18 10:33 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-11-17 22:02 alsa-oss emulation bug? Roderick Colenbrander
2003-11-18 10:33 ` Takashi Iwai
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.