diff options
author | Andree Buschmann <AndreeBuschmann@t-online.de> | 2010-04-11 12:33:02 +0000 |
---|---|---|
committer | Andree Buschmann <AndreeBuschmann@t-online.de> | 2010-04-11 12:33:02 +0000 |
commit | f6cecfd91b42dabb1dc4ad50c5afd38d8c588d0f (patch) | |
tree | 1648fee3a84ec192d30c6cbb05acb020d7e0571f /firmware/drivers | |
parent | 268c6d1e7f54379f78a8a69002ad133056f7f452 (diff) |
Minor binsize savings.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25588 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/drivers')
-rw-r--r-- | firmware/drivers/audio/wm8758.c | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/firmware/drivers/audio/wm8758.c b/firmware/drivers/audio/wm8758.c index 40ead0cdf2..12ca987bd7 100644 --- a/firmware/drivers/audio/wm8758.c +++ b/firmware/drivers/audio/wm8758.c @@ -183,19 +183,15 @@ void audiohw_set_lineout_vol(int vol_l, int vol_r) void audiohw_enable_lineout(bool enable) { + /* Initialize data without lineout enabling. */ + int pwrmgmt3_data = PWRMGMT3_RMIXEN | PWRMGMT3_LMIXEN + | PWRMGMT3_DACENR | PWRMGMT3_DACENL; + /* Set lineout (OUT2), if enabled. */ if (enable) - { - /* include enabling of OUT2 */ - wmcodec_write(PWRMGMT3, PWRMGMT3_LOUT2EN | PWRMGMT3_ROUT2EN - | PWRMGMT3_RMIXEN | PWRMGMT3_LMIXEN - | PWRMGMT3_DACENR | PWRMGMT3_DACENL); - } - else - { - /* exclude enabling of OUT2 */ - wmcodec_write(PWRMGMT3, PWRMGMT3_RMIXEN | PWRMGMT3_LMIXEN - | PWRMGMT3_DACENR | PWRMGMT3_DACENL); - } + pwrmgmt3_data |= PWRMGMT3_LOUT2EN | PWRMGMT3_ROUT2EN; + + /* Set register. */ + wmcodec_write(PWRMGMT3, pwrmgmt3_data); } void audiohw_set_bass(int value) |