diff mbox

ossaudio: do not enable by default

Message ID 1383497154-9271-1-git-send-email-aliguori@amazon.com
State New
Headers show

Commit Message

Anthony Liguori Nov. 3, 2013, 4:45 p.m. UTC
Modern Linux's no longer support /dev/dsp so enabling it by
default causes audio failures on newer Linux distros.

Signed-off-by: Anthony Liguori <aliguori@amazon.com>
---
 audio/ossaudio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Andreas Färber Nov. 3, 2013, 5:12 p.m. UTC | #1
Am 03.11.2013 17:45, schrieb Anthony Liguori:
> Modern Linux's no longer support /dev/dsp so enabling it by
> default causes audio failures on newer Linux distros.
> 
> Signed-off-by: Anthony Liguori <aliguori@amazon.com>
> ---
>  audio/ossaudio.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

With my current config, this patch is not making a change. make
check-qtest-arm succeeds on qom-next branch with and without it without
any annoying output. So FWIW

Tested-by: Andreas Färber <afaerber@suse.de>

Note that author and Sob differ, probably not intentionally.

Regards,
Andreas
Anthony Liguori Nov. 3, 2013, 5:47 p.m. UTC | #2
On Sun, Nov 3, 2013 at 9:12 AM, Andreas Färber <afaerber@suse.de> wrote:
> Am 03.11.2013 17:45, schrieb Anthony Liguori:
>> Modern Linux's no longer support /dev/dsp so enabling it by
>> default causes audio failures on newer Linux distros.
>>
>> Signed-off-by: Anthony Liguori <aliguori@amazon.com>
>> ---
>>  audio/ossaudio.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> With my current config, this patch is not making a change. make
> check-qtest-arm succeeds on qom-next branch with and without it without
> any annoying output. So FWIW
>
> Tested-by: Andreas Färber <afaerber@suse.de>
>
> Note that author and Sob differ, probably not intentionally.

Nope, thanks.

Regards,

Anthony Liguori
>
> Regards,
> Andreas
>
> --
> SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
> GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
Peter Maydell Nov. 4, 2013, 11:06 a.m. UTC | #3
On 3 November 2013 16:45, Anthony Liguori <anthony@codemonkey.ws> wrote:
> Modern Linux's no longer support /dev/dsp so enabling it by
> default causes audio failures on newer Linux distros.
>
> Signed-off-by: Anthony Liguori <aliguori@amazon.com>
> ---
>  audio/ossaudio.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/audio/ossaudio.c b/audio/ossaudio.c
> index 007c641..3e04a58 100644
> --- a/audio/ossaudio.c
> +++ b/audio/ossaudio.c
> @@ -932,7 +932,7 @@ struct audio_driver oss_audio_driver = {
>      .init           = oss_audio_init,
>      .fini           = oss_audio_fini,
>      .pcm_ops        = &oss_pcm_ops,
> -    .can_be_default = 1,
> +    .can_be_default = 0,
>      .max_voices_out = INT_MAX,
>      .max_voices_in  = INT_MAX,
>      .voice_size_out = sizeof (OSSVoiceOut),

This doesn't look like the right fix for the problem
given in the commit message. If the oss init function
doesn't cleanly return a failure so we can loop round
and try another driver then the init function should
be fixed. If QEMU code itself is printing warnings
then we should silence them. If you're just seeing
warnings from some system audio library (ALSA/pulse/etc)
then either file upstream bugs or just pass configure
the correct audio driver option for your distro.

thanks
-- PMM
diff mbox

Patch

diff --git a/audio/ossaudio.c b/audio/ossaudio.c
index 007c641..3e04a58 100644
--- a/audio/ossaudio.c
+++ b/audio/ossaudio.c
@@ -932,7 +932,7 @@  struct audio_driver oss_audio_driver = {
     .init           = oss_audio_init,
     .fini           = oss_audio_fini,
     .pcm_ops        = &oss_pcm_ops,
-    .can_be_default = 1,
+    .can_be_default = 0,
     .max_voices_out = INT_MAX,
     .max_voices_in  = INT_MAX,
     .voice_size_out = sizeof (OSSVoiceOut),