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>
This commit is contained in:
Kővágó, Zoltán 2019-03-08 23:34:13 +01:00 committed by Gerd Hoffmann
parent 8c3a7d0087
commit 85bc58520c
26 changed files with 196 additions and 189 deletions

View file

@ -650,7 +650,7 @@ static void usb_audio_realize(USBDevice *dev, Error **errp)
s->out.vol[1] = 240; /* 0 dB */
s->out.as.freq = USBAUDIO_SAMPLE_RATE;
s->out.as.nchannels = 2;
s->out.as.fmt = AUD_FMT_S16;
s->out.as.fmt = AUDIO_FORMAT_S16;
s->out.as.endianness = 0;
streambuf_init(&s->out.buf, s->buffer);