Commit graph

18 commits

Author SHA1 Message Date
Amaury Pouly
cc031d41ab wm8731: document audiohw settings
Change-Id: I78ec26a00a3e14a95c591ac81d96e1b480b9138e
2016-12-12 13:11:25 +01: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
Christian Gmeiner
ad6b6d764b cleanup audiohw_set_frequency by adding it to audiohw.h and removing it from all driver .h files
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19806 a1c6a512-1295-4272-9138-f99709370657
2009-01-20 22:55:10 +00:00
Michael Sevakis
e69d567d9e Bring consistency to pcm implementation and samplerate handling. Less 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-12-12 11:01:07 +00:00
Michael Sevakis
ea929a3e45 Have drivers merged for WM8711/21/31 since they are so similar but respect 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
2008-12-08 21:09:56 +00:00
Michael Sevakis
7bf4e7bda7 Simplify the wm8731 driver by adding a masked write function. Change _write_or/and to _set/clear. Reduce init sequence by initializing shadows to hardware defaults.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19197 a1c6a512-1295-4272-9138-f99709370657
2008-11-24 15:26:39 +00:00
Peter D'Hoye
695c39bc9c Remove the audiohw_set_nsorder() function since it is not used, only implemented on WM8731 and not wanted/used there.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18829 a1c6a512-1295-4272-9138-f99709370657
2008-10-18 22:37:41 +00:00
Jens Arnold
7f71041031 Fix deemphasis control bit position.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18478 a1c6a512-1295-4272-9138-f99709370657
2008-09-09 21:49:28 +00:00
Jens Arnold
b6058de5f9 Remove leftover cruft.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18439 a1c6a512-1295-4272-9138-f99709370657
2008-09-07 18:00:00 +00:00
Christian Gmeiner
1ffa86fed1 cleanup some audio driver headers
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17924 a1c6a512-1295-4272-9138-f99709370657
2008-07-02 23:01:21 +00:00
Daniel Stenberg
2acc0ac542 Updated our source code header to explicitly mention that we are GPL v2 or
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-06-28 18:10:04 +00:00
Christian Gmeiner
06971be8cd Return value of audiohw_set_xxx_vol is never used and most of the time we have a return 0; --> kick it
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16300 a1c6a512-1295-4272-9138-f99709370657
2008-02-13 11:19:23 +00:00
Christian Gmeiner
341188d68d move audiohw_postinit to audiohw.h
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16293 a1c6a512-1295-4272-9138-f99709370657
2008-02-12 20:40:53 +00:00
Christian Gmeiner
41a67a7e90 get rid of audiohw_reset
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15720 a1c6a512-1295-4272-9138-f99709370657
2007-11-20 10:28:53 +00:00
Christian Gmeiner
c583f3c8d1 introduce general audiohw api for recording
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15687 a1c6a512-1295-4272-9138-f99709370657
2007-11-19 15:50:52 +00:00
Michael Sevakis
fc8bc5ca35 Oops. Correct reversed DSP mode A/B bits for WM8731/21.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15008 a1c6a512-1295-4272-9138-f99709370657
2007-10-07 05:59:38 +00:00
Michael Sevakis
15b7321fe1 Split wm8731 and wm8721 drivers. wm8721 can be much simpler since it has no recording. Provide reg bit definitions for those. Add some temporary hacks pcm-pp to prevent crashing when playing after recording. Make playback start after recording on pp5020. Get wm8731 to monitor recording but plans are to do that digitally.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14948 a1c6a512-1295-4272-9138-f99709370657
2007-10-02 07:48:50 +00:00