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.

audio: Move hosted audio "codec" drivers into their respective target dirs

They are nearly entirely generic wrappers around ALSA controls, unique
per target, and are ripe for further consolidation.

Change-Id: I05e4a450e3e89e03616906601c4f8fa46200dff5

+62 -43
+14 -24
firmware/SOURCES
··· 133 133 target/hosted/sonynwz/debug-nwz.c 134 134 target/hosted/sonynwz/nvp-nwz.c 135 135 target/hosted/sonynwz/nwz-db.c 136 + target/hosted/sonynwz/nwzlinux-codec.c 137 + #endif 138 + 139 + #if ((defined(HIBY_LINUX) || defined(FIIO_M3K_LINUX) || defined(SAMSUNG_YPR0) || defined(SAMSUNG_YPR1) || defined(SONY_NWZ_LINUX)) && !defined(SIMULATOR)) 140 + target/hosted/pcm-alsa.c 141 + target/hosted/alsa-controls.c 136 142 #endif 137 143 138 144 #if ((defined(HIBY_LINUX) || defined(FIIO_M3K_LINUX)) && !defined(SIMULATOR)) 139 145 drivers/lcd-memframe.c 140 - target/hosted/alsa-controls.c 141 - target/hosted/pcm-alsa.c 142 146 target/hosted/backtrace-glibc.c 143 147 target/hosted/filesystem-unix.c 144 148 target/hosted/kernel-unix.c ··· 154 158 target/hosted/agptek/button-agptek.c 155 159 target/hosted/agptek/debug-agptek.c 156 160 target/hosted/agptek/powermgmt-agptek.c 161 + target/hosted/agptek/rocker_codec.c 157 162 #endif 158 163 159 164 #if defined(SURFANS_F28) && !defined(SIMULATOR) 160 165 target/hosted/surfans/button-f28.c 161 166 target/hosted/surfans/debug-f28.c 162 167 target/hosted/surfans/powermgmt-f28.c 168 + target/hosted/surfanslinux_codec.c 163 169 #endif 164 170 165 171 #if (defined(XDUOO_X3II) || defined(XDUOO_X20)) && !defined(SIMULATOR) 166 172 target/hosted/xduoo/button-xduoo.c 167 173 target/hosted/xduoo/debug-xduoo.c 168 174 target/hosted/xduoo/powermgmt-xduoo.c 175 + target/hosted/xduoo/xduoolinux_codec.c 169 176 #endif 170 177 171 178 #if defined(HIBY_LINUX) && !defined(SIMULATOR) ··· 180 187 target/hosted/fiio/powermgmt-fiio.c 181 188 target/hosted/fiio/system-fiio.c 182 189 target/hosted/fiio/usb-fiio.c 190 + target/hosted/fiio/fiiolinux_codec.c 183 191 #endif 184 192 185 193 #if (defined(EROS_Q)) && !defined(SIMULATOR) ··· 187 195 target/hosted/aigo/debug-erosq.c 188 196 target/hosted/aigo/power-erosq.c 189 197 target/hosted/aigo/powermgmt-erosq.c 198 + target/hosted/aigo/erosqlinux_codec.c 190 199 #endif 191 200 192 201 #if defined(SAMSUNG_YPR0) && !defined(SIMULATOR) ··· 549 558 drivers/audio/es9218.c 550 559 #endif /* defined(HAVE_*) */ 551 560 #else /* PLATFORM_HOSTED */ 552 - #if defined(SAMSUNG_YPR0) && defined(HAVE_AS3514) 561 + #if defined(HAVE_AS3514) 553 562 drivers/audio/as3514.c 554 - target/hosted/pcm-alsa.c 555 - #elif defined(SAMSUNG_YPR1) && defined(HAVE_WM8978) 563 + #elif defined(HAVE_WM8978) 556 564 drivers/audio/wm8978.c 557 - target/hosted/pcm-alsa.c 558 - #elif defined(HAVE_NWZ_LINUX_CODEC) 559 - drivers/audio/nwzlinux-codec.c 560 - target/hosted/alsa-controls.c 561 - target/hosted/pcm-alsa.c 562 - #elif defined(HAVE_ROCKER_CODEC) && !defined(SIMULATOR) 563 - drivers/audio/rocker_codec.c 564 - #elif defined(HAVE_SURFANS_LINUX_CODEC) && !defined(SIMULATOR) 565 - drivers/audio/surfanslinux_codec.c 566 - #elif defined(HAVE_XDUOO_LINUX_CODEC) && !defined(SIMULATOR) 567 - drivers/audio/xduoolinux_codec.c 568 - #elif defined(HAVE_FIIO_LINUX_CODEC) && !defined(SIMULATOR) 569 - drivers/audio/fiiolinux_codec.c 570 - #elif defined(HAVE_EROSQ_LINUX_CODEC) && !defined(SIMULATOR) 571 - drivers/audio/erosqlinux_codec.c 572 565 #elif defined(HAVE_SDL_AUDIO) 573 566 drivers/audio/sdl.c 574 - 575 567 #if (CONFIG_PLATFORM & PLATFORM_MAEMO5) 576 568 target/hosted/maemo/pcm-gstreamer.c 577 569 #else 578 570 target/hosted/sdl/pcm-sdl.c 579 571 #endif /* (CONFIG_PLATFORM & PLATFORM_MAEMO) */ 580 - 581 572 #elif defined(CTRU) 582 573 drivers/audio/ctru.c 583 574 #endif 584 575 #endif /* (CONFIG_PLATFORM & PLATFORM_NATIVE) */ 585 - 586 576 #endif /* !defined(BOOTLOADER) */ 587 577 588 578 /* build erosqn codec in bootloader for detection */ ··· 2034 2024 target/hosted/android/powermgmt-android.c 2035 2025 target/hosted/android/system-android.c 2036 2026 target/hosted/android/telephony-android.c 2027 + target/hosted/android/android-codec.c 2037 2028 #ifdef APPLICATION 2038 2029 target/hosted/android/app/button-application.c 2039 2030 #endif 2040 - drivers/audio/android.c 2041 2031 #endif 2042 2032 2043 2033 #if defined(DX50) || defined(DX90)
+1 -2
firmware/drivers/audio/android.c firmware/target/hosted/android/android-codec.c
··· 22 22 23 23 #include "config.h" 24 24 #include "audiohw.h" 25 + #include "pcm-android.h" 25 26 26 27 void audiohw_set_volume(int volume) 27 28 { 28 - extern void pcm_set_mixer_volume(int); 29 29 pcm_set_mixer_volume(volume); 30 30 } 31 31 ··· 36 36 37 37 void audiohw_close(void) 38 38 { 39 - extern void pcm_shutdown(void); 40 39 pcm_shutdown(); 41 40 }
firmware/drivers/audio/erosqlinux_codec.c firmware/target/hosted/aigo/erosqlinux_codec.c
firmware/drivers/audio/fiiolinux_codec.c firmware/target/hosted/fiio/fiiolinux_codec.c
firmware/drivers/audio/nwzlinux-codec.c firmware/target/hosted/sonynwz/nwzlinux-codec.c
firmware/drivers/audio/rocker_codec.c firmware/target/hosted/agptek/rocker_codec.c
firmware/drivers/audio/surfanslinux_codec.c firmware/target/hosted/surfans/surfanslinux_codec.c
firmware/drivers/audio/xduoolinux_codec.c firmware/target/hosted/xduoo/xduoolinux_codec.c
+4 -3
firmware/export/audiohw.h
··· 223 223 #include "es9018.h" 224 224 #elif defined(HAVE_ES9218) 225 225 #include "es9218.h" 226 - #elif ((CONFIG_PLATFORM & (PLATFORM_ANDROID | PLATFORM_MAEMO \ 227 - | PLATFORM_PANDORA | PLATFORM_SDL | PLATFORM_CTRU)) | defined(RG_NANO)) 228 - #include "hosted_codec.h" 226 + #elif (CONFIG_PLATFORM & PLATFORM_ANDROID) 227 + #include "android_codec.h" 228 + #elif ((CONFIG_PLATFORM & (PLATFORM_MAEMO | PLATFORM_PANDORA | PLATFORM_SDL | PLATFORM_CTRU)) | defined(RG_NANO)) 229 + #include "sdl_codec.h" 229 230 #elif defined(DX50) 230 231 #include "codec-dx50.h" 231 232 #elif defined(DX90)
firmware/export/codec-dx50.h firmware/target/hosted/ibasso/dx50/codec-dx50.h
firmware/export/codec-dx90.h firmware/target/hosted/ibasso/dx90/codec-dx90.h
firmware/export/erosqlinux_codec.h firmware/target/hosted/aigo/erosqlinux_codec.h
firmware/export/fiiolinux_codec.h firmware/target/hosted/fiio/fiiolinux_codec.h
+3 -14
firmware/export/hosted_codec.h firmware/target/hosted/android/android_codec.h
··· 18 18 * KIND, either express or implied. 19 19 * 20 20 ****************************************************************************/ 21 - #ifndef HOSTED_CODEC_H 22 - #define HOSTED_CODEC_H 23 - 24 - #if (defined(HAVE_SDL_AUDIO) \ 25 - && !(CONFIG_PLATFORM & PLATFORM_MAEMO5)) \ 26 - || (CONFIG_PLATFORM & PLATFORM_CTRU) 27 - AUDIOHW_SETTING(VOLUME, "dB", 0, 1, -80, 0, 0) 28 - #else 29 - #define AUDIOHW_CAPS (MONO_VOL_CAP) 30 - AUDIOHW_SETTING(VOLUME, "dB", 0, 1, -99, 0, 0) 31 - #endif /* CONFIG_PLATFORM & PLATFORM_SDL */ 21 + #ifndef __ANDROID_CODEC_H 22 + #define __ANDROID_CODEC_H 32 23 33 - #if (CONFIG_PLATFORM & PLATFORM_ANDROID) 34 24 /* Bass and treble tone controls */ 35 25 #ifdef AUDIOHW_HAVE_BASS 36 26 AUDIOHW_SETTING(BASS, "dB", 0, 1, -24, 24, 0) ··· 49 39 #if defined(AUDIOHW_HAVE_TREBLE_CUTOFF) 50 40 AUDIOHW_SETTING(TREBLE_CUTOFF, "", 0, 1, 1, 4, 1) 51 41 #endif 52 - #endif /* CONFIG_PLATFORM & PLATFORM_ANDROID */ 53 42 54 - #endif /* HOSTED_CODEC_H */ 43 + #endif /* __ANDROID_CODEC_H */
firmware/export/nwzlinux_codec.h firmware/target/hosted/sonynwz/nwzlinux_codec.h
firmware/export/rocker_codec.h firmware/target/hosted/agptek/rocker_codec.h
firmware/export/surfanslinux_codec.h firmware/target/hosted/surfans/surfanslinux_codec.h
firmware/export/xduoolinux_codec.h firmware/target/hosted/xduoo/xduoolinux_codec.h
+7
firmware/target/hosted/android/pcm-android.h
··· 1 + #ifndef __PCM_ANDROID_H 2 + #define __PCM_ANDROID_H 3 + 4 + void pcm_set_mixer_volume(int volume); 5 + void pcm_shutdown(void); 6 + 7 + #endif /* __PCM_ANDROID_H */
+33
firmware/target/hosted/sdl/sdl_codec.h
··· 1 + /*************************************************************************** 2 + * __________ __ ___. 3 + * Open \______ \ ____ ____ | | _\_ |__ _______ ___ 4 + * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / 5 + * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < 6 + * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ 7 + * \/ \/ \/ \/ \/ 8 + * $Id$ 9 + * 10 + * Copyright (C) 2010 by Thomas Martitz 11 + * 12 + * This program is free software; you can redistribute it and/or 13 + * modify it under the terms of the GNU General Public License 14 + * as published by the Free Software Foundation; either version 2 15 + * of the License, or (at your option) any later version. 16 + * 17 + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 18 + * KIND, either express or implied. 19 + * 20 + ****************************************************************************/ 21 + #ifndef _SDL_CODEC_H 22 + #define _SDL_CODEC_H 23 + 24 + #if (defined(HAVE_SDL_AUDIO) \ 25 + && !(CONFIG_PLATFORM & PLATFORM_MAEMO5)) \ 26 + || (CONFIG_PLATFORM & PLATFORM_CTRU) 27 + AUDIOHW_SETTING(VOLUME, "dB", 0, 1, -80, 0, 0) 28 + #else 29 + #define AUDIOHW_CAPS (MONO_VOL_CAP) 30 + AUDIOHW_SETTING(VOLUME, "dB", 0, 1, -99, 0, 0) 31 + #endif /* CONFIG_PLATFORM & PLATFORM_SDL */ 32 + 33 + #endif /* _SDL_CODEC_H */