diff options
author | Lorenzo Miori <memoryS60@gmail.com> | 2013-09-10 22:48:34 +0200 |
---|---|---|
committer | Thomas Martitz <kugel@rockbox.org> | 2014-02-05 09:56:21 +0100 |
commit | e876f4df6d240bd2e319b1e63be95a625f049a97 (patch) | |
tree | ce2fe1b24650e3be7a6cd2d346d29090a5422a8c /firmware/drivers | |
parent | b828b9d99bff2acc0e1f543f3176fd4b632cba68 (diff) |
Samsung YP-R1 target port
This is the basic port to the new target Samsung
YP-R1, which runs on a similar platform as YP-R0.
Port is usable, although there are still
some optimizations that have to be done.
Change-Id: If83a8e386369e413581753780c159026d9e41f04
Diffstat (limited to 'firmware/drivers')
-rw-r--r-- | firmware/drivers/audio/wm8978.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/firmware/drivers/audio/wm8978.c b/firmware/drivers/audio/wm8978.c index 0730ff5118..adc46c316f 100644 --- a/firmware/drivers/audio/wm8978.c +++ b/firmware/drivers/audio/wm8978.c @@ -499,7 +499,7 @@ void audiohw_enable_depth_3d(bool enable) audiohw_set_depth_3d(wmc_vol.enh_3d); } -#ifdef HAVE_RECORDING +#if defined(HAVE_RECORDING) || defined(SAMSUNG_YPR1) void audiohw_set_recsrc(int source, bool recording) { switch (source) @@ -561,6 +561,23 @@ void audiohw_set_recsrc(int source, bool recording) /* Enable bypass to L/R mixers */ wmc_set(WMC_LEFT_MIXER_CTRL, WMC_BYPL2LMIX); wmc_set(WMC_RIGHT_MIXER_CTRL, WMC_BYPR2RMIX); +#ifdef SAMSUNG_YPR1 + /* On Samsung YP-R1 we have to do some extra steps to select the AUX + * analog input source i.e. where the audio lines of the FM tuner are. + */ + wmc_set(WMC_LEFT_MIXER_CTRL, WMC_AUXL2LMIX); + wmc_set(WMC_RIGHT_MIXER_CTRL, WMC_AUXR2RMIX); + /* Set L/R AUX input gain to 0dB */ + wmc_write_masked(WMC_LEFT_MIXER_CTRL, 0x05 << WMC_AUXLMIXVOL_POS, + WMC_AUXLMIXVOL); + wmc_write_masked(WMC_RIGHT_MIXER_CTRL, 0x05 << WMC_AUXRMIXVOL_POS, + WMC_AUXRMIXVOL); + wmc_set(WMC_LEFT_MIXER_CTRL, WMC_DACL2LMIX); + wmc_set(WMC_RIGHT_MIXER_CTRL, WMC_DACR2RMIX); + wmc_set(WMC_POWER_MANAGEMENT1, WMC_OUT3MIXEN); + wmc_set(WMC_POWER_MANAGEMENT3, WMC_RMIXEN); + wmc_set(WMC_POWER_MANAGEMENT3, WMC_LMIXEN); +#endif } break; } |