Commit graph

99 commits

Author SHA1 Message Date
Wolfram Sang
e23c78522a si4700: remove unneeded ';' directly after a 'case'
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Change-Id: I3527308cc2495ef5c09b63a071a2c3bdc8ad0e5e
2023-01-14 21:17:58 +01:00
Wolfram Sang
5b8873bf33 RFT: convert Gigabeat RDS to thread
This kind of reverts 7b596416bf ("Gigabeat S: Update RDS processing to
use asynchronous I2C rather than thread."). However, requiring RDS to
run in thread context will a) allow more upcoming features and b) remove
quite some complexity from the codebase (see the diffstat here) because
Gigabeat is the only user. iMX31 should be able to handle one more
thread, as it can even run Linux.

Change-Id: I46130034595ba66392c5417c275d036f4bd26943
2022-02-07 22:01:20 +01:00
Wolfram Sang
76a2a00732 si4700: optimize RDS cache update a little
use si4700_read() instead of si4700_read_reg() to make it clear we are
not interested in the register itself but in the cache update. Also, a
tiny bit more efficient as we save a function call and don't request a
return value we don't use anyhow.

Change-Id: Ibbb66fd9e5ea748ba11ac3c2a0570f5219b72637
2022-01-30 12:27:30 -05:00
Wolfram Sang
de0346065b Sansa Clip+: add RDS support
Based on a patch by Amaury Pouly which was based on a patch from Ryan
Hitchman.

I mainly moved the code for polling into the tuner driver so it can be
reused by other targets. I added the CONFIG parameter for the polling
frequency (in ticks) to save energy. Also, I did some minor cleanups.

Change-Id: I95a62e7e1e42c62dbf47ecb27a3b312a42be62aa
2021-11-18 16:44:21 -05:00
Solomon Peachy
3ba2f6e5c7 Nuke all TCC77x targets: iAudio 7, Sansa C100, M200(v1-3), Logik DAX
They were never finished, never saw any release ever, and haven't
compiled for the better part of a decade.  Given their HW capabilities [1],
they are not worth trying to fix.

[1] 1-2MB RAM, ~256MB onboard flash, no expandability

Change-Id: I7b2a5806d687114c22156bb0458d4a10a9734190
2021-04-26 07:41:51 -04:00
Solomon Peachy
092c340a20 [1/4] Remove SH support and all archos targets
This removes all code specific to SH targets

Change-Id: I7980523785d2596e65c06430f4638eec74a06061
2020-07-24 21:20:13 +00:00
LiveboxAndy
77f8c9c9f1 Update to allow the Apple Radio Remote to function on iPod Video 5G.
This was broken when the major update to iap was comitted.
ia-lingo7.c created and various iap related files modified.
On 4G, 6G and Nano 1/2Gen iPods the remote will function
even though the radio won't.
Tested on 4G Greyscale, 4G Color, 4G Photo, 4G Mini 1st Gen,
4G Mini 2Gen, Nano 1G, Nano 2G, Video 5G, Video 5.5G

Change-Id: Ia74e3d07d9ab5edc6da8eafa96801ede722be331
2020-07-09 18:02:07 +00:00
Solomon Peachy
eee3f0ce79 FS#12610 - Clip+ Ticking Noise Fixed in Radio
Patch taken from Igor Poretsky's tree.

Original clip-radio-tick.patch modified to acts only when screen is
deemed, or when recording, in order to preserve indicators
functionality.

Change-Id: I62afb24a0dad7ad2ecc9272c24810b37f032408d
2018-12-22 20:12:10 -05:00
Michael Sevakis
eaf6aad690 Forgot to remove unused RDS buffers from the ipod remote tuner.
Also, use rds_reset() now to clear data on station change since
the rds driver internal buffers are used.

Change-Id: I043b09d661eeec21617381015347f0bcead4f7d4
2017-02-12 00:21:09 -05:00
Michael Sevakis
523ef4edbd Fix warnings and errors from fc9695e
* fmradio.c needs an implementation of tuner_get_rds_info() for the
sim (kill all the sims).

* Some macro bitflags shouldn't be seen unless HAVE_RDS_CAP is
defined.

Change-Id: Idd00c94ca2fc43cf32f9223aa4530d5a02fb3454
2017-02-11 23:16:39 -05:00
Michael Sevakis
fc9695eb47 Improve radio RDS driver and framework
* 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
2017-02-11 22:19:32 -05:00
Szymon Dziok
f734eedc1f Disable detection of fm radio for the YH920, it's pointless.
Change-Id: Ibabda73046dc523c2bd0b1dfd0644f8882fbb74c
2014-07-26 15:36:12 +00:00
Szymon Dziok
eacd76cb80 Radio and radio recording for Samsung YH-920.
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-06-18 18:06:17 +00:00
Lorenzo Miori
adc503302c tea5767: properly power up the tuner during detect
Change-Id: I5ca5c3ae28db1427e2528cb1740a9199180b9b38
Reviewed-on: http://gerrit.rockbox.org/670
Reviewed-by: Amaury Pouly <amaury.pouly@gmail.com>
2013-11-21 14:26:24 +01:00
Amaury Pouly
7a65710836 tea5760uk: use correct i2c address on the Creative
Actually 0x20 is the right address, the 0x22 applies to the meizu which
probably use a Chinese clone with a non-spec compliant address.

Change-Id: I65b9ab6477c07a2293226536db3e696d34d3bc2c
2013-10-22 00:34:45 +02:00
Amaury Pouly
0463bf4cb2 tea5760uk: properly power up the tuner during detect
The old was doing register read/writes without calling tuner_power(), this
is broken for target with real tuner power management.

Change-Id: I5e60234697a8b91de6189daf6a10e871d5119b65
2013-10-21 23:54:04 +02:00
Amaury Pouly
9bdf24a4fe tea5760uk: add support for TEA5761UK
They share most of registers (except test and some extra bits), since our
driver is very basic, it is safe to relax the manufacurer & chip id check.

Change-Id: If54e8b9e0d852cd9128d5e28ff59bd2c7a55d98d
2013-10-21 23:52:40 +02:00
Bertrik Sikken
9b8f11d94a Fix LV24020 tuner chip volume level definition (found by cppcheck)
Change-Id: I328cfbd7c9fc6295db2e62f6174f8f4405e281a8
2013-03-24 16:03:31 +01:00
Amaury Pouly
224c6d68f1 stfm1000: comment static unused function
Change-Id: Ie918a07c72bf9086508731faf658d57a286d922a
2013-01-15 19:49:52 +00:00
Amaury Pouly
f7132e4044 Fix copyright headers
Change-Id: Ie65920b1192e9b737fcc2554d280fbcedfa39800
2012-12-29 01:40:35 +01:00
Ryan Hitchman
bece6cb9da si4700: fix typo
Change-Id: I3ebeaf8188fc330921089a148cac1f3ea5740e23
Reviewed-on: http://gerrit.rockbox.org/370
Reviewed-by: Bertrik Sikken <bertrik@sikken.nl>
2012-12-09 15:21:36 +01:00
Amaury Pouly
e401683482 zenxfi3&stfm1000: implement fmradio i2c and debug screen
Change-Id: I83dbdee13185d9adcf590dc213da5a8c97adb2ba
2012-05-19 18:04:25 +02:00
Amaury Pouly
b422be9bd0 Add stub STFM1000 tuner driver
Change-Id: I7f82f7b8971de75c92f84d12aaddccc50f3e47b1
2012-05-19 16:10:52 +02:00
Bertrik Sikken
73732f406e si4700 tuner: fix power consumption issue caused by ill-defined power state at startup
Change-Id: I657bc7e3d330f436859cfef2a89b0813bc008c49
2012-04-11 23:31:19 +02:00
Bertrik Sikken
3cb0d71759 si470x tuner: remove obsolete handling of special value 2 for RADIO_SLEEP
Change-Id: I2291a9f402ff0da03fe58933a33d67c2ac4f0332
2012-04-09 13:22:41 +02:00
Frank Gevaerts
416da2260c Call tuner_power(true) from the correct place for lv24020lp.
This fixes radio not working on c200 and e200 (and possibly others),
as reported in FS#12631.

Change-Id: Idd66fa3b74916cc6f2de45ae7dd89b3bfd70f070
2012-04-02 22:14:07 +02:00
Amaury Pouly
7d599b4311 radio: include power.h in drivers for tuner_power()
Change-Id: I1ef8917b28b6d955e456c0b3737d41d356f34ec3
2012-02-25 16:07:17 +01:00
Amaury Pouly
906e90eb7b Move radio power handling from apps/ to drivers.
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>
2012-02-25 15:59:08 +01:00
Amaury Pouly
ac4d648958 fuze+: use the si4700 internal oscillator and set a pin on power down (seems important)
Change-Id: If737438ddb726e51e0a725e27bc93950eb3657bd
2012-02-01 17:51:01 +01:00
Michael Sevakis
2403f38c1f RDS: Use a define that doesn't imply any particular hardware dependency.
Theoretically, anything with the capability could implement the decoding
action in an ISR on any radio chip supporting RDS.


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31464 a1c6a512-1295-4272-9138-f99709370657
2011-12-29 14:55:49 +00:00
Michael Sevakis
7b596416bf Gigabeat S: Update RDS processing to use asynchronous I2C rather than thread.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31462 a1c6a512-1295-4272-9138-f99709370657
2011-12-29 12:02:49 +00:00
Bertrik Sikken
8c19dcd598 FS#12370: Initial RDS support for Si4701/Si4703 tuner (beast and clip zip)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31346 a1c6a512-1295-4272-9138-f99709370657
2011-12-17 20:24:19 +00:00
Bertrik Sikken
5515a7a880 RDA5802 tuner: use channel spacing of 100 kHz when possible (instead of always 50 kHz)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31213 a1c6a512-1295-4272-9138-f99709370657
2011-12-11 17:38:49 +00:00
Bertrik Sikken
6672766dfe rda5802: don't use the si4700-specific exceptions for putting the tuner to sleep
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29984 a1c6a512-1295-4272-9138-f99709370657
2011-06-07 21:07:49 +00:00
Bertrik Sikken
1c22bbb1c2 FS#12094 - RDA5802 tuner: clean up register 0x4 handling, drop implicitly enabled soft-mute by Stephan Grossklass and me
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29959 a1c6a512-1295-4272-9138-f99709370657
2011-06-04 20:18:10 +00:00
Bertrik Sikken
4097f44c5e Fix FS#11813 - Frequency is not tuned the first time the radio is turned on
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29946 a1c6a512-1295-4272-9138-f99709370657
2011-06-02 15:17:55 +00:00
Bertrik Sikken
069567c0bc iap: pass length and data pointer to iap_handlepkt functions, this prepares for iap large packet support.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29815 a1c6a512-1295-4272-9138-f99709370657
2011-05-02 21:55:13 +00:00
Bertrik Sikken
0d5e470a45 si4700/rda5802 tuners: prevent hang when changing radio region. Probably fixes bug FS#11754 .
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28582 a1c6a512-1295-4272-9138-f99709370657
2010-11-14 09:25:08 +00:00
Bertrik Sikken
de870b3ee0 Signal strength meter for FM radio - FS#8151 by Przemysław Hołubowski
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28559 a1c6a512-1295-4272-9138-f99709370657
2010-11-11 21:13:29 +00:00
Bertrik Sikken
598f56ecb2 Simplify unsigned int <-> unsigned char array conversion in ipod_remote_tuner.c (make it endianness independent)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28537 a1c6a512-1295-4272-9138-f99709370657
2010-11-08 23:23:00 +00:00
Bertrik Sikken
bf679fa4ac Enable tea5767 tuner detection for Philips GoGear HDD63x0 too (HDD6320 does not have a tuner, HDD6330 does)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28496 a1c6a512-1295-4272-9138-f99709370657
2010-11-05 18:21:20 +00:00
Bertrik Sikken
981a639ade Implement tea5767 tuner detection - FS#11714 by me
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28493 a1c6a512-1295-4272-9138-f99709370657
2010-11-05 17:04:18 +00:00
Marcin Bukat
56c4e9fa60 Separate mas35xx lowlevel stuff. Move SH specific bits to target tree. FS#11189 by me.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28425 a1c6a512-1295-4272-9138-f99709370657
2010-10-31 21:09:34 +00:00
Bertrik Sikken
055071195c si4700 tuner: lower stereo switchover range, so it switches to stereo for weaker signals. Should fix FS#11405.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28284 a1c6a512-1295-4272-9138-f99709370657
2010-10-15 18:13:31 +00:00
Bertrik Sikken
4aa42f3d43 RDA5802 tuner: fix small bug in rda5802_init (writing too much data)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28170 a1c6a512-1295-4272-9138-f99709370657
2010-09-26 11:39:27 +00:00
Bertrik Sikken
c0edce8f5c iap: make variable serbuf non-global
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28128 a1c6a512-1295-4272-9138-f99709370657
2010-09-20 19:37:17 +00:00
Bertrik Sikken
aea21cd18b ipod fm remote: some static/const fixes from FS #11266 by me
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27867 a1c6a512-1295-4272-9138-f99709370657
2010-08-23 20:49:33 +00:00
Bertrik Sikken
adc472bec5 FM tuner region code cleanup - FS #11492 by me.
This removes the tuner-specific region structs and makes each driver use the common one (which is now extended with a deemphasis field)


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27579 a1c6a512-1295-4272-9138-f99709370657
2010-07-26 20:15:16 +00:00
Michael Sevakis
08d09e678f Sanyo lv24020lp FM: Improve frequency measurement on PP thus improving initial frequency setting. Properly account for IF when tuning FM oscillator (this worked poorly before but appears to work as expected now -- aka. works for me). Not sure what this will do to iAudio7 or Cowon D2 but if they can implement a good duration measurement, they should do so or use the internal timer if possible.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27042 a1c6a512-1295-4272-9138-f99709370657
2010-06-22 07:27:34 +00:00
Michael Sevakis
831707d991 lv24020lp tuner: On PP targets (c200/e200), use the atomic GPIO bitwise macros for the interface since it shares GPIOH with the clickwheel interrupt.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27038 a1c6a512-1295-4272-9138-f99709370657
2010-06-22 04:00:34 +00:00