Commit graph

5 commits

Author SHA1 Message Date
Cástor Muñoz
42abc6a496 iPod Classic: capture support for CS42L55 codec
There are a couple of power saving options that can be selected using
defines, they configure the CODEC in a different way than OF does:

 MONO_MIC: jack microphone is connected to left channel, disabling
 right channel saves ~1 mW, there is no reason to not to do it.

 BYPASS_PGA: this option only applies to the line-in, OF does not
 bypass the PGA and configures it to 0 dB gain. At the beginning,
 this patch was written based on CODEC datasheet, bypassing PGA
 because it saves power and incrementes dinamic range ~1dB, i have
 used this setup for a while without problems. Finally this option
 was disabled at the last minute, i decided to do it after reviewing
 the OF and realizing that CS42L55 datasheet recommends to bypass the
 PGA only if the HW includes a couple of capacitors (see Typical
 Connection Diagram, Note 4), at this moment i don't know if Classic
 includes these capacitors (probably not). Anyway, i am not able to
 tell the difference listening to voice recodings.

TODO:
- Use variable PGA gain for jack microphone (it is fixed to +12 dB.
  as OF does).
- I am not a fan of having lots of unused #define options, these could
  be useful for a generic driver but actually this driver is Classic
  oriented, i am not sure if it could be considered disirable to
  eliminate them in the final version.

Change-Id: I3dadf2341f44d5e13f3847e6c9de4a76cd6f0918
2015-10-07 06:15:03 +02:00
Michael Sevakis
e61e9c61d0 Do some cleanup, adjustment and a couple fixes to recent sound changes.
* 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
2013-04-22 20:38:17 -04:00
Michael Sevakis
0c7b787398 Straighten out the mad twisted state of sound.c and related areas.
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
2013-04-15 12:02:05 -04:00
Michael Sparmann
9b5c95f557 Fix CS42L55 (iPod Classic) tone control
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29002 a1c6a512-1295-4272-9138-f99709370657
2011-01-07 23:09:09 +00:00
Michael Sparmann
152847977a New port: iPod Classic (also known as iPod 6G/6.5G/7G)
Major known issues:
- No bootloader yet
- No support for the first-generation 160GB CE-ATA hard disk drive yet
- Audio playback is slow, only FLAC seems to reach realtime


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28953 a1c6a512-1295-4272-9138-f99709370657
2011-01-02 23:16:27 +00:00