@@ -81,7 +81,7 @@ static const struct reg_sequence init_list[] = {
81
81
static const struct reg_sequence rt5650_init_list [] = {
82
82
{0xf6 , 0x0100 },
83
83
{RT5645_PWR_ANLG1 , 0x02 },
84
- {RT5645_IL_CMD3 , 0x0018 },
84
+ {RT5645_IL_CMD3 , 0x6728 },
85
85
};
86
86
87
87
static const struct reg_default rt5645_reg [] = {
@@ -3130,20 +3130,32 @@ static void rt5645_enable_push_button_irq(struct snd_soc_component *component,
3130
3130
bool enable )
3131
3131
{
3132
3132
struct snd_soc_dapm_context * dapm = snd_soc_component_get_dapm (component );
3133
+ int ret ;
3133
3134
3134
3135
if (enable ) {
3135
3136
snd_soc_dapm_force_enable_pin (dapm , "ADC L power" );
3136
3137
snd_soc_dapm_force_enable_pin (dapm , "ADC R power" );
3137
3138
snd_soc_dapm_sync (dapm );
3138
3139
3140
+ snd_soc_component_update_bits (component , RT5650_4BTN_IL_CMD2 ,
3141
+ RT5645_EN_4BTN_IL_MASK | RT5645_RST_4BTN_IL_MASK ,
3142
+ RT5645_EN_4BTN_IL_EN | RT5645_RST_4BTN_IL_RST );
3143
+ usleep_range (10000 , 15000 );
3144
+ snd_soc_component_update_bits (component , RT5650_4BTN_IL_CMD2 ,
3145
+ RT5645_EN_4BTN_IL_MASK | RT5645_RST_4BTN_IL_MASK ,
3146
+ RT5645_EN_4BTN_IL_EN | RT5645_RST_4BTN_IL_NORM );
3147
+ msleep (50 );
3148
+ ret = snd_soc_component_read (component , RT5645_INT_IRQ_ST );
3149
+ pr_debug ("%s read %x = %x\n" , __func__ , RT5645_INT_IRQ_ST ,
3150
+ snd_soc_component_read (component , RT5645_INT_IRQ_ST ));
3151
+ snd_soc_component_write (component , RT5645_INT_IRQ_ST , ret );
3152
+ ret = snd_soc_component_read (component , RT5650_4BTN_IL_CMD1 );
3153
+ pr_debug ("%s read %x = %x\n" , __func__ , RT5650_4BTN_IL_CMD1 ,
3154
+ snd_soc_component_read (component , RT5650_4BTN_IL_CMD1 ));
3155
+ snd_soc_component_write (component , RT5650_4BTN_IL_CMD1 , ret );
3139
3156
snd_soc_component_update_bits (component , RT5650_4BTN_IL_CMD1 , 0x3 , 0x3 );
3140
3157
snd_soc_component_update_bits (component ,
3141
3158
RT5645_INT_IRQ_ST , 0x8 , 0x8 );
3142
- snd_soc_component_update_bits (component ,
3143
- RT5650_4BTN_IL_CMD2 , 0x8000 , 0x8000 );
3144
- snd_soc_component_read (component , RT5650_4BTN_IL_CMD1 );
3145
- pr_debug ("%s read %x = %x\n" , __func__ , RT5650_4BTN_IL_CMD1 ,
3146
- snd_soc_component_read (component , RT5650_4BTN_IL_CMD1 ));
3147
3159
} else {
3148
3160
snd_soc_component_update_bits (component , RT5650_4BTN_IL_CMD2 , 0x8000 , 0x0 );
3149
3161
snd_soc_component_update_bits (component , RT5645_INT_IRQ_ST , 0x8 , 0x0 );
0 commit comments