aboutsummaryrefslogtreecommitdiff
path: root/hw/audio/wm8750.c
diff options
context:
space:
mode:
authorKővágó, Zoltán <dirty.ice.hu@gmail.com>2019-03-08 23:34:13 +0100
committerGerd Hoffmann <kraxel@redhat.com>2019-03-11 10:29:26 +0100
commit85bc58520c0e43660cbbe51b9eb5022a0baafe9f (patch)
tree6a6e20f651bcb5ae047e90ed823d2dcaa10e06e1 /hw/audio/wm8750.c
parent8c3a7d008794305b1304549f1d9249c12cbf5b2b (diff)
downloadqemu-85bc58520c0e43660cbbe51b9eb5022a0baafe9f.zip
qemu-85bc58520c0e43660cbbe51b9eb5022a0baafe9f.tar.gz
qemu-85bc58520c0e43660cbbe51b9eb5022a0baafe9f.tar.bz2
audio: use qapi AudioFormat instead of audfmt_e
I had to include an enum for audio sampling formats into qapi, but that meant duplicating the audfmt_e enum. This patch replaces audfmt_e and associated values with the qapi generated AudioFormat enum. This patch is mostly a search-and-replace, except for switches where the qapi generated AUDIO_FORMAT_MAX caused problems. Signed-off-by: Kővágó, Zoltán <DirtY.iCE.hu@gmail.com> Reviewed-by: Thomas Huth <thuth@redhat.com> Message-id: 01251b2758a1679c66842120b77c0fb46d7d0eaf.1552083282.git.DirtY.iCE.hu@gmail.com Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw/audio/wm8750.c')
-rw-r--r--hw/audio/wm8750.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/hw/audio/wm8750.c b/hw/audio/wm8750.c
index 169b006..ca0ad73 100644
--- a/hw/audio/wm8750.c
+++ b/hw/audio/wm8750.c
@@ -201,7 +201,7 @@ static void wm8750_set_format(WM8750State *s)
in_fmt.endianness = 0;
in_fmt.nchannels = 2;
in_fmt.freq = s->adc_hz;
- in_fmt.fmt = AUD_FMT_S16;
+ in_fmt.fmt = AUDIO_FORMAT_S16;
s->adc_voice[0] = AUD_open_in(&s->card, s->adc_voice[0],
CODEC ".input1", s, wm8750_audio_in_cb, &in_fmt);
@@ -214,7 +214,7 @@ static void wm8750_set_format(WM8750State *s)
out_fmt.endianness = 0;
out_fmt.nchannels = 2;
out_fmt.freq = s->dac_hz;
- out_fmt.fmt = AUD_FMT_S16;
+ out_fmt.fmt = AUDIO_FORMAT_S16;
s->dac_voice[0] = AUD_open_out(&s->card, s->dac_voice[0],
CODEC ".speaker", s, wm8750_audio_out_cb, &out_fmt);
@@ -681,7 +681,7 @@ uint32_t wm8750_adc_dat(void *opaque)
if (s->idx_in >= sizeof(s->data_in)) {
wm8750_in_load(s);
if (s->idx_in >= sizeof(s->data_in)) {
- return 0x80008000; /* silence in AUD_FMT_S16 sample format */
+ return 0x80008000; /* silence in AUDIO_FORMAT_S16 sample format */
}
}