* [Qemu-devel] [PULL for-1.7 0/2] ossaudio: fix oss_audio_init
@ 2013-11-07 11:32 Gerd Hoffmann
2013-11-07 11:32 ` [Qemu-devel] [PATCH 1/2] Revert "ossaudio: do not enable by default" Gerd Hoffmann
2013-11-07 11:32 ` [Qemu-devel] [PATCH 2/2] ossaudio: check for oss support in oss_audio_init Gerd Hoffmann
0 siblings, 2 replies; 3+ messages in thread
From: Gerd Hoffmann @ 2013-11-07 11:32 UTC (permalink / raw)
To: qemu-devel; +Cc: Gerd Hoffmann, Anthony Liguori
Hi,
Revert broken ossaudio patch, fix oss init for real.
please pull,
Gerd
The following changes since commit c2d30667760e3d7b81290d801e567d4f758825ca:
rtc: remove dead SQW IRQ code (2013-11-05 20:04:03 -0800)
are available in the git repository at:
git://git.kraxel.org/qemu audio.3
for you to fetch changes up to 73204cffe55ce65b3a344afc3da637d67beb8c32:
ossaudio: check for oss support in oss_audio_init (2013-11-07 12:26:00 +0100)
----------------------------------------------------------------
Gerd Hoffmann (2):
Revert "ossaudio: do not enable by default"
ossaudio: check for oss support in oss_audio_init
audio/ossaudio.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Qemu-devel] [PATCH 1/2] Revert "ossaudio: do not enable by default"
2013-11-07 11:32 [Qemu-devel] [PULL for-1.7 0/2] ossaudio: fix oss_audio_init Gerd Hoffmann
@ 2013-11-07 11:32 ` Gerd Hoffmann
2013-11-07 11:32 ` [Qemu-devel] [PATCH 2/2] ossaudio: check for oss support in oss_audio_init Gerd Hoffmann
1 sibling, 0 replies; 3+ messages in thread
From: Gerd Hoffmann @ 2013-11-07 11:32 UTC (permalink / raw)
To: qemu-devel; +Cc: Vassili Karpov (malc), Gerd Hoffmann, Anthony Liguori
This reverts commit c905c5012ac0c6fde3b8094d2206a3139deddba2.
There is a better fix for the issue at hand.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
audio/ossaudio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/audio/ossaudio.c b/audio/ossaudio.c
index 3e04a58..007c641 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 = 0,
+ .can_be_default = 1,
.max_voices_out = INT_MAX,
.max_voices_in = INT_MAX,
.voice_size_out = sizeof (OSSVoiceOut),
--
1.8.3.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [Qemu-devel] [PATCH 2/2] ossaudio: check for oss support in oss_audio_init
2013-11-07 11:32 [Qemu-devel] [PULL for-1.7 0/2] ossaudio: fix oss_audio_init Gerd Hoffmann
2013-11-07 11:32 ` [Qemu-devel] [PATCH 1/2] Revert "ossaudio: do not enable by default" Gerd Hoffmann
@ 2013-11-07 11:32 ` Gerd Hoffmann
1 sibling, 0 replies; 3+ messages in thread
From: Gerd Hoffmann @ 2013-11-07 11:32 UTC (permalink / raw)
To: qemu-devel; +Cc: Vassili Karpov (malc), Gerd Hoffmann, Anthony Liguori
Check whenever the device path (/dev/dsp by default) exists and qemu is
allowed to access it. Return NULL if it isn't, so ossaudio will not
be used on systems wihtout oss support (increasinly common on modern
linux systems).
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
audio/ossaudio.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/audio/ossaudio.c b/audio/ossaudio.c
index 007c641..5a73716 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;
}
--
1.8.3.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-11-07 11:33 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-07 11:32 [Qemu-devel] [PULL for-1.7 0/2] ossaudio: fix oss_audio_init Gerd Hoffmann
2013-11-07 11:32 ` [Qemu-devel] [PATCH 1/2] Revert "ossaudio: do not enable by default" Gerd Hoffmann
2013-11-07 11:32 ` [Qemu-devel] [PATCH 2/2] ossaudio: check for oss support in oss_audio_init Gerd Hoffmann
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).