diff options
author | Anthony Liguori <aliguori@amazon.com> | 2013-11-13 11:46:23 -0800 |
---|---|---|
committer | Anthony Liguori <aliguori@amazon.com> | 2013-11-13 11:46:23 -0800 |
commit | 9f43a3f541019a5836247c8cfdfc5fef89cf077d (patch) | |
tree | 9c1fe8814f8acbc13a7463645092abf4b9bb1916 | |
parent | 6bddfae306001c6e474ff97ef59c518568ea5af4 (diff) | |
parent | 73204cffe55ce65b3a344afc3da637d67beb8c32 (diff) |
Merge remote-tracking branch 'kraxel/audio.3' into staging
# By Gerd Hoffmann
# Via Gerd Hoffmann
* kraxel/audio.3:
ossaudio: check for oss support in oss_audio_init
Revert "ossaudio: do not enable by default"
Message-id: 1383823947-5132-1-git-send-email-kraxel@redhat.com
Signed-off-by: Anthony Liguori <aliguori@amazon.com>
-rw-r--r-- | audio/ossaudio.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/audio/ossaudio.c b/audio/ossaudio.c index 3e04a58376..5a73716032 100644 --- a/audio/ossaudio.c +++ b/audio/ossaudio.c @@ -849,6 +849,10 @@ static int oss_ctl_in (HWVoiceIn *hw, int cmd, ...) 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; } @@ -932,7 +936,7 @@ struct audio_driver oss_audio_driver = { .init = oss_audio_init, .fini = oss_audio_fini, .pcm_ops = &oss_pcm_ops, - .can_be_default = 0, + .can_be_default = 1, .max_voices_out = INT_MAX, .max_voices_in = INT_MAX, .voice_size_out = sizeof (OSSVoiceOut), |