summaryrefslogtreecommitdiff
path: root/apps/radio
AgeCommit message (Collapse)Author
2018-12-24Do not touch FM tuner when it is turned offSolomon Peachy
Credit to Igor Poretsky Change-Id: Ie9e61740f87f3b56d0b602cd431757262a6ed808
2017-11-14nwz: improve keymapAmaury Pouly
- enable various features in radio screen (like mode switch) - improve keyboard (short play to select, long play to finish, power to abort) - enable volume keys in radio screen if available Change-Id: I01e71291cfd783763ffd55d4fa60610b6900c726
2017-02-11Improve radio RDS driver and frameworkMichael Sevakis
* Remove unused bits like the radio event and simplify basic radio interface. It can be more self-contained with rds.h only required by radio and tuner code. * Add post-processing to text a-la Silicon Labs AN243. The chip's error correction can only do so much; additional checks are highly recommended. Simply testing for two identical messages in a row is extremely effective and I've never seen corrupted text since doing that, even with mediocre reception. Groups segments must arrive in order, not randomly; logic change only accepts them in order, starting at 0. Time readout was made a bit better but really we'd need to use verbose mode and ensure that no errors were seen during receiving of time and more checks would be need to have a stable PI. The text is the important bit anyway. * Time out of stale text. * Text is no longer updated until a complete group has been received, as is specified in the standard. Perhaps go back to scrolling text lines in the radio screen? * Add proper character conversion to UTF-8. Only the default G0 table for the moment. The other two could be added in. * Add variants "RDS_CFG_PROCESS" and "RDS_CFG_PUSH" to allow the option for processed RDS data to be pushed to the driver and still do proper post-processing (only text conversion for now for the latter). Change-Id: I4d83f8b2e89a209a5096d15ec266477318c66925
2016-01-25Replace SAMSUNG_YH920_PAD with YH92XSebastian Leonhardt
seems more logical to me, and is more consistent, since "SAMSUNG_YH92X_PAD" is already used in the tex files. Change-Id: Ie9a9d850ea86155a7dcf86c88a22a420a10a3837
2014-08-30Rewrite filesystem code (WIP)Michael Sevakis
This patch redoes the filesystem code from the FAT driver up to the clipboard code in onplay.c. Not every aspect of this is finished therefore it is still "WIP". I don't wish to do too much at once (haha!). What is left to do is get dircache back in the sim and find an implementation for the dircache indicies in the tagcache and playlist code or do something else that has the same benefit. Leaving these out for now does not make anything unusable. All the basics are done. Phone app code should probably get vetted (and app path handling just plain rewritten as environment expansions); the SDL app and Android run well. Main things addressed: 1) Thread safety: There is none right now in the trunk code. Most of what currently works is luck when multiple threads are involved or multiple descriptors to the same file are open. 2) POSIX compliance: Many of the functions behave nothing like their counterparts on a host system. This leads to inconsistent code or very different behavior from native to hosted. One huge offender was rename(). Going point by point would fill a book. 3) Actual running RAM usage: Many targets will use less RAM and less stack space (some more RAM because I upped the number of cache buffers for large memory). There's very little memory lying fallow in rarely-used areas (see 'Key core changes' below). Also, all targets may open the same number of directory streams whereas before those with less than 8MB RAM were limited to 8, not 12 implying those targets will save slightly less. 4) Performance: The test_disk plugin shows markedly improved performance, particularly in the area of (uncached) directory scanning, due partly to more optimal directory reading and to a better sector cache algorithm. Uncached times tend to be better while there is a bit of a slowdown in dircache due to it being a bit heavier of an implementation. It's not noticeable by a human as far as I can say. Key core changes: 1) Files and directories share core code and data structures. 2) The filesystem code knows which descriptors refer to same file. This ensures that changes from one stream are appropriately reflected in every open descriptor for that file (fileobj_mgr.c). 3) File and directory cache buffers are borrowed from the main sector cache. This means that when they are not in use by a file, they are not wasted, but used for the cache. Most of the time, only a few of them are needed. It also means that adding more file and directory handles is less expensive. All one must do in ensure a large enough cache to borrow from. 4) Relative path components are supported and the namespace is unified. It does not support full relative paths to an implied current directory; what is does support is use of "." and "..". Adding the former would not be very difficult. The namespace is unified in the sense that volumes may be specified several times along with relative parts, e.g.: "/<0>/foo/../../<1>/bar" :<=> "/<1>/bar". 5) Stack usage is down due to sharing of data, static allocation and less duplication of strings on the stack. This requires more serialization than I would like but since the number of threads is limited to a low number, the tradoff in favor of the stack seems reasonable. 6) Separates and heirarchicalizes (sic) the SIM and APP filesystem code. SIM path and volume handling is just like the target. Some aspects of the APP file code get more straightforward (e.g. no path hashing is needed). Dircache: Deserves its own section. Dircache is new but pays homage to the old. The old one was not compatible and so it, since it got redone, does all the stuff it always should have done such as: 1) It may be update and used at any time during the build process. No longer has one to wait for it to finish building to do basic file management (create, remove, rename, etc.). 2) It does not need to be either fully scanned or completely disabled; it can be incomplete (i.e. overfilled, missing paths), still be of benefit and be correct. 3) Handles mounting and dismounting of individual volumes which means a full rebuild is not needed just because you pop a new SD card in the slot. Now, because it reuses its freed entry data, may rebuild only that volume. 4) Much more fundamental to the file code. When it is built, it is the keeper of the master file list whether enabled or not ("disabled" is just a state of the cache). Its must always to ready to be started and bind all streams opened prior to being enabled. 5) Maintains any short filenames in OEM format which means that it does not need to be rebuilt when changing the default codepage. Miscellaneous Compatibility: 1) Update any other code that would otherwise not work such as the hotswap mounting code in various card drivers. 2) File management: Clipboard needed updating because of the behavioral changes. Still needs a little more work on some finer points. 3) Remove now-obsolete functionality such as the mutex's "no preempt" flag (which was only for the prior FAT driver). 4) struct dirinfo uses time_t rather than raw FAT directory entry time fields. I plan to follow up on genericizing everything there (i.e. no FAT attributes). 5) unicode.c needed some redoing so that the file code does not try try to load codepages during a scan, which is actually a problem with the current code. The default codepage, if any is required, is now kept in RAM separarately (bufalloced) from codepages specified to iso_decode() (which must not be bufalloced because the conversion may be done by playback threads). Brings with it some additional reusable core code: 1) Revised file functions: Reusable code that does things such as safe path concatenation and parsing without buffer limitations or data duplication. Variants that copy or alter the input path may be based off these. To do: 1) Put dircache functionality back in the sim. Treating it internally as a different kind of file system seems the best approach at this time. 2) Restore use of dircache indexes in the playlist and database or something effectively the same. Since the cache doesn't have to be complete in order to be used, not getting a hit on the cache doesn't unambiguously say if the path exists or not. Change-Id: Ia30f3082a136253e3a0eae0784e3091d138915c8 Reviewed-on: http://gerrit.rockbox.org/566 Reviewed-by: Michael Sevakis <jethead71@rockbox.org> Tested: Michael Sevakis <jethead71@rockbox.org>
2014-07-26Reduce definitions of actions for fm radio.Szymon Dziok
Change-Id: I89188ecc820058b79b5c8fcf3e9b5ed49ae8aff4
2014-07-26MPIO HD200: Fix action for fm radio.Szymon Dziok
Change-Id: I65a8e6f39d47f5d091e9676102b0ec08eb08690c
2014-07-26HDD1630/HDD6330: Add actions for fm radio.Szymon Dziok
Change-Id: I6acc21663fd0bc27509f8c37c71defb817ec7108
2014-06-18Radio and radio recording for Samsung YH-920.Szymon Dziok
There is no simple method to detect radio through the 3-wire interface, so it's not implemented for the YH-925 for now. YH-920 always has a radio. Change-Id: Iea484d752915fcd40dbbbd7dbbf13e81aaf548db
2014-03-14events: Rework event subsystem (add_event, send_event) to be more versatile.Thomas Martitz
add_event_ex is added that takes an extra user_data pointer. This pointer is passed to the callback (add_event and add_event_ex have slightly different callbacks types). All callbacks also get the event id passed. Events added with add_event_ex must be removed with remove_event_ex because the user_data pointer must match in addition to the callback pointer. On the other add_event is simplified to omit the oneshort parameter which was almost always false (still there with add_event_ex). As a side effect the ata_idle_notify callbacks are changed as well, they do not take a data parameter anymore which was always NULL anyway. This commit also adds some documentation to events.h Change-Id: I13e29a0f88ef908f175b376d83550f9e0231f772
2014-01-15radio: Fix crash with radioart after skipping some stationsThomas Martitz
Change-Id: I5dbf60598f9b0b7d56272b6736726c1e6bc2295c
2014-01-14FMS: Load/update the skin at last, when fully initialzed, so that it can ↵Thomas Martitz
display the right content from the beginning. Change-Id: I15a708d34912c0749f2497baabf90d26deaaf5df
2013-12-23playback,talk: Share audiobuffer via core_alloc_maximum().Thomas Martitz
This fixes the radioart crash that was the result of buffering.c working on a freed buffer at the same time as buflib (radioart uses buffering.c for the images). With this change the buffer is owned by buflib exclusively so this cannot happen. As a result, audio_get_buffer() doesn't exist anymore. Callers should call core_alloc_maximum() directly. This buffer needs to be protected as usual against movement if necessary (previously it was not protected at all which cased the radioart crash), To get most of it they can adjust the willingness of the talk engine to give its buffer away (at the expense of disabling voice interface) with the new talk_buffer_set_policy() function. Change-Id: I52123012208d04967876a304451d634e2bef3a33
2013-12-14scroll_engine: Rename scroll_stop* functions to be more consistent with the ↵Thomas Martitz
lcd api. Change-Id: I8ada10b96bfb628cca0331689e8b936ae47c7e1c
2013-09-09radio: fix FS#12747Jonathan Gordon
Change-Id: I57448a29d986cca0535c47c0ebfa2f4f3846a936 Reviewed-on: http://gerrit.rockbox.org/614 Reviewed-by: Dominik Riebeling <Dominik.Riebeling@gmail.com> Tested-by: Dominik Riebeling <Dominik.Riebeling@gmail.com>
2013-07-16[Fuze+][Keymaps] keymaps for radio and recorder updateJean-Louis Biasini
1) Now that recording is working a few keymaps update are required. 2) also implement the radio.c file so that fm dedicated keymaps works. 3) implement some missing fm keymaps 4) manual updated accordingly Change-Id: I40be3e245853ccb9ed7a5bc5a76fe4ed90772272 Reviewed-on: http://gerrit.rockbox.org/513 Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
2013-07-06Bugfix: (un)locking state message(s) did not disappearLorenzo Miori
after unlocking the device while being into FM radio screen. This patch restores expected behaviour by forcing screen refresh when receiving the proper event. Change-Id: Ibe0864ab78619ddf235912d06a2efe3203b5042a Reviewed-on: http://gerrit.rockbox.org/505 Reviewed-by: Lorenzo Miori <memorys60@gmail.com> Tested-by: Lorenzo Miori <memorys60@gmail.com> Reviewed-by: Thomas Martitz <kugel@rockbox.org>
2013-06-10Enable key lock in radio screenAmaury Pouly
Change-Id: I75efbf1077359e4218ad33f4c1d885b24c0b7b01 Reviewed-on: http://gerrit.rockbox.org/421 Reviewed-by: Jonathan Gordon <rockbox@jdgordon.info> Reviewed-by: Thomas Martitz <kugel@rockbox.org>
2013-06-09Fix multiple problems in radioart.cThomas Martitz
The code was pretty broken with regard to the handle management of radio art images, e.g. passing the wrong data to bufopen(). Change-Id: I3480f40bce81af05d14dbf045a78485c857fb261
2012-05-28ypr0: This patch adds radio support to Samsung YP-R0Lorenzo Miori
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>
2012-05-21Fix some lockup caused by handles not being initialized to < 0...Michael Sevakis
...by default where they would be interpreted as valid but not actually be which would cause calls to buffering while it was not initialized. Add BUFFER_EVENT_BUFFER_RESET to inform users of buffering that the buffer is being reinitialized. Basically, this wraps all the functionality being provided by three events (...START_PLAYBACK, RECORDING_EVENT_START, RECORDING_EVENT_STOP) into one for radioart.c, the only user of those events (perhaps remove them?) and closes some loopholes. Change-Id: I99ec46b9b5fb4e36605db5944c60ed986163db3a
2012-02-25Move radio power handling from apps/ to drivers.Amaury Pouly
Remove direct calls to tuner_power(...) in apps/ and let the driver manage tuner power with the RADIO_SLEEP setting. Change-Id: I37cd0472e60db5d666dae1b9fe4755dd65c03edd Reviewed-on: http://gerrit.rockbox.org/84 Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
2011-12-19Add more INIT_ATTR and add config.h includes to header files with INIT_ATTR.Boris Gjenero
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31370 a1c6a512-1295-4272-9138-f99709370657
2011-12-14FS#12378 : Remove various unused code, and comment out some unused code and ↵Boris Gjenero
data for reference or future use. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31256 a1c6a512-1295-4272-9138-f99709370657
2011-12-07Fix for "FS#12430 - FM presets tags aren't dynamic in status bar."Thomas Martitz
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31162 a1c6a512-1295-4272-9138-f99709370657
2011-11-19Get rid of a really annoying #ifdef line to check if backdrop support should ↵Jonathan Gordon
be enabled git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31027 a1c6a512-1295-4272-9138-f99709370657
2011-11-17imx233/fuze+: set drive strength of tuner chip enable pin, enable backlight ↵Amaury Pouly
on panic git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31026 a1c6a512-1295-4272-9138-f99709370657
2011-10-15Changed the FOR_NB_SCREENS macro to always be a for loop that declares its ↵Björn Stenberg
own loop variable. This removes the need to declare this variable in the outer scope. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30756 a1c6a512-1295-4272-9138-f99709370657
2011-09-01Shuffle some functions around so that interfacing with playback.c in ↵Michael Sevakis
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-08-23Fix FS#12239, data abort after going from FMS to WPS.Thomas Martitz
The data abort was in find_handle() because current_handle was corrupted. This most probably happened due to the FMS allocating Radio AA on the buffer without resetting the buffer, corrupting buffering/playback state. The fix is to grab buffer control explicitely. r30308 isn't actually related, regardless of the task title. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30342 a1c6a512-1295-4272-9138-f99709370657
2011-08-14Fix errors and warnings.Thomas Martitz
The buffer_offset paramter of audio_init_recording() is removed as it was unused in both implementations. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30310 a1c6a512-1295-4272-9138-f99709370657
2011-07-21Fix FS#8656 - Error saving non-current playlist fileJonathan Gordon
Use the plugin buffer to save the playlist copy if there isnt enough buffer already allocated to the inram copy of the playlist git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30184 a1c6a512-1295-4272-9138-f99709370657
2011-07-21Pull yesno_pop out of the radio code as it is a nice simple resuasble yesno ↵Jonathan Gordon
api worth reusing git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30183 a1c6a512-1295-4272-9138-f99709370657
2011-06-26Reuse a general voice function instead of reinventing the wheel.Nils Wallménius
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30080 a1c6a512-1295-4272-9138-f99709370657
2011-06-01FS#11925 - Add a proper system to keep track of the current screen/activity ↵Jonathan Gordon
to make %cs far more useful git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29944 a1c6a512-1295-4272-9138-f99709370657
2011-05-24Fix 2 'set but not used' warnings.Nils Wallménius
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29922 a1c6a512-1295-4272-9138-f99709370657
2011-05-08More tab fixesBertrik Sikken
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29840 a1c6a512-1295-4272-9138-f99709370657
2011-03-27Fix redJonathan Gordon
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29654 a1c6a512-1295-4272-9138-f99709370657
2011-03-16Fix FS#12012 - Radio Art broken since r29259 - Embedded album art supportThomas Martitz
Forgot to adapt radio art to the new bufopen user_data argument. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29598 a1c6a512-1295-4272-9138-f99709370657
2011-03-01Remove code duplication in some generic skin touch action handling.Jonathan Gordon
fix a bug which stopped the setting_inc/dec touch actions from parsing git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29477 a1c6a512-1295-4272-9138-f99709370657
2011-02-18Fix red caused by incorrect includes.Thomas Martitz
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29329 a1c6a512-1295-4272-9138-f99709370657
2011-01-29Move fm radio related menus out of radio.c into apps/menus/.Thomas Martitz
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29162 a1c6a512-1295-4272-9138-f99709370657
2011-01-13New Touchscreen region type... 'mute' which un/mutes volume without pausing ↵Jonathan Gordon
playback git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29046 a1c6a512-1295-4272-9138-f99709370657
2010-12-14FS#11777: enhancement for rockbox_browse()Teruaki Kawashima
* Add struct browse_context to be passed to rockbox_browse. * Show proper title when selecting e.g. .wps file or .sbs file from the settings menu. * Add select only mode to rockbox_browse(). when a file is selected, it's path is stored to buffer and the browser exits without 'playing' the file. this will allow to use the browser in more places to select file including plugins. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28831 a1c6a512-1295-4272-9138-f99709370657
2010-11-11Signal strength meter for FM radio - FS#8151 by Przemysław HołubowskiBertrik Sikken
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28559 a1c6a512-1295-4272-9138-f99709370657
2010-11-02MPIO HD200: adjust FM keymapMarcin Bukat
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28446 a1c6a512-1295-4272-9138-f99709370657
2010-10-31Separate mas35xx lowlevel stuff. Move SH specific bits to target tree. ↵Marcin Bukat
FS#11189 by me. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28425 a1c6a512-1295-4272-9138-f99709370657
2010-10-17(Partially) Fix FS#11572 - no backdrop in the FM screen..\n the preset ↵Jonathan Gordon
question would clear it and not reset it, so reoder the code so it works git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28297 a1c6a512-1295-4272-9138-f99709370657
2010-09-19radio_screen() return value is unused -> voidRafaël Carré
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28113 a1c6a512-1295-4272-9138-f99709370657
2010-09-14fix build (typo)Jonathan Gordon
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28078 a1c6a512-1295-4272-9138-f99709370657