From 1233a738408655404df8d85f784a950a99daae5b Mon Sep 17 00:00:00 2001 From: Laurent Gautier Date: Wed, 13 Jan 2010 20:07:38 +0000 Subject: 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 --- firmware/drivers/tuner/ipod_remote_tuner.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'firmware') 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) 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; -- cgit v1.2.3