@@ -1029,21 +1029,21 @@ int r82xx_set_gain(struct r82xx_priv *priv, int set_manual_gain, int gain)
10291029 uint8_t data [4 ];
10301030
10311031 /* LNA auto off */
1032- rc = r82xx_write_reg_mask (priv , 0x05 , 0x10 , 0x10 );
1032+ rc = r82xx_write_reg_mask (priv , 0x05 , 0x04 , 0x10 );
10331033 if (rc < 0 )
10341034 return rc ;
10351035
10361036 /* Mixer auto off */
1037- rc = r82xx_write_reg_mask (priv , 0x07 , 0 , 0x10 );
1037+ rc = r82xx_write_reg_mask (priv , 0x07 , 0x04 , 0x10 );
10381038 if (rc < 0 )
10391039 return rc ;
10401040
10411041 rc = r82xx_read (priv , 0x00 , data , sizeof (data ));
10421042 if (rc < 0 )
10431043 return rc ;
10441044
1045- /* set fixed VGA gain for now (16.3 dB) */
1046- rc = r82xx_write_reg_mask (priv , 0x0c , 0x08 , 0x9f );
1045+ /* set max VGA gain */
1046+ rc = r82xx_write_reg_mask (priv , 0x0c , 0x0f , 0x9f );
10471047 if (rc < 0 )
10481048 return rc ;
10491049
@@ -1070,17 +1070,17 @@ int r82xx_set_gain(struct r82xx_priv *priv, int set_manual_gain, int gain)
10701070 return rc ;
10711071 } else {
10721072 /* LNA */
1073- rc = r82xx_write_reg_mask (priv , 0x05 , 0 , 0x10 );
1073+ rc = r82xx_write_reg_mask (priv , 0x05 , 0x04 , 0x10 );
10741074 if (rc < 0 )
10751075 return rc ;
10761076
10771077 /* Mixer */
1078- rc = r82xx_write_reg_mask (priv , 0x07 , 0x10 , 0x10 );
1078+ rc = r82xx_write_reg_mask (priv , 0x07 , 0x04 , 0x10 );
10791079 if (rc < 0 )
10801080 return rc ;
10811081
1082- /* set fixed VGA gain for now (26.5 dB) */
1083- rc = r82xx_write_reg_mask (priv , 0x0c , 0x0b , 0x9f );
1082+ /* set max VGA gain */
1083+ rc = r82xx_write_reg_mask (priv , 0x0c , 0x0f , 0x9f );
10841084 if (rc < 0 )
10851085 return rc ;
10861086 }
0 commit comments