Skip to content

Commit 5f03d4a

Browse files
committed
audio: Use audio_get_main_format() instead of AUDIO_FORMAT_MAIN_MASK
Use the Android helper function to extract the main audio format value instead of directly manipulating the bits. Change-Id: I2619459475313370422a1c76049d85b763a3f349 Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
1 parent edd23f8 commit 5f03d4a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

audio/audio_hw.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1240,7 +1240,7 @@ static int do_init_out_compress(struct stream_out_compress *out,
12401240

12411241
out->codec.sample_rate = config->sample_rate;
12421242

1243-
switch (config->format & AUDIO_FORMAT_MAIN_MASK) {
1243+
switch (audio_get_main_format(config->format)) {
12441244
case AUDIO_FORMAT_MP3:
12451245
out->codec.id = SND_AUDIOCODEC_MP3;
12461246
break;

0 commit comments

Comments
 (0)