summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Gautier <creposucre@rockbox.org>2010-01-13 20:07:38 +0000
committerLaurent Gautier <creposucre@rockbox.org>2010-01-13 20:07:38 +0000
commit1233a738408655404df8d85f784a950a99daae5b (patch)
treee3934ec9c384bf1822c0062382450c3a0b132bbd
parentead28e174ebb32d6a6aebf780b5884a529ef4598 (diff)
downloadrockbox-1233a738408655404df8d85f784a950a99daae5b.tar.gz
rockbox-1233a738408655404df8d85f784a950a99daae5b.zip
set the ipod volume on the ipod fm remote when the tuner is turned on. Also, prevents a looping execution of the set_mono command.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24225 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--firmware/drivers/tuner/ipod_remote_tuner.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/firmware/drivers/tuner/ipod_remote_tuner.c b/firmware/drivers/tuner/ipod_remote_tuner.c
index 9822c07c6b..e770b9dbe4 100644
--- a/firmware/drivers/tuner/ipod_remote_tuner.c
+++ b/firmware/drivers/tuner/ipod_remote_tuner.c
@@ -116,7 +116,8 @@ void rmt_tuner_sleep(int state)
116 unsigned char data1[] = {0x07, 0x24, 0x06 }; 116 unsigned char data1[] = {0x07, 0x24, 0x06 };
117 iap_send_pkt(data1, sizeof(data1)); 117 iap_send_pkt(data1, sizeof(data1));
118 /* set volume */ 118 /* set volume */
119 unsigned char data2[] = {0x03, 0x09, 0x04, 0x00, 0x77 }; 119 unsigned char data2[] = {0x03, 0x09, 0x04, 0x00, 0x00 };
120 data2[4] = (char)((global_settings.volume+58) * 4);
120 iap_send_pkt(data2, sizeof(data2)); 121 iap_send_pkt(data2, sizeof(data2));
121 /* set rds on */ 122 /* set rds on */
122 unsigned char data3[] = {0x07, 0x20, 0x40, 0x00, 0x00, 0x10 }; 123 unsigned char data3[] = {0x07, 0x20, 0x40, 0x00, 0x00, 0x10 };
@@ -254,7 +255,9 @@ void set_mono(int value)
254 255
255 if (value != mono_mode) 256 if (value != mono_mode)
256 { 257 {
257 tuner_param |= 0x10; 258 tuner_param &= 0xEF;
259 if (value == 1)
260 tuner_param |= 0x10;
258 rmt_tuner_set_param(tuner_param); 261 rmt_tuner_set_param(tuner_param);
259 sleep(HZ/100); 262 sleep(HZ/100);
260 mono_mode = value; 263 mono_mode = value;