summaryrefslogtreecommitdiff
path: root/firmware/sound.c (follow)
Commit message (Collapse)AuthorAge
* Add DAC's oversampling filter roll-off selection to sound settings.Andrew Ryabinin2013-05-24
| | | | Change-Id: I1258ba50dd9308f49d97965562f3a423c9bfb785
* Do some cleanup, adjustment and a couple fixes to recent sound changes.Michael Sevakis2013-04-22
| | | | | | | | | | | | | | | | | | | | | * SOUND_x enum can be generated by audiohw_settings.h along with settings entries and sound_val2phys. * VOLUME_MIN and VOLUME_MAX are no longer necessary within sound.c. If you need them, they are for target-defined purposes. * Fix up SDL volume implementation in sdl.c. Move sim volume calculation code to pcm-sdl.c. * Min trigger tresholds were based upon VOLUME_MIN for some reason. These setting have nothing to do with playback volume. Since it is no longer present, set these at -89dB which is the minimum peak meter sensitivity setting. * Fix an oversight in wm8758.c. I forgot to add the dB->register conversion to audiohw_set_volume. Change-Id: Ie1df33f1793eee75e6793f16bc7bddd16edb7f75
* Forget about fixedpoint.c in any HWCODEC bin.Michael Sevakis2013-04-15
| | | | | | | It bloats to much just for one simple use. Just use a simple function for shifting sound setting decimal places. Change-Id: I1a7d37cce6ada3c6e6600dc0d301f354ffeff231
* Fix some more errors and warnings from 0c7b787.Michael Sevakis2013-04-15
| | | | Change-Id: Ib67d0ab344e36964cadbcc982dc2afe35733770b
* Straighten out the mad twisted state of sound.c and related areas.Michael Sevakis2013-04-15
| | | | | | | | | | | | | | | | | | This is going right in since it's long overdue. If anything is goofed, drop me a line or just tweak it yourself if you know what's wrong. :-) Make HW/SW codec interface more uniform when emulating HW functionality on SWCODEC for functions such as "audiohw_set_pitch". The firmware-to- DSP plumbing is in firmware/drivers/audiohw-swcodec.c. "sound_XXX" APIs are all in sound.c with none in DSP code any longer. Reduce number of settings definitions needed by each codec by providing defaults for common ones like balance, channels and SW tone controls. Remove need for separate SIM code and tables and add virtual codec header for hosted targets. Change-Id: I3f23702bca054fc9bda40f49824ce681bb7f777b
* Fix f5a5b94 errors. Employ SW volume for select targets on SIM.Michael Sevakis2013-04-11
| | | | | | | | | | | Onda VX747 sim was missing a limits #define; #include limits.h in pcm_sw_volume.h. Simply use the software volume control for the SIM volume control rather than the SDL volume control when the target would have it natively. Change-Id: I8e924a2ff1b410f602452d2ea9b691efb82c931e
* Implement universal in-PCM-driver software volume control.Michael Sevakis2013-04-11
| | | | | | | | | | | | | | | | | | | | | | Implements double-buffered volume, balance and prescaling control in the main PCM driver when HAVE_SW_VOLUME_CONTROL is defined ensuring that all PCM is volume controlled and level changes are low in latency. Supports -73 to +6 dB using a 15-bit factor so that no large-integer math is needed. Low-level hardware drivers do not have to implement it themselves but parameters can be changed (currently defined in pcm-internal.h) to work best with a particular SoC or to provide different volume ranges. Volume and prescale calls should be made in the codec driver. It should appear as a normal hardware interface. PCM volume calls expect .1 dB units. Change-Id: Idf6316a64ef4fb8abcede10707e1e6c6d01d57db Reviewed-on: http://gerrit.rockbox.org/423 Reviewed-by: Michael Sevakis <jethead71@rockbox.org> Tested-by: Michael Sevakis <jethead71@rockbox.org>
* Make rbcodec/dsp includes more specific.Michael Sevakis2012-04-29
| | | | Change-Id: Idb6af40df26f5b8499a40e8b98602261ef227044
* Initial commit of the Samsung YP-R0 port.Thomas Martitz2011-12-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This port is a hybrid native/RaaA port. It runs on a embedded linux system, but is the only application. It therefore can implement lots of stuff that native targets also implement, while leveraging the underlying linux kernel. The port is quite advanced. User interface, audio playback, plugins work mostly fine. Missing is e.g. power mangement and USB (see SamsungYPR0 wiki page). Included in utils/ypr0tools are scripts and programs required to generate a patched firmware. The patched firmware has the rootfs modified to load Rockbox. It includes a early/safe USB mode. This port needs a new toolchain, one that includes glibc headers and libraries. rockboxdev.sh can generate it, but e.g. codesourcey and distro packages may also work. Most of the initial effort is done by Lorenzo Miori and others (on ABI), including reverse engineering and patching of the original firmware, initial drivers, and more. Big thanks to you. Flyspray: FS#12348 Author: Lorenzo Miori, myself Merry christmas to ypr0 owners! :) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31415 a1c6a512-1295-4272-9138-f99709370657
* Sandisk Sansa Connect port (FS #12363)Tomasz Moń2011-11-16
| | | | | | | | Included are drivers for buttons, backlight, lcd, audio and storage. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31000 a1c6a512-1295-4272-9138-f99709370657
* imx233/fuze+: add volume handling to sound.cAmaury Pouly2011-10-18
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30794 a1c6a512-1295-4272-9138-f99709370657
* rk27xx - adjust core files for rk27xx internal codecMarcin Bukat2011-09-06
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30454 a1c6a512-1295-4272-9138-f99709370657
* fix redMarcin Bukat2011-03-14
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29589 a1c6a512-1295-4272-9138-f99709370657
* WM8750/51 driver:Marcin Bukat2011-03-14
| | | | | | | | 1) Set prescaler correctly when 3d enhancement in use. 2) Implement sound_val2phys so gains in recording screen are correct. 3) Minor cleanups. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29588 a1c6a512-1295-4272-9138-f99709370657
* slightly modified FS#11531 by me: WM8750/51 driver reworkMarcin Bukat2011-03-14
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29584 a1c6a512-1295-4272-9138-f99709370657
* Remove some unnecessary includesDave Chapman2011-02-27
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29430 a1c6a512-1295-4272-9138-f99709370657
* WM8978: sound.c weirdness strikes again. Prescaler values have to be in ↵Michael Sevakis2011-01-21
| | | | | | centibels. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29100 a1c6a512-1295-4272-9138-f99709370657
* Fix CS42L55 (iPod Classic) tone controlMichael Sparmann2011-01-07
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29002 a1c6a512-1295-4272-9138-f99709370657
* Fix volume control on iPod ClassicMichael Sparmann2011-01-06
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28980 a1c6a512-1295-4272-9138-f99709370657
* fix yellowMarcin Bukat2010-10-31
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28426 a1c6a512-1295-4272-9138-f99709370657
* Separate mas35xx lowlevel stuff. Move SH specific bits to target tree. ↵Marcin Bukat2010-10-31
| | | | | | FS#11189 by me. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28425 a1c6a512-1295-4272-9138-f99709370657
* Mark some local variables with 'static'.Nils Wallménius2010-08-11
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27772 a1c6a512-1295-4272-9138-f99709370657
* Rockbox as an application: Commit current Android port progress.Thomas Martitz2010-08-02
| | | | | | | | | | | | | | | | General state is: Rockbox is usable (plays music, saves configuration, touchscreen works too). Problems: - Playing music in the background (i.e. when switching to another app) doesn't work reliably, but I'm working on that now. - no cabbiev2 (only some preliminary files for it), no other default theme. - screen flickers sometimes if the updates are too frequent - no multi screen apk/package - strange behavior when a phone call comes in The java files (and the eclipse project) resides in android/, which is also supposed to be the build folder. I've put a small README in there for instructions. There are some steps needed after the make part, which are described there, and which eclipse mostly handles. But there ought to be some script/makefile rules which do that instead in the future. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27668 a1c6a512-1295-4272-9138-f99709370657
* Rockbox as an application: Replace many occurences of #ifdef SIMULATOR with ↵Thomas Martitz2010-06-21
| | | | | | | | | | | #if (CONFIG_PLATFORM & PLATFORM_HOSTED) (or equivalently). The simulator defines PLATFORM_HOSTED, as RaaA will do (RaaA will not define SIMULATOR). The new define is to (de-)select code to compile on hosted platforms generally. Should be no functional change to targets or the simulator. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27019 a1c6a512-1295-4272-9138-f99709370657
* - Move uisimulator/sdl/*.[ch] into the target tree, under ↵Thomas Martitz2010-05-15
| | | | | | | | | | firmware/target/hosted/sdl, uisdl.c is split up across button-sdl.c and system-sdl.c. - Refactor the program startup. main() is now in main.c like on target, and the implicit application thread will now act as our main thread (previously a separate one was created for this in thread initialization). This is part of Rockbox as an application and is the first step to make an application port from the uisimulator. In a further step the sim bits from the sdl build will be separated out. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26065 a1c6a512-1295-4272-9138-f99709370657
* Gigabeat S: Fully enable access to hardware tone controls and 3-D effect ↵Michael Sevakis2010-05-15
| | | | | | feature. Under the hood, it's designated a hardware equalizer since it is one. Implement code framework for hardware EQ in general. Menu aspect is well abstracted and so the UI and strings can be changed around if taste doesn't quite suit. So far the emphasis is distinction of the UI labelling from the software EQ so that it's clear the settings are for a different thing. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26051 a1c6a512-1295-4272-9138-f99709370657
* r25940 oops. No, no, no, that wasn't quite right. Must be truthful about the ↵Michael Sevakis2010-05-11
| | | | | | level in decidecibels for subsequent code. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25941 a1c6a512-1295-4272-9138-f99709370657
* MRobe100, HD200, Gigabeat F/X (anything with wm8750 or wm8751). Properly ↵Michael Sevakis2010-05-11
| | | | | | prescale bass and treble controls to avoid clipping. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25940 a1c6a512-1295-4272-9138-f99709370657
* Add MPIO HD200 port - changed filesMarcin Bukat2010-04-26
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25724 a1c6a512-1295-4272-9138-f99709370657
* Fix yellowsThomas Martitz2010-04-25
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25720 a1c6a512-1295-4272-9138-f99709370657
* Remove lots of simulator-speficic #ifdef'ing in sound.c to allow for DSP ↵Thomas Martitz2010-04-25
| | | | | | effects in the sims, e.g. for bass and treble (targets that do those effects in HW don't simulate using dsp). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25719 a1c6a512-1295-4272-9138-f99709370657
* Fix minor mistake in tone control code: UDA1341 was added to the wrong part ↵Torne Wuff2010-04-13
| | | | | | | | | | | of the conditional (it has hw bass/treble but not prescaling, like the other wm codecs listed) and TSC2100 has no hw tone controls at all so is already covered by HAVE_SW_TONE_CONTROLS. Comment has been clarified to make this less likely to happen again :) Net effect: tone controls should no longer adjust the overall perceived volume in a weird way on mini2440. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25640 a1c6a512-1295-4272-9138-f99709370657
* Fix further tabsAndree Buschmann2010-01-03
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24156 a1c6a512-1295-4272-9138-f99709370657
* Comstify a function pointer arrayNils Wallménius2009-11-11
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23609 a1c6a512-1295-4272-9138-f99709370657
* Improvements to mini2440 audio; change CPU freq to 406MHzBob Cousins2009-11-03
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23495 a1c6a512-1295-4272-9138-f99709370657
* * Move DSP_CALLBACK_* enum to sound.hMaurus Cuelenaere2009-08-01
| | | | | | | | | * Add software based volume control for a certain range (SW_VOLUME_MIN -> SW_VOLUME_MAX) * Make Onda VX747 use it * Don't change volume or frequency in Ingenic Jz4740 codec driver when they're already set git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22106 a1c6a512-1295-4272-9138-f99709370657
* Fix red in bootloadersAlexander Levin2009-07-11
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21782 a1c6a512-1295-4272-9138-f99709370657
* Improvements to the pitch screen UI (FS#10359 by David Johnston)Alexander Levin2009-07-11
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21781 a1c6a512-1295-4272-9138-f99709370657
* Create an udacodec interface (similar to ascodec and wmcoded) and ↵Bertrik Sikken2009-06-28
| | | | | | adapt/implement it for the iriver h1xx/h3xx and the meizus. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21546 a1c6a512-1295-4272-9138-f99709370657
* Fix audio on Onda VX747Maurus Cuelenaere2009-05-26
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21097 a1c6a512-1295-4272-9138-f99709370657
* 3 new ports: Samsung YH-820, YH-920, and YH-925. Mostly functional. Audio ↵Mark Arigo2009-05-25
| | | | | | working on 820 & 925 (untested on the 920). No battery readings. No recording. No plugins. Keymap needs work. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21083 a1c6a512-1295-4272-9138-f99709370657
* Get the volume controls working on the M:Robe 500 along with some minor code ↵Karl Kurbjun2009-03-03
| | | | | | changes. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20194 a1c6a512-1295-4272-9138-f99709370657
* Small binsize optimization and likely a tiny speedup tooNils Wallménius2009-01-02
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19641 a1c6a512-1295-4272-9138-f99709370657
* Gigabeat S: Allow recording from FM. Give FM the same volume range as ↵Michael Sevakis2008-12-31
| | | | | | playback. NOTE: This bumps the si4700 output volume to -0dB so other players with that may need a minor adjustment. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19619 a1c6a512-1295-4272-9138-f99709370657
* Fix for FS#9444. Scales balance between current and mute. Mutes channel at ↵Steve Gotthardt2008-12-27
| | | | | | 100% balance when volume is muted. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19601 a1c6a512-1295-4272-9138-f99709370657
* Have drivers merged for WM8711/21/31 since they are so similar but respect ↵Michael Sevakis2008-12-08
| | | | | | all register differences between codecs. Change minis to #define the actual codec type. If anything breaks check if OSCPD and CLKOUTPD need to be clear for the target- H10 is fine. A nice naming convention suggestion for WM codec multidrivers would be welcome rather than naming for a specific chip. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19367 a1c6a512-1295-4272-9138-f99709370657
* Fix compilation of Clip simulatorRafaël Carré2008-11-24
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19203 a1c6a512-1295-4272-9138-f99709370657
* iPod Video: Fix playback after recording (FS #7402). Implement recording ↵Jens Arnold2008-09-13
| | | | | | gain adjustment. * Enable timeout for zero-crossing detection (SLOWCLK), avoids hanging volume/ gain due to DC offsets. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18509 a1c6a512-1295-4272-9138-f99709370657
* iPod G4, Color/Photo and Nano audio driver rework: Fix playback after ↵Jens Arnold2008-09-10
| | | | | | recording (FS #7402). Implement recording gain adjustment. * Fix slightly off Bass/Treble scale. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18490 a1c6a512-1295-4272-9138-f99709370657
* Updated our source code header to explicitly mention that we are GPL v2 orDaniel Stenberg2008-06-28
| | | | | | | | | later. We still need to hunt down snippets used that are not. 1324 modified files... http://www.rockbox.org/mail/archive/rockbox-dev-archive-2008-06/0060.shtml git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17847 a1c6a512-1295-4272-9138-f99709370657