All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Roderick Colenbrander <thunderbird2k@gmx.net>
Cc: alsa-devel@lists.sourceforge.net
Subject: Re: alsa-oss emulation bug?
Date: Tue, 18 Nov 2003 11:33:11 +0100	[thread overview]
Message-ID: <s5hsmkmhspk.wl@alsa2.suse.de> (raw)
In-Reply-To: <200311172302.04469.thunderbird2k@gmx.net>

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

      reply	other threads:[~2003-11-18 10:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-11-17 22:02 alsa-oss emulation bug? Roderick Colenbrander
2003-11-18 10:33 ` Takashi Iwai [this message]

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=s5hsmkmhspk.wl@alsa2.suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@lists.sourceforge.net \
    --cc=thunderbird2k@gmx.net \
    /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.