Commit Graph

25 Commits

Author SHA1 Message Date
Solomon Peachy
fe2d52cc7d pcm: Get rid of pcm_play_pause() and associated APIs
Nothing in the core has used it for some time.  It's exported to the
plugin API but the last plugins to use it were switched to the mixer API
back in 2011.

This allows us to get rid of pcm_play_dma_pause() from all audio drivers

Change-Id: Ic3fa02592316f84963e41d792d1cabb436d1ff6b
2020-10-31 01:18:27 +00:00
Michael Sevakis
286a4c5caa Revise the PCM callback system after adding multichannel audio.
Additional status callback is added to pcm_play/rec_data instead of
using a special function to set it. Status includes DMA error
reporting to the status callback. Playback and recording callback
become more alike except playback uses "const void **addr" (because
the data should not be altered) and recording  uses "void **addr".
"const" is put in place throughout where appropriate.

Most changes are fairly trivial. One that should be checked in
particular because it isn't so much is telechips, if anyone cares to
bother. PP5002 is not so trivial either but that tested as working.

Change-Id: I4928d69b3b3be7fb93e259f81635232df9bd1df2
Reviewed-on: http://gerrit.rockbox.org/166
Reviewed-by: Michael Sevakis <jethead71@rockbox.org>
Tested-by: Michael Sevakis <jethead71@rockbox.org>
2012-03-03 07:23:38 +01:00
Michael Sevakis
6a67707b5e Commit to certain names for cache coherency APIs and discard the aliases.
Wouldn't surprise me a bit to get some non-green.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31339 a1c6a512-1295-4272-9138-f99709370657
2011-12-17 07:27:24 +00:00
Michael Sevakis
4db3e89652 Shuffle some functions around so that interfacing with playback.c in particular isn't required. Though playback does finish the audio init, pcm doesn't care who does it.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30403 a1c6a512-1295-4272-9138-f99709370657
2011-09-01 12:15:43 +00:00
Michael Sevakis
a2b6703a36 Commit FS#12150 - Fully-functional audio mixer - and finally whip old limitations about playback of voice and other sounds when paused. Channels are independent in state and amplitude. Fade on stop/pause is handled by the channel's volume control rather than global volume which means it now works from anywhere. Opens up the possibility of plugin sounds during music playback by merely adding an additional channel enum. If any PCM drivers were not properly modified, see one of the last comments in the task for a description of the simple change that is expected. Some params are tunable in firmware/export/pcm-mixer.h as well.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30097 a1c6a512-1295-4272-9138-f99709370657
2011-06-29 06:37:04 +00:00
Michael Sevakis
e286b0bbc0 Remove atomic register bit manipulation functions from i.MX and s3c target code and introduce generic functions for ARM (bitmod32, bitset32, and bitclr32). Multiprocessor support is possible but just not implemented at the moment, only interrupt lockout.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27188 a1c6a512-1295-4272-9138-f99709370657
2010-06-30 02:02:46 +00:00
Michael Sevakis
d56999890f Make PCM->driver interface about as simple as it will get. Registered callback, zero data, alignment and stops are handled entirely inside pcm.c; driver merely calls fixed pcm.c callback. Remove pcm_record_more and do it just like playback; the original reason behind it isn't very practical in general. Everything checks out on supported targets. There wer some compat changes I can't check out on many unsupoorted but if there's a problem it will be a minor oops. Plugins become incompatible due to recording tweak-- full update. Sorted API.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26253 a1c6a512-1295-4272-9138-f99709370657
2010-05-24 16:42:32 +00:00
Michael Sevakis
7bbd71af5e Meg F/X: Fix wrong address for cache flush at PCM start; it should be virtual, not physical.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20002 a1c6a512-1295-4272-9138-f99709370657
2009-02-13 19:14:51 +00:00
Michael Sevakis
b6e78acc5e Get rid of some pcm_apply_settings cruft at the low level I somehow missed. Move the ones in pcm.c around to better spots. Remove a variable from pcm-pnx0101.c that should no longer be there.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19402 a1c6a512-1295-4272-9138-f99709370657
2008-12-12 12:46:57 +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
a1ab7a55ff Meg-FX: s3c register definitions really should be unsigned. Switch from 'int' to 'unsigned long' like other targets.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19325 a1c6a512-1295-4272-9138-f99709370657
2008-12-04 15:06:48 +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
Karl Kurbjun
66010b9f30 Fix high power consumption at powerup.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17445 a1c6a512-1295-4272-9138-f99709370657
2008-05-10 19:43:23 +00:00
Michael Sevakis
a65406e3f4 meg-fx: It's important to make sure certain interrupt-related registers have bits changed atomically.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16894 a1c6a512-1295-4272-9138-f99709370657
2008-03-31 01:29:50 +00:00
Michael Sevakis
af395f4db6 Do core interrupt masking in a less general fashion and save some instructions to decrease size and speed things up a little bit. Small fix to a few places where interrupts would get enabled again where they shouldn't have been (context switching calls when disabled).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16811 a1c6a512-1295-4272-9138-f99709370657
2008-03-26 01:50:41 +00:00
Karl Kurbjun
5a9a2b7bc4 Unify the Gigabeat F/X and M:Robe MMU code while enabling it for the M:Robe
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15275 a1c6a512-1295-4272-9138-f99709370657
2007-10-23 03:29:15 +00:00
Michael Sevakis
6077e5b7c8 Unify PCM interface just above the hardware driver level for all targets including the sims. Perform lockout of audio callback when changing states. Weird new playback or recording trouble? Check before and after this revision first though things seem quite sound.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15006 a1c6a512-1295-4272-9138-f99709370657
2007-10-06 22:27:27 +00:00
Robert Keevil
7785d6949e Temporary fix for FS#7257 and FS#7261 - playback resumes while paused when seeking
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13795 a1c6a512-1295-4272-9138-f99709370657
2007-07-05 10:19:06 +00:00
Michael Sevakis
f783617cbc Gigabeat: Audio tweak mishmash - Make sure zero crossing detection times out so the volume always gets updated. Make sure i2s is off at boot and set to proper mode before audio hardware is initialized. Make pausing pcm instant instead of waiting until the end of the current DMA transfer.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13706 a1c6a512-1295-4272-9138-f99709370657
2007-06-24 20:41:27 +00:00
Marcoen Hirschberg
eb7603f1c5 always reset the pcm_paused flag when stopping playback. fixes FS #7187
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13423 a1c6a512-1295-4272-9138-f99709370657
2007-05-19 19:30:08 +00:00
Michael Sevakis
5d73049768 Gigabeat: Remove the 8kHz for now because it doesn't seem to work too well. Also, HW_SAMPR_CAPS should always be defined for sim and target.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13321 a1c6a512-1295-4272-9138-f99709370657
2007-05-04 15:21:24 +00:00
Michael Sevakis
d989f19eda No more ear doctor visits after powering/unpowering the Gigabeat. Cleanup a little too.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13312 a1c6a512-1295-4272-9138-f99709370657
2007-05-03 18:08:00 +00:00
Michael Sevakis
f48e0b514c Gigabeat: Get rid of the obsolete FIQ wrapper (not used on PP anymore FIY, but no change there). Use the FIQ stack for DMA address and size variables instead of globals.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13309 a1c6a512-1295-4272-9138-f99709370657
2007-05-03 12:39:36 +00:00
Michael Sevakis
3c38fe4204 Gigabeat: Separate driver for audio codec. Tweak pcm driver to comply with intended interface.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13307 a1c6a512-1295-4272-9138-f99709370657
2007-05-02 22:33:24 +00:00
Marcoen Hirschberg
f44f961812 move the Gigabeat from gigabeat/meg-fx to s3c2440/gigabeat-fx to avoid problems with possible ports in the future: Gigabeat S/V (i.mx31 based) and Kenwood HD20GA7/HD20GA9 (s3c2440 based)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13200 a1c6a512-1295-4272-9138-f99709370657
2007-04-18 12:22:27 +00:00