diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2018-02-07 16:26:01 +0000 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2018-02-07 16:26:01 +0000 |
commit | 17a5bbb44df9a4a79166332bc26e2d8ca6bd8fa8 (patch) | |
tree | 3c51588df6d984563c370bdcae0ecc51673b9398 /audio/paaudio.c | |
parent | ea62da0913d20338b8a47bbfaef2e8f2763ee13f (diff) | |
parent | 493d89bf74d17fa304b7a02f531b024df2003fea (diff) |
Merge remote-tracking branch 'remotes/armbru/tags/pull-error-2018-02-06' into staging
Error reporting patches for 2018-02-06
# gpg: Signature made Tue 06 Feb 2018 19:48:30 GMT
# gpg: using RSA key 3870B400EB918653
# gpg: Good signature from "Markus Armbruster <armbru@redhat.com>"
# gpg: aka "Markus Armbruster <armbru@pond.sub.org>"
# Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867 4E5F 3870 B400 EB91 8653
* remotes/armbru/tags/pull-error-2018-02-06:
tcg: Replace fprintf(stderr, "*\n" with error_report()
hw/xen*: Replace fprintf(stderr, "*\n" with error_report()
hw/sparc*: Replace fprintf(stderr, "*\n" with error_report()
hw/sd: Replace fprintf(stderr, "*\n" with DPRINTF()
hw/ppc: Replace fprintf(stderr, "*\n" with error_report()
hw/pci*: Replace fprintf(stderr, "*\n" with error_report()
hw/openrisc: Replace fprintf(stderr, "*\n" with error_report()
hw/moxie: Replace fprintf(stderr, "*\n" with error_report()
hw/mips: Replace fprintf(stderr, "*\n" with error_report()
hw/lm32: Replace fprintf(stderr, "*\n" with error_report()
hw/dma: Replace fprintf(stderr, "*\n" with error_report()
hw/arm: Replace fprintf(stderr, "*\n" with error_report()
audio: Replace AUDIO_FUNC with __func__
error: Improve documentation of error_append_hint()
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'audio/paaudio.c')
-rw-r--r-- | audio/paaudio.c | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/audio/paaudio.c b/audio/paaudio.c index 2a35e6f82c..aa0a7477d3 100644 --- a/audio/paaudio.c +++ b/audio/paaudio.c @@ -206,7 +206,7 @@ static void *qpa_thread_out (void *arg) PAVoiceOut *pa = arg; HWVoiceOut *hw = &pa->hw; - if (audio_pt_lock (&pa->pt, AUDIO_FUNC)) { + if (audio_pt_lock(&pa->pt, __func__)) { return NULL; } @@ -222,7 +222,7 @@ static void *qpa_thread_out (void *arg) break; } - if (audio_pt_wait (&pa->pt, AUDIO_FUNC)) { + if (audio_pt_wait(&pa->pt, __func__)) { goto exit; } } @@ -230,7 +230,7 @@ static void *qpa_thread_out (void *arg) decr = to_mix = audio_MIN (pa->live, pa->g->conf.samples >> 2); rpos = pa->rpos; - if (audio_pt_unlock (&pa->pt, AUDIO_FUNC)) { + if (audio_pt_unlock(&pa->pt, __func__)) { return NULL; } @@ -251,7 +251,7 @@ static void *qpa_thread_out (void *arg) to_mix -= chunk; } - if (audio_pt_lock (&pa->pt, AUDIO_FUNC)) { + if (audio_pt_lock(&pa->pt, __func__)) { return NULL; } @@ -261,7 +261,7 @@ static void *qpa_thread_out (void *arg) } exit: - audio_pt_unlock (&pa->pt, AUDIO_FUNC); + audio_pt_unlock(&pa->pt, __func__); return NULL; } @@ -270,7 +270,7 @@ static int qpa_run_out (HWVoiceOut *hw, int live) int decr; PAVoiceOut *pa = (PAVoiceOut *) hw; - if (audio_pt_lock (&pa->pt, AUDIO_FUNC)) { + if (audio_pt_lock(&pa->pt, __func__)) { return 0; } @@ -279,10 +279,10 @@ static int qpa_run_out (HWVoiceOut *hw, int live) pa->live = live - decr; hw->rpos = pa->rpos; if (pa->live > 0) { - audio_pt_unlock_and_signal (&pa->pt, AUDIO_FUNC); + audio_pt_unlock_and_signal(&pa->pt, __func__); } else { - audio_pt_unlock (&pa->pt, AUDIO_FUNC); + audio_pt_unlock(&pa->pt, __func__); } return decr; } @@ -298,7 +298,7 @@ static void *qpa_thread_in (void *arg) PAVoiceIn *pa = arg; HWVoiceIn *hw = &pa->hw; - if (audio_pt_lock (&pa->pt, AUDIO_FUNC)) { + if (audio_pt_lock(&pa->pt, __func__)) { return NULL; } @@ -314,7 +314,7 @@ static void *qpa_thread_in (void *arg) break; } - if (audio_pt_wait (&pa->pt, AUDIO_FUNC)) { + if (audio_pt_wait(&pa->pt, __func__)) { goto exit; } } @@ -322,7 +322,7 @@ static void *qpa_thread_in (void *arg) incr = to_grab = audio_MIN (pa->dead, pa->g->conf.samples >> 2); wpos = pa->wpos; - if (audio_pt_unlock (&pa->pt, AUDIO_FUNC)) { + if (audio_pt_unlock(&pa->pt, __func__)) { return NULL; } @@ -342,7 +342,7 @@ static void *qpa_thread_in (void *arg) to_grab -= chunk; } - if (audio_pt_lock (&pa->pt, AUDIO_FUNC)) { + if (audio_pt_lock(&pa->pt, __func__)) { return NULL; } @@ -352,7 +352,7 @@ static void *qpa_thread_in (void *arg) } exit: - audio_pt_unlock (&pa->pt, AUDIO_FUNC); + audio_pt_unlock(&pa->pt, __func__); return NULL; } @@ -361,7 +361,7 @@ static int qpa_run_in (HWVoiceIn *hw) int live, incr, dead; PAVoiceIn *pa = (PAVoiceIn *) hw; - if (audio_pt_lock (&pa->pt, AUDIO_FUNC)) { + if (audio_pt_lock(&pa->pt, __func__)) { return 0; } @@ -372,10 +372,10 @@ static int qpa_run_in (HWVoiceIn *hw) pa->dead = dead - incr; hw->wpos = pa->wpos; if (pa->dead > 0) { - audio_pt_unlock_and_signal (&pa->pt, AUDIO_FUNC); + audio_pt_unlock_and_signal(&pa->pt, __func__); } else { - audio_pt_unlock (&pa->pt, AUDIO_FUNC); + audio_pt_unlock(&pa->pt, __func__); } return incr; } @@ -579,7 +579,7 @@ static int qpa_init_out(HWVoiceOut *hw, struct audsettings *as, audio_pcm_init_info (&hw->info, &obt_as); hw->samples = g->conf.samples; - pa->pcm_buf = audio_calloc (AUDIO_FUNC, hw->samples, 1 << hw->info.shift); + pa->pcm_buf = audio_calloc(__func__, hw->samples, 1 << hw->info.shift); pa->rpos = hw->rpos; if (!pa->pcm_buf) { dolog ("Could not allocate buffer (%d bytes)\n", @@ -587,7 +587,7 @@ static int qpa_init_out(HWVoiceOut *hw, struct audsettings *as, goto fail2; } - if (audio_pt_init (&pa->pt, qpa_thread_out, hw, AUDIO_CAP, AUDIO_FUNC)) { + if (audio_pt_init(&pa->pt, qpa_thread_out, hw, AUDIO_CAP, __func__)) { goto fail3; } @@ -636,7 +636,7 @@ static int qpa_init_in(HWVoiceIn *hw, struct audsettings *as, void *drv_opaque) audio_pcm_init_info (&hw->info, &obt_as); hw->samples = g->conf.samples; - pa->pcm_buf = audio_calloc (AUDIO_FUNC, hw->samples, 1 << hw->info.shift); + pa->pcm_buf = audio_calloc(__func__, hw->samples, 1 << hw->info.shift); pa->wpos = hw->wpos; if (!pa->pcm_buf) { dolog ("Could not allocate buffer (%d bytes)\n", @@ -644,7 +644,7 @@ static int qpa_init_in(HWVoiceIn *hw, struct audsettings *as, void *drv_opaque) goto fail2; } - if (audio_pt_init (&pa->pt, qpa_thread_in, hw, AUDIO_CAP, AUDIO_FUNC)) { + if (audio_pt_init(&pa->pt, qpa_thread_in, hw, AUDIO_CAP, __func__)) { goto fail3; } @@ -667,17 +667,17 @@ static void qpa_fini_out (HWVoiceOut *hw) void *ret; PAVoiceOut *pa = (PAVoiceOut *) hw; - audio_pt_lock (&pa->pt, AUDIO_FUNC); + audio_pt_lock(&pa->pt, __func__); pa->done = 1; - audio_pt_unlock_and_signal (&pa->pt, AUDIO_FUNC); - audio_pt_join (&pa->pt, &ret, AUDIO_FUNC); + audio_pt_unlock_and_signal(&pa->pt, __func__); + audio_pt_join(&pa->pt, &ret, __func__); if (pa->stream) { pa_stream_unref (pa->stream); pa->stream = NULL; } - audio_pt_fini (&pa->pt, AUDIO_FUNC); + audio_pt_fini(&pa->pt, __func__); g_free (pa->pcm_buf); pa->pcm_buf = NULL; } @@ -687,17 +687,17 @@ static void qpa_fini_in (HWVoiceIn *hw) void *ret; PAVoiceIn *pa = (PAVoiceIn *) hw; - audio_pt_lock (&pa->pt, AUDIO_FUNC); + audio_pt_lock(&pa->pt, __func__); pa->done = 1; - audio_pt_unlock_and_signal (&pa->pt, AUDIO_FUNC); - audio_pt_join (&pa->pt, &ret, AUDIO_FUNC); + audio_pt_unlock_and_signal(&pa->pt, __func__); + audio_pt_join(&pa->pt, &ret, __func__); if (pa->stream) { pa_stream_unref (pa->stream); pa->stream = NULL; } - audio_pt_fini (&pa->pt, AUDIO_FUNC); + audio_pt_fini(&pa->pt, __func__); g_free (pa->pcm_buf); pa->pcm_buf = NULL; } |