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
This commit is contained in:
Laurent Gautier 2010-01-13 20:07:38 +00:00
parent ead28e174e
commit 1233a73840

View file

@ -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;