diff options
| author | Laurent Gautier <creposucre@rockbox.org> | 2010-01-13 20:07:38 +0000 |
|---|---|---|
| committer | Laurent Gautier <creposucre@rockbox.org> | 2010-01-13 20:07:38 +0000 |
| commit | 1233a738408655404df8d85f784a950a99daae5b (patch) | |
| tree | e3934ec9c384bf1822c0062382450c3a0b132bbd | |
| parent | ead28e174ebb32d6a6aebf780b5884a529ef4598 (diff) | |
| download | rockbox-1233a738408655404df8d85f784a950a99daae5b.zip rockbox-1233a738408655404df8d85f784a950a99daae5b.tar.gz rockbox-1233a738408655404df8d85f784a950a99daae5b.tar.bz2 rockbox-1233a738408655404df8d85f784a950a99daae5b.tar.xz | |
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.c | 7 |
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 9822c07..e770b9d 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) unsigned char data1[] = {0x07, 0x24, 0x06 }; iap_send_pkt(data1, sizeof(data1)); /* set volume */ - unsigned char data2[] = {0x03, 0x09, 0x04, 0x00, 0x77 }; + unsigned char data2[] = {0x03, 0x09, 0x04, 0x00, 0x00 }; + data2[4] = (char)((global_settings.volume+58) * 4); iap_send_pkt(data2, sizeof(data2)); /* set rds on */ unsigned char data3[] = {0x07, 0x20, 0x40, 0x00, 0x00, 0x10 }; @@ -254,7 +255,9 @@ void set_mono(int value) if (value != mono_mode) { - tuner_param |= 0x10; + tuner_param &= 0xEF; + if (value == 1) + tuner_param |= 0x10; rmt_tuner_set_param(tuner_param); sleep(HZ/100); mono_mode = value; |