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
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
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
* 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
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
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>
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
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
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
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
- 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
-> 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
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
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
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
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
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
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