On Wed, Nov 6, 2013 at 7:20 AM, Gerd Hoffmann <kra...@redhat.com> wrote:
>   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;

That would be reasonable.  Can you add a SoB and submit as a patch?

Regards,

Anthony Liguori

> +    }
>      return &conf;
>  }
>
> cheers,
>   Gerd
>
>

Reply via email to