codec->hw_write = (hw_write_t) i2c_master_send;
codec->control_data = aic3x->control_data;
+ aic3x_init(codec);
+
if (aic3x->setup) {
/* setup GPIO functions */
aic3x_write(codec, AIC3X_GPIO1_REG,
(aic3x->setup->gpio_func[1] & 0xf) << 4);
}
- aic3x_init(codec);
-
snd_soc_add_controls(codec, aic3x_snd_controls,
ARRAY_SIZE(aic3x_snd_controls));
if (aic3x->model == AIC3X_MODEL_3007)
struct snd_kcontrol *k, int event)
{
if (SND_SOC_DAPM_EVENT_ON(event))
- gpio_set_value(RX51_SPEAKER_AMP_TWL_GPIO, 1);
+ gpio_set_value_cansleep(RX51_SPEAKER_AMP_TWL_GPIO, 1);
else
- gpio_set_value(RX51_SPEAKER_AMP_TWL_GPIO, 0);
+ gpio_set_value_cansleep(RX51_SPEAKER_AMP_TWL_GPIO, 0);
return 0;
}