From 6f54a86360acd3d5b193a92637eadf6df7246bf3 Mon Sep 17 00:00:00 2001 From: Amaury Pouly Date: Mon, 8 Feb 2016 23:58:32 +0000 Subject: as3514: fix bug in volume management on AS3543 targets which are not AS3525v2 Some old code made the assumption that CONFIG_CPU == AS3525v2 if and only if HAVE_AS3543, which is not true on targets like the Samsung YP-R0. This fixes several issues on such targets like a huge volume gap between -39dB and -40dB and a volume artificially capped at -72dB instead of -82dB. Change-Id: Ib1c883ac593c0c3ce5e2bf4eb408924ce5f5ad93 --- firmware/drivers/audio/as3514.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'firmware/drivers') diff --git a/firmware/drivers/audio/as3514.c b/firmware/drivers/audio/as3514.c index 2d69395..167dd85 100644 --- a/firmware/drivers/audio/as3514.c +++ b/firmware/drivers/audio/as3514.c @@ -34,7 +34,7 @@ #include "i2s.h" #include "ascodec.h" -#if CONFIG_CPU == AS3525v2 +#ifdef HAVE_AS3543 /* Headphone volume goes from -81.0 ... +6dB */ #define VOLUME_MIN -820 #define VOLUME_MAX 60 @@ -48,7 +48,7 @@ * This drivers supports: * as3514 , as used in the PP targets * as3515 , as used in the as3525 targets - * as3543 , as used in the as3525v2 targets + * as3543 , as used in the as3525v2 and other as3543 targets */ #if CONFIG_CPU == AS3525 @@ -278,7 +278,7 @@ void audiohw_set_volume(int vol_l, int vol_r) /*AS3543 mixer can go a little louder then the as3514, although * it might be possible to go louder on the as3514 as well */ -#if CONFIG_CPU == AS3525v2 +#ifdef HAVE_AS3543 #define MIXER_MAX_VOLUME 0x1b #else /* lets leave the AS3514 alone until its better tested*/ #define MIXER_MAX_VOLUME 0x16 -- cgit v1.1