summaryrefslogtreecommitdiff
path: root/firmware/drivers/audio/as3514.c (follow)
Commit message (Collapse)AuthorAge
* as3543: fix audio gap when switching from dac to line-in/recordingAmaury Pouly2016-08-29
| | | | | | | | | | | | | | | | Also clarity parts of the code. The old code suffered from two defects: - it was very unclear because it made changes to whole registers (using as3514_write) instead of fields (using as3514_set/clear/write_masked). Also the routing code was spread accross several functions which made it hard to follow. - it did not properly reroute audio on monitor changes. In particular, the following could happen: when switching from DAC to radio, the code would fail to clear SUM_off, resulting in a weird situation where the main mixer was off (SUM_off) but the headphone where using the main mixer as input. Incredibly this worked anyway (at least on AMSv2 and YP-R0) but resulted in strange volume gaps between DAC and radio mode. Change-Id: I7826835fdb59c21f6483b223883ca9289e85caca
* as3514: fix bug in volume management on AS3543 targets which are not AS3525v2Amaury Pouly2016-02-12
| | | | | | | | | Some old code made the assumption that CONFIG_CPU == AS3525v2 if and only if HAVE_AS3543, which is not true on targets like the Samsung YP-R0. This fixes several issues on such targets like a huge volume gap between -39dB and -40dB and a volume artificially capped at -72dB instead of -82dB. Change-Id: Ib1c883ac593c0c3ce5e2bf4eb408924ce5f5ad93
* AS3543: Fix increasing noise and power consumption if booted through roloMihail Zenkov2016-02-01
| | | | Change-Id: I99fe6d09b15689e5dd0179714bbe363aed922d10
* AS3543: Fix recording volume setting and voiceMihail Zenkov2015-06-02
| | | | | | Fix regressions introduced by 42219b6e7 Change-Id: I1f3edb5f269f60e9431b45a43c4370836ecac733
* Bypass the AS3543 audio mixer at higher volumes.Mihail Zenkov2015-01-19
| | | | | | This change reduces noise and distortion very slightly at higher volumes. Change-Id: I1a2eb160c2956de90764c0bb11677fdac8d96dec
* kernel: Break out kernel primitives into separate files and move to separate ↵Thomas Martitz2014-03-03
| | | | | | | | | dir. No code changed, just shuffling stuff around. This should make it easier to build only select parts kernel and use different implementations. Change-Id: Ie1f00f93008833ce38419d760afd70062c5e22b5
* Do not include kernel.h in system.h.Thomas Martitz2014-01-05
| | | | | | | system.h doesn't need it on its own and this change makes it less dependant on Rockbox internals. Change-Id: I4e1e4108a52a7b599627a829204eb82b392fc6d6
* 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
* Hopefully knock out most of the red and yellow from 0c7b787.Michael Sevakis2013-04-15
| | | | Change-Id: Ib8dd0d011b11ee3eded3025308f19ddb5d151b59
* 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
* ypr0: This patch adds radio support to Samsung YP-R0Lorenzo Miori2012-05-28
| | | | | | | | | | Basically it uses the default SI4700 radio chip driver, the only thing that's different is the I2C access, written specifically to interact with my kernel module. Next things to add are: - RDS support! Change-Id: I0ed125641e00f93124d7a34f90dd508e7f1db5a4 Signed-off-by: Lorenzo Miori <memorys60@gmail.com>
* ascodec-target.h: removeRafaël Carré2012-01-08
| | | | | | | | | | | move prototypes to ascodec.h move code to ascodec*.c YPR0: use adc-as3514.c instead of duplicating it TODO: merge as3514.h and ascodec.h ? git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31626 a1c6a512-1295-4272-9138-f99709370657
* ypr0: Remove last #ifdef in as3514.Thomas Martitz2011-12-25
| | | | | | | It's now using completely the same driver as Sansa daps. This also increases the volume range. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31428 a1c6a512-1295-4272-9138-f99709370657
* ypr0: Cleanup and simplify ascodec functions. Fix audiohw_{pre,post}init() ↵Thomas Martitz2011-12-24
| | | | | | not being called. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31423 a1c6a512-1295-4272-9138-f99709370657
* 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
* Commit FS#12111 by Stephan Grossklass. Disables output mixer auto gain ↵Michael Giacomelli2011-07-24
| | | | | | control on AMSv2. Should fix occasional distortion reported when running the player at very high output levels (e.g. at or above 0dB). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30208 a1c6a512-1295-4272-9138-f99709370657
* Enable line out on c200v1 - part of FS#11367 by me - Thanks to Nate for testingMichael Chicoine2010-10-27
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28368 a1c6a512-1295-4272-9138-f99709370657
* Part of FS#11367 by me: e200v2 enable line outMichael Chicoine2010-06-27
| | | | | | | | | Should also work for Fuzev1, although not tested. Connect dock after booting Rockbox. Connecting dock with power off will boot into OF. TODO: enable/disable line out based on dock connection status, add additional devices (Fuzev2 and c200v2) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27162 a1c6a512-1295-4272-9138-f99709370657
* e200v1/c200v1: Implement limited samplerate switching. Rates 24kHz and below ↵Michael Sevakis2010-06-26
| | | | | | are being a bear as far as minor crackling at higher amplitude-- leave them out for the time being since no solution is currently evident. 48, 44, 32 (rec rates 24, 22, 16) seem perfectly fine. I'm betting c200 is ok to include because it uses the same setup as e200. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27139 a1c6a512-1295-4272-9138-f99709370657
* Commit FS#11364 by me. Increases the A3525v2 volume range by 7.5dB. Each ↵Michael Giacomelli2010-06-24
| | | | | | volume setting gets 7.5dB louder (if you listened before at 0dB, you would have to set it to about -7.5dB to get the same volume). As a result, the new 0dB actually is pretty close to max line level for a full scale voltage, so positive dB may clip, whereas before they did not because the scale was off. Thanks to dfkt and Tim Graf for help figuring this out. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27101 a1c6a512-1295-4272-9138-f99709370657
* as3514.c: clean upRafaël Carré2010-05-19
| | | | | | | | | | | | | | - enhance registers description in header file with respect to the as3543 registers: point which one are present or not in the as3543, which bits change (i didn't detail all registers) - cache less registers, only up to the ones which are written to multiple times - use ascodec_readbytes() to cache all needed registers in a row - separate the as3543 bits from as3514/as3515 in audiohw_preinit() - comment out unused audiohw_set_lineout_vol - some cosmetics git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26174 a1c6a512-1295-4272-9138-f99709370657
* as3525v1 use an as3515 audio codec/PMU, not an as3517 as previously thoughtRafaël Carré2010-05-16
| | | | | | | | | | | | | | -> Change references to as3517 into as3515 there is a reference to the as3515 in the public as3525 datasheet to support this fact as3517 is used in the as3527 SoC, the (public) as3527 datasheet has detailed information on its registers the audio codec/PMU used in as3525v2 (thought to be as3543) appears to be compatible (identical?) with as3517 git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26075 a1c6a512-1295-4272-9138-f99709370657
* as3543: output sum of line & dac to have voicing work while using FMRafaël Carré2010-05-15
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26045 a1c6a512-1295-4272-9138-f99709370657
* as3514: mute headphones at the lowest volumeRafaël Carré2010-05-14
| | | | | | | | change lowest step from -74dB to -73dB, as it really is -73.5dB and is rounded to -73 fix FS#11237 git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26010 a1c6a512-1295-4272-9138-f99709370657
* as3525v2: make sure volume is normal by writing Audioset2 registerRafaël Carré2010-05-07
| | | | | | | | | | | If the bit 6 is set volume is much lower, without writing it explicitely it is undefined. According to linux sources this bit is related to mixer. Initialize Audioset2 with low power 'hph' (probably headphones) quality, as I couldn't make a difference with 'high quality' setting. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25890 a1c6a512-1295-4272-9138-f99709370657
* as3525v2: don't modify audioset2 as it seems the bits have changedRafaël Carré2010-05-05
| | | | | | restore loud volume on Clip+ git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25831 a1c6a512-1295-4272-9138-f99709370657
* Use settings for DAC AGC, cpeaker driver bias current (which is unused in ↵Michael Giacomelli2010-05-05
| | | | | | rockbox), dither, and headphone bias current taken from c200v2 firmware. These should result in several mA power savings on all as3525, and probably an improvement on AS3525v2 as well as the c200v1 and e200v1. RMAA tests on the e200v1, clipv1 and clipv2 show no measurable difference in output when driving a 16 ohm load. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25821 a1c6a512-1295-4272-9138-f99709370657
* Remove pcm_mute() which has been unused since r19308Rafaël Carré2010-04-27
| | | | | | | Remove audiohw_mute from header as well, and make this function static to each driver (commented out when it was unused) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25733 a1c6a512-1295-4272-9138-f99709370657
* as3525v2: fix volume setting (can now go very low)Rafaël Carré2010-04-26
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25732 a1c6a512-1295-4272-9138-f99709370657
* as3514: detail bit of AS3543_DAC_IFRafaël Carré2010-04-26
| | | | | | it lets you select internal PLL or external MCLK and is not related to mute git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25731 a1c6a512-1295-4272-9138-f99709370657
* as3514: no need to cache volumeRafaël Carré2010-04-26
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25730 a1c6a512-1295-4272-9138-f99709370657
* as3525v2: microphone recordingRafaël Carré2010-03-29
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25391 a1c6a512-1295-4272-9138-f99709370657
* as3525v2 : recording (FM only, no microphone yet)Rafaël Carré2010-03-29
| | | | | | | | | Add HAVE_AS3543 config define to differentiate the bits changed since as3514/as3517 Enable recording on Fuzev2/Clipv2/Clip+, although it was tested on Clip+ only Note: storage is still read-only so I tested by listening to headphones loopback and watching the recording level in recscreen git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25390 a1c6a512-1295-4272-9138-f99709370657
* as3525v2: FM playback (only tested on Clip+)Rafaël Carré2010-03-29
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25383 a1c6a512-1295-4272-9138-f99709370657
* SansaAMSv2 as3541.c Include key line from funman's patch to get sound on ↵Jack Halpin2010-03-21
| | | | | | clip+ and have it only apply to as3525v2. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25264 a1c6a512-1295-4272-9138-f99709370657
* Clip+: enable sound on "as3514" (as3543 in fact)Rafaël Carré2010-03-20
| | | | | | | | | | as3525 comes with a as3517, as3525v2 with a as3543, rename specific registers accordingly Existing problems: FM (line out) doesn't work, volume can't go below a certain point git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25260 a1c6a512-1295-4272-9138-f99709370657
* Philips SA9200: initialize i2c, i2s, and as3514 as the OF does. Fixes ↵Mark Arigo2009-08-01
| | | | | | clicks/pops heard when reading the adc. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22101 a1c6a512-1295-4272-9138-f99709370657
* FS#9611 - Sansa Clip radio code. Commit final part which enables the LINE2 ↵Bertrik Sikken2009-02-05
| | | | | | input that carries the analog radio signal on ams sansas. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19927 a1c6a512-1295-4272-9138-f99709370657
* AS3514: Simplify as there isn't a need to track the current source and sync ↵Michael Sevakis2009-01-08
| | | | | | mixer levels. Gang them when adjusting volume. Any inputs not currently in use will be muted or off anyway. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19713 a1c6a512-1295-4272-9138-f99709370657
* Enable as3514 HPCM codec setting for all AMS3525 targets (and disable it for ↵Bertrik Sikken2008-12-16
| | | | | | others). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19460 a1c6a512-1295-4272-9138-f99709370657
* FS#9625, keep HPCM codec setting (headphone common mode) enabled for E200V2 too.Bertrik Sikken2008-12-12
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19407 a1c6a512-1295-4272-9138-f99709370657
* Bring consistency to pcm implementation and samplerate handling. Less ↵Michael Sevakis2008-12-12
| | | | | | low-level duplication. A small test_sampr fix so it works on coldfire again. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19400 a1c6a512-1295-4272-9138-f99709370657
* Keep codec HPCM (headphone common mode) enabled for Sansa Clip and Sansa ↵Bertrik Sikken2008-12-04
| | | | | | m200v4 so the headphone output produces stereo instead of an L-R signal. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19340 a1c6a512-1295-4272-9138-f99709370657
* Fix misspelled function name. Thanks to Jens Arnold for noticing.Michael Sevakis2008-11-26
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19220 a1c6a512-1295-4272-9138-f99709370657
* Add register bit defines for as3514 and clean stuff up. Reduce poppiness at ↵Michael Sevakis2008-11-25
| | | | | | startup and shutdown (and even powerup for e200). Really, I can't honestly say it will help anything but an e200v1 but I'm sick of the noises. ;) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19214 a1c6a512-1295-4272-9138-f99709370657
* Abstract the PortalPlayer AS3514 handling with an "ascodec" API - inspired ↵Dave Chapman2008-10-31
| | | | | | by the wmcodec API used with the Wolfson codecs. The intention is to implement this API for the AS3525 and then share code with the Sansa V2 ports. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18940 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
* Accept FS #9021 by James Vasile and apply the fix to the other drivers that ↵Peter D'Hoye2008-05-25
| | | | | | have the same issue. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17630 a1c6a512-1295-4272-9138-f99709370657
* Philips GoGear SA9200 port. Working bootloader and normal builds, including ↵Mark Arigo2008-05-21
| | | | | | sound. No touchpad now, buttons limited to using vol+/vol-/power for up/down/select. Rockbox USB is enabled since the OF is MTP only...read the warnings on the PortalPlayerUsb wiki page. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17591 a1c6a512-1295-4272-9138-f99709370657
* Add svn:kewords and svn:eol-style properties. Fix a comment in as3514.c.Michael Sevakis2008-05-14
| | | | git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17500 a1c6a512-1295-4272-9138-f99709370657