Rockbox open source high quality audio player as a Music Player Daemon
mpris rockbox mpd libadwaita audio rust zig deno
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

mrobe 100: (1) fix the sound volume by properly enabling headphone output, (2) disable line-out since there's no connector.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16230 a1c6a512-1295-4272-9138-f99709370657

+23 -1
+21
firmware/drivers/audio/wm8751.c
··· 28 28 #include "i2s.h" 29 29 #include "audio.h" 30 30 #include "audiohw.h" 31 + #include "system.h" 31 32 32 33 const struct sound_settings_info audiohw_settings[] = { 33 34 [SOUND_VOLUME] = {"dB", 0, 1, -74, 6, -25}, ··· 100 101 /* Reset and power up the WM8751 */ 101 102 void audiohw_preinit(void) 102 103 { 104 + #ifdef MROBE_100 105 + /* controls headphone ouput */ 106 + GPIOL_ENABLE |= 0x10; 107 + GPIOL_OUTPUT_EN |= 0x10; 108 + GPIOL_OUTPUT_VAL |= 0x10; /* disable */ 109 + #endif 110 + 103 111 #ifdef CPU_PP502x 104 112 i2s_reset(); 105 113 #endif ··· 132 140 wmcodec_write(PWRMGMT2, PWRMGMT2_DACL | PWRMGMT2_DACR); 133 141 134 142 /* 4. Enable line and / or headphone output buffers as required. */ 143 + #ifdef MROBE_100 144 + wmcodec_write(PWRMGMT2, PWRMGMT2_DACL | PWRMGMT2_DACR | 145 + PWRMGMT2_LOUT1 | PWRMGMT2_ROUT1); 146 + #else 135 147 wmcodec_write(PWRMGMT2, PWRMGMT2_DACL | PWRMGMT2_DACR | 136 148 PWRMGMT2_LOUT1 | PWRMGMT2_ROUT1 | PWRMGMT2_LOUT2 | 137 149 PWRMGMT2_ROUT2); 150 + #endif 138 151 139 152 wmcodec_write(ADDITIONAL1, ADDITIONAL1_TSDEN | ADDITIONAL1_TOEN | 140 153 ADDITIONAL1_DMONOMIX_LLRR | ADDITIONAL1_VSEL_DEFAULT); ··· 143 156 wmcodec_write(RIGHTMIX2, RIGHTMIX2_RD2RO | RIGHTMIX2_RI2RO_DEFAULT); 144 157 145 158 audiohw_mute(false); 159 + 160 + #ifdef MROBE_100 161 + /* enable headphone output */ 162 + GPIOL_OUTPUT_VAL &= ~0x10; 163 + GPIOL_OUTPUT_EN |= 0x10; 164 + #endif 146 165 } 147 166 148 167 int audiohw_set_master_vol(int vol_l, int vol_r) ··· 158 177 return 0; 159 178 } 160 179 180 + #ifndef MROBE_100 161 181 int audiohw_set_lineout_vol(int vol_l, int vol_r) 162 182 { 163 183 wmcodec_write(LOUT2, LOUT2_BITS | LOUT2_LOUT2VOL(vol_l)); 164 184 wmcodec_write(ROUT2, ROUT2_BITS | ROUT2_ROUT2VOL(vol_r)); 165 185 return 0; 166 186 } 187 + #endif 167 188 168 189 void audiohw_set_bass(int value) 169 190 {
+2 -1
firmware/sound.c
··· 290 290 || defined(HAVE_WM8731) || defined(HAVE_WM8721) || defined(HAVE_WM8751) \ 291 291 || defined(HAVE_AS3514) 292 292 audiohw_set_master_vol(tenthdb2master(l), tenthdb2master(r)); 293 - #if defined(HAVE_WM8975) || defined(HAVE_WM8758) || defined(HAVE_WM8751) 293 + #if defined(HAVE_WM8975) || defined(HAVE_WM8758) \ 294 + || (defined(HAVE_WM8751) && !defined(MROBE_100)) 294 295 audiohw_set_lineout_vol(tenthdb2master(0), tenthdb2master(0)); 295 296 #endif 296 297