diff options
author | Wolfram Sang <wsa@the-dreams.de> | 2021-12-10 16:13:49 +0100 |
---|---|---|
committer | Wolfram Sang <wsa@the-dreams.de> | 2022-02-07 22:01:20 +0100 |
commit | 5b8873bf333add9ec7208901c62bbd30ad7ea8c3 (patch) | |
tree | f17916b7dcf0fb8059354094858a9f691c703b9f /firmware/drivers/tuner | |
parent | 8d453ae9c3beef82bd61401af6216f74a400cbd0 (diff) | |
download | rockbox-5b8873bf333add9ec7208901c62bbd30ad7ea8c3.tar.gz rockbox-5b8873bf333add9ec7208901c62bbd30ad7ea8c3.zip |
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
Diffstat (limited to 'firmware/drivers/tuner')
-rw-r--r-- | firmware/drivers/tuner/si4700.c | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/firmware/drivers/tuner/si4700.c b/firmware/drivers/tuner/si4700.c index cce203fde9..7b54526f61 100644 --- a/firmware/drivers/tuner/si4700.c +++ b/firmware/drivers/tuner/si4700.c | |||
@@ -553,32 +553,6 @@ void si4700_dbg_info(struct si4700_dbg_info *nfo) | |||
553 | } | 553 | } |
554 | 554 | ||
555 | #ifdef HAVE_RDS_CAP | 555 | #ifdef HAVE_RDS_CAP |
556 | |||
557 | #if (CONFIG_RDS & RDS_CFG_ISR) | ||
558 | static unsigned char isr_regbuf[(RDSD - STATUSRSSI + 1) * 2]; | ||
559 | |||
560 | /* Called by RDS interrupt on target */ | ||
561 | void si4700_rds_interrupt(void) | ||
562 | { | ||
563 | si4700_rds_read_raw_async(isr_regbuf, sizeof (isr_regbuf)); | ||
564 | } | ||
565 | |||
566 | /* Handle RDS event from ISR */ | ||
567 | void si4700_rds_process(void) | ||
568 | { | ||
569 | uint16_t rds_data[4]; | ||
570 | int index = (RDSA - STATUSRSSI) * 2; | ||
571 | |||
572 | for (int i = 0; i < 4; i++) { | ||
573 | rds_data[i] = isr_regbuf[index] << 8 | isr_regbuf[index + 1]; | ||
574 | index += 2; | ||
575 | } | ||
576 | |||
577 | rds_process(rds_data); | ||
578 | } | ||
579 | |||
580 | #else /* !(CONFIG_RDS & RDS_CFG_ISR) */ | ||
581 | |||
582 | /* Handle RDS event from thread */ | 556 | /* Handle RDS event from thread */ |
583 | void si4700_rds_process(void) | 557 | void si4700_rds_process(void) |
584 | { | 558 | { |
@@ -603,7 +577,6 @@ void si4700_rds_process(void) | |||
603 | 577 | ||
604 | mutex_unlock(&fmr_mutex); | 578 | mutex_unlock(&fmr_mutex); |
605 | } | 579 | } |
606 | #endif /* (CONFIG_RDS & RDS_CFG_ISR) */ | ||
607 | 580 | ||
608 | #if (CONFIG_RDS & RDS_CFG_POLL) | 581 | #if (CONFIG_RDS & RDS_CFG_POLL) |
609 | static struct event_queue rds_queue; | 582 | static struct event_queue rds_queue; |