[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 20/20] ossaudio: use trace events instead of debug co
From: |
Gerd Hoffmann |
Subject: |
[Qemu-devel] [PULL 20/20] ossaudio: use trace events instead of debug config flag |
Date: |
Mon, 15 Jun 2015 14:28:11 +0200 |
From: Kővágó, Zoltán <address@hidden>
Signed-off-by: Kővágó, Zoltán <address@hidden>
Signed-off-by: Gerd Hoffmann <address@hidden>
---
audio/ossaudio.c | 25 ++++---------------------
trace-events | 4 ++++
2 files changed, 8 insertions(+), 21 deletions(-)
diff --git a/audio/ossaudio.c b/audio/ossaudio.c
index bdc4b76..11e76a1 100644
--- a/audio/ossaudio.c
+++ b/audio/ossaudio.c
@@ -30,6 +30,7 @@
#include "qemu/main-loop.h"
#include "qemu/host-utils.h"
#include "audio.h"
+#include "trace.h"
#define AUDIO_CAP "oss"
#include "audio_int.h"
@@ -44,7 +45,6 @@ typedef struct OSSConf {
int fragsize;
const char *devpath_out;
const char *devpath_in;
- int debug;
int exclusive;
int policy;
} OSSConf;
@@ -314,9 +314,7 @@ static int oss_open (int in, struct oss_params *req,
int version;
if (!oss_get_version (fd, &version, typ)) {
- if (conf->debug) {
- dolog ("OSS version = %#x\n", version);
- }
+ trace_oss_version(version);
if (version >= 0x040000) {
int policy = conf->policy;
@@ -427,7 +425,6 @@ static int oss_run_out (HWVoiceOut *hw, int live)
struct audio_buf_info abinfo;
struct count_info cntinfo;
int bufsize;
- OSSConf *conf = oss->conf;
bufsize = hw->samples << hw->info.shift;
@@ -452,19 +449,12 @@ static int oss_run_out (HWVoiceOut *hw, int live)
}
if (abinfo.bytes > bufsize) {
- if (conf->debug) {
- dolog ("warning: Invalid available size, size=%d bufsize=%d\n"
- "please report your OS/audio hw to address@hidden",
- abinfo.bytes, bufsize);
- }
+ trace_oss_invalid_available_size(abinfo.bytes, bufsize);
abinfo.bytes = bufsize;
}
if (abinfo.bytes < 0) {
- if (conf->debug) {
- dolog ("warning: Invalid available size, size=%d bufsize=%d\n",
- abinfo.bytes, bufsize);
- }
+ trace_oss_invalid_available_size(abinfo.bytes, bufsize);
return 0;
}
@@ -852,7 +842,6 @@ static OSSConf glob_conf = {
.fragsize = 4096,
.devpath_out = "/dev/dsp",
.devpath_in = "/dev/dsp",
- .debug = 0,
.exclusive = 0,
.policy = 5
};
@@ -919,12 +908,6 @@ static struct audio_option oss_options[] = {
.descr = "Set the timing policy of the device, -1 to use fragment
mode",
},
#endif
- {
- .name = "DEBUG",
- .tag = AUD_OPT_BOOL,
- .valp = &glob_conf.debug,
- .descr = "Turn on some debugging messages"
- },
{ /* End of list */ }
};
diff --git a/trace-events b/trace-events
index 409a64a..52b7efa 100644
--- a/trace-events
+++ b/trace-events
@@ -1644,3 +1644,7 @@ alsa_xrun_in(void) "Recovering from capture xrun"
alsa_resume_out(void) "Resuming suspended output stream"
alsa_resume_in(void) "Resuming suspended input stream"
alsa_no_frames(int state) "No frames available and ALSA state is %d"
+
+# audio/ossaudio.c
+oss_version(int version) "OSS version = %#x"
+oss_invalid_available_size(int size, int bufsize) "Invalid available size,
size=%d bufsize=%d"
--
1.8.3.1
- [Qemu-devel] [PULL 03/20] audio: remove winwave audio driver, (continued)
- [Qemu-devel] [PULL 03/20] audio: remove winwave audio driver, Gerd Hoffmann, 2015/06/15
- [Qemu-devel] [PULL 08/20] ossaudio: do not use global variables, Gerd Hoffmann, 2015/06/15
- [Qemu-devel] [PULL 16/20] audio: remove plive, Gerd Hoffmann, 2015/06/15
- [Qemu-devel] [PULL 06/20] paaudio: do not use global variables, Gerd Hoffmann, 2015/06/15
- [Qemu-devel] [PULL 02/20] audio: remove fmod backend, Gerd Hoffmann, 2015/06/15
- [Qemu-devel] [PULL 01/20] audio: remove esd backend, Gerd Hoffmann, 2015/06/15
- [Qemu-devel] [PULL 05/20] audio: expose drv_opaque to init_out and init_in, Gerd Hoffmann, 2015/06/15
- [Qemu-devel] [PULL 19/20] alsaaudio: use trace events instead of verbose, Gerd Hoffmann, 2015/06/15
- [Qemu-devel] [PULL 07/20] alsaaudio: do not use global variables, Gerd Hoffmann, 2015/06/15
- [Qemu-devel] [PULL 17/20] dsoundaudio: remove *_retries kludges, Gerd Hoffmann, 2015/06/15
- [Qemu-devel] [PULL 20/20] ossaudio: use trace events instead of debug config flag,
Gerd Hoffmann <=
- [Qemu-devel] [PULL 18/20] dsoundaudio: remove primary buffer, Gerd Hoffmann, 2015/06/15
- [Qemu-devel] [PULL 11/20] dsoundaudio: do not use global variables, Gerd Hoffmann, 2015/06/15
- Re: [Qemu-devel] [PULL 00/20] audio patch queue, Peter Maydell, 2015/06/15