summaryrefslogtreecommitdiff
path: root/firmware/export/as3514.h
AgeCommit message (Collapse)Author
2010-09-06Fix set_serial_descriptor() for targets with as3543Rafaël Carré
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28013 a1c6a512-1295-4272-9138-f99709370657
2010-06-26e200v1/c200v1: Implement limited samplerate switching. Rates 24kHz and below ↵Michael Sevakis
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
2010-06-24Commit FS#11364 by me. Increases the A3525v2 volume range by 7.5dB. Each ↵Michael Giacomelli
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
2010-05-22as3525v2: RTC alarmRafaël Carré
A specific poweroff function needs to be used for wake-up to work Disable RTC in bootloaders for consistency with other Sansas git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26243 a1c6a512-1295-4272-9138-f99709370657
2010-05-19as3514.c: clean upRafaël Carré
- 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
2010-05-17as3514/as3543 fixesRafaël Carré
- Enable end of charge monitoring once, it doesn't need to be disabled - Acknowledge the first (wrong) end of charge interrupt on charger enable (this had been broken in r25299) - Centralize reads to ENRD* registers and cache the results when needed - on PP it is not needed because reads are atomic, we only check for end of charge when the charging, and for charger presence when discharging as3525v2 (using as3543) specifics - I got the datasheet today from AMS, thanks to them for being so fast and not require me to sign tons of papers! - USB detection now works on as3525v2 using the as3543. Clip+ won't reboot to OF yet, it needs mkamsboot support first (usbstack disabled) - Charging should work, the CHARGER register is at a different place, it is an extended PMU register -> use ascodec_read/write_charger() to access it - real interrupts are not used yet for ENRD, we get thousands of interrupts per second, apparently only limited by the i2c clock. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26116 a1c6a512-1295-4272-9138-f99709370657
2010-05-16as3525v1 use an as3515 audio codec/PMU, not an as3517 as previously thoughtRafaël Carré
-> 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
2010-05-07as3525v2: make sure volume is normal by writing Audioset2 registerRafaël Carré
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
2010-04-26as3525v2: fix volume setting (can now go very low)Rafaël Carré
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25732 a1c6a512-1295-4272-9138-f99709370657
2010-04-26as3514: detail bit of AS3543_DAC_IFRafaël Carré
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
2010-03-29as3525v2 : recording (FM only, no microphone yet)Rafaël Carré
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
2010-03-29as3525v2: FM playback (only tested on Clip+)Rafaël Carré
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25383 a1c6a512-1295-4272-9138-f99709370657
2010-03-29as3543: name 0x1b & 0x1c registersRafaël Carré
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25379 a1c6a512-1295-4272-9138-f99709370657
2010-03-23Add handler for audio irq.Tobias Diedrich
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25299 a1c6a512-1295-4272-9138-f99709370657
2010-03-20Clip+: enable sound on "as3514" (as3543 in fact)Rafaël Carré
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
2009-02-05FS#9611 - Sansa Clip radio code. Commit final part which enables the LINE2 ↵Bertrik Sikken
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
2009-01-20cleanup audiohw_set_frequency by adding it to audiohw.h and removing it from ↵Christian Gmeiner
all driver .h files git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19806 a1c6a512-1295-4272-9138-f99709370657
2009-01-11c200v1/e200v1: Add battery charging. This should be usable on v2 players but ↵Michael Sevakis
those should be evaluated for current, endpoint voltage and whether or not accurate battery readings may always be obtained (which determines algorithm setup and behavior). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19748 a1c6a512-1295-4272-9138-f99709370657
2008-12-12Bring consistency to pcm implementation and samplerate handling. Less ↵Michael Sevakis
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
2008-11-25Add register bit defines for as3514 and clean stuff up. Reduce poppiness at ↵Michael Sevakis
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
2008-11-14Remove some unneeded #includesDave Chapman
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19105 a1c6a512-1295-4272-9138-f99709370657
2008-11-12Assume that AS3514_I2C_ADDR is not target-specific. If it turns out to be ↵Dave Chapman
different to 0x46 in a future target, then perhaps move this definition into the ascodec-target.h files. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19100 a1c6a512-1295-4272-9138-f99709370657
2008-11-10Fix red: e200/c200 use ADC_UNREG_POWER define (for compatibility)Rafaël Carré
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19080 a1c6a512-1295-4272-9138-f99709370657
2008-11-10as3514: do not error out if included by files which don't use AS3514_I2C_ADDRRafaël Carré
If the model is unknown and try to use it, the build will fail anyway because it will not be defined git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19079 a1c6a512-1295-4272-9138-f99709370657
2008-11-10Sansa AMS: use the AS3514 ADC driverRafaël Carré
Move the ADC defines to as3514.h, and make adc-target.h only include as3514.h Implement the missing API (ascodec_readbytes, ascodec_(un)lock) Revert the changes to the PP-specific arm/ascodec-target.h in r19073, use a AS3525 specific ascodec-target.h while moving the AS3514 specific code in export/as3514.h git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19076 a1c6a512-1295-4272-9138-f99709370657
2008-11-10Merge target/arm/as3525/as3525-codec.h into target/arm/ascodec-target.hRafaël Carré
The AMS Sansa use the same AS3514 registers (except USB_UTIL which was added) Use the register defines in AMS Sansa code instead of hardcoded values git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19073 a1c6a512-1295-4272-9138-f99709370657
2008-10-31Abstract the PortalPlayer AS3514 handling with an "ascodec" API - inspired ↵Dave Chapman
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
2008-06-28Updated our source code header to explicitly mention that we are GPL v2 orDaniel Stenberg
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
2008-05-21Philips GoGear SA9200 port. Working bootloader and normal builds, including ↵Mark Arigo
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
2008-04-15FS#8898 - Prefix AS3514 registers with AS3514_Bertrik Sikken
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17130 a1c6a512-1295-4272-9138-f99709370657
2008-03-04Second part of FS#8272 - include charger status in Sansa debug menu.Barry Wardell
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16513 a1c6a512-1295-4272-9138-f99709370657
2008-02-13Return value of audiohw_set_xxx_vol is never used and most of the time we ↵Christian Gmeiner
have a return 0; --> kick it git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16300 a1c6a512-1295-4272-9138-f99709370657
2008-02-09move audiohw_enable_output to audiohw.hChristian Gmeiner
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16251 a1c6a512-1295-4272-9138-f99709370657
2007-11-20get rid of audiohw_resetChristian Gmeiner
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15720 a1c6a512-1295-4272-9138-f99709370657
2007-11-19introduce general audiohw api for recordingChristian Gmeiner
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15687 a1c6a512-1295-4272-9138-f99709370657
2007-10-25FS#8023: Use of AS3514 #defines instead of magic values.Barry Wardell
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15297 a1c6a512-1295-4272-9138-f99709370657
2007-09-06Sansa c200 port. Rockbox works with sound. Several features are disabled ↵Mark Arigo
including some lcd options, FM radio, recording, and all plugins. Loading the OF from the Rockbox bootloader does not work. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14625 a1c6a512-1295-4272-9138-f99709370657
2007-06-13* changed pararmeter of audiohw_mute from int to boolChristian Gmeiner
* unification of init and close NOTE: audiohw_init is a void function now, because it never (can) fail okay from JdGordon@irc git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13622 a1c6a512-1295-4272-9138-f99709370657
2007-06-11some little more work on audio codec driver unification - more will followChristian Gmeiner
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13620 a1c6a512-1295-4272-9138-f99709370657
2007-05-22make audiohw.h include the DAC header filesMarcoen Hirschberg
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13473 a1c6a512-1295-4272-9138-f99709370657
2007-05-22* move audio settings into audio codec driversChristian Gmeiner
* add mas35xx driver for all mas35xx targets. Later mas35xx code from sound.c will move to this new driver git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13464 a1c6a512-1295-4272-9138-f99709370657
2007-05-20Increase sansa volume range at the lower end. This seems to be necessary Antonius Hellmann
now after the audio improvement: -40.5dB ... +6dB => -73.5 ... +6dB git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13447 a1c6a512-1295-4272-9138-f99709370657
2007-04-15adapt some valuesChristian Gmeiner
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13167 a1c6a512-1295-4272-9138-f99709370657
2007-04-15* save more power, as we dont need the mixer (yet)Christian Gmeiner
* clean up headers and other clean ups git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13166 a1c6a512-1295-4272-9138-f99709370657
2007-04-14* make it louder - inspired by FS #6911Christian Gmeiner
* disable some unneeded stuff -> save power * remove some unneeded functions * shadow registers, so we dont need to do so much i2c traffic git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13150 a1c6a512-1295-4272-9138-f99709370657
2007-03-13Improved ADC driver for AS3514 (used in PP5024 - ie. Sansa e200) based off ↵Barry Wardell
datasheet. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12745 a1c6a512-1295-4272-9138-f99709370657
2007-03-11Sound for Sansa E200 - based on work by myself, Rene Peinthor, Barry Wardell ↵Daniel Ankers
and Christian Gmeiner from the AS3514 datasheet. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12727 a1c6a512-1295-4272-9138-f99709370657