From: Gerd Hoffmann <kraxel@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Andreas Faerber <afaerber@suse.de>,
QEMU Developers <qemu-devel@nongnu.org>,
Anthony Liguori <anthony@codemonkey.ws>,
Anthony Liguori <aliguori@amazon.com>
Subject: Re: [Qemu-devel] [PATCH] ossaudio: do not enable by default
Date: Wed, 06 Nov 2013 16:20:55 +0100 [thread overview]
Message-ID: <1383751255.1739.102.camel@nilsson.home.kraxel.org> (raw)
In-Reply-To: <CAFEAcA_u5B7LZTUe5fx+67MNC+Wdah2wNMPDC7VR8Z8LMbtnMA@mail.gmail.com>
Hi,
> > static void *oss_audio_init (void)
> > {
> > return &conf;
> > }
> >
> > It never fails.
>
> OK, that's a bug. (I'd misread the calling function
> audio_driver_init() as also checking that the init_in
> and init_out functions succeeded, which it does not.)
>
> > So audio is broken on Linux by default today. This
> > patch unbreaks it.
>
> No, this patch is papering over the problem by giving us
> a default config where audio works for nobody.
>
> If you want to fix that problem you need to do it by
> making the oss_audio_init() function return failure
> on init.
And that is actually simple enough that we can consider it for 1.7:
static void *oss_audio_init (void)
{
+ if (access(conf.devpath_in, R_OK | W_OK) < 0 ||
+ access(conf.devpath_out, R_OK | W_OK) < 0) {
+ return NULL;
+ }
return &conf;
}
cheers,
Gerd
next prev parent reply other threads:[~2013-11-06 15:21 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-03 16:45 [Qemu-devel] [PATCH] ossaudio: do not enable by default Anthony Liguori
2013-11-03 17:12 ` Andreas Färber
2013-11-03 17:47 ` Anthony Liguori
2013-11-04 9:49 ` Gerd Hoffmann
2013-11-05 19:57 ` Anthony Liguori
2013-11-05 20:18 ` Peter Maydell
2013-11-05 20:34 ` Peter Maydell
2013-11-06 9:18 ` Gerd Hoffmann
2013-11-06 10:48 ` Peter Maydell
2013-11-06 11:15 ` Gerd Hoffmann
2013-11-06 14:54 ` Anthony Liguori
2013-11-06 15:00 ` Peter Maydell
2013-11-06 15:20 ` Gerd Hoffmann [this message]
2013-11-06 17:01 ` Anthony Liguori
2013-11-07 11:33 ` Gerd Hoffmann
2013-11-04 11:06 ` Peter Maydell
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=1383751255.1739.102.camel@nilsson.home.kraxel.org \
--to=kraxel@redhat.com \
--cc=afaerber@suse.de \
--cc=aliguori@amazon.com \
--cc=anthony@codemonkey.ws \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).