Hi all, would you like to review these two patches with fix for uda134{0,4,5} codecs core power control support? Thanks in advance, Vladimir On Thu, Jun 24, 2010 at 5:19 PM, Vladimir Zapolskiy <vzapolskiy@xxxxxxxxx> wrote: > For UDA1341 codec power control is managed in STATUS1 register, and > for all other codecs in DATA011 register. > > Signed-off-by: Vladimir Zapolskiy <vzapolskiy@xxxxxxxxx> > --- > sound/soc/codecs/uda134x.c | 36 ++++++++++++++++++++++++++++++++---- > 1 files changed, 32 insertions(+), 4 deletions(-) > > diff --git a/sound/soc/codecs/uda134x.c b/sound/soc/codecs/uda134x.c > index e770029..e8066b6 100644 > --- a/sound/soc/codecs/uda134x.c > +++ b/sound/soc/codecs/uda134x.c > @@ -353,8 +353,22 @@ static int uda134x_set_bias_level(struct snd_soc_codec *codec, > switch (level) { > case SND_SOC_BIAS_ON: > /* ADC, DAC on */ > - reg = uda134x_read_reg_cache(codec, UDA134X_STATUS1); > - uda134x_write(codec, UDA134X_STATUS1, reg | 0x03); > + switch (pd->model) { > + case UDA134X_UDA1340: > + case UDA134X_UDA1344: > + case UDA134X_UDA1345: > + reg = uda134x_read_reg_cache(codec, UDA134X_DATA011); > + uda134x_write(codec, UDA134X_DATA011, reg | 0x03); > + break; > + case UDA134X_UDA1341: > + reg = uda134x_read_reg_cache(codec, UDA134X_STATUS1); > + uda134x_write(codec, UDA134X_STATUS1, reg | 0x03); > + break; > + default: > + printk(KERN_ERR "UDA134X SoC codec: " > + "unsupported model %d\n", pd->model); > + return -EINVAL; > + } > break; > case SND_SOC_BIAS_PREPARE: > /* power on */ > @@ -367,8 +381,22 @@ static int uda134x_set_bias_level(struct snd_soc_codec *codec, > break; > case SND_SOC_BIAS_STANDBY: > /* ADC, DAC power off */ > - reg = uda134x_read_reg_cache(codec, UDA134X_STATUS1); > - uda134x_write(codec, UDA134X_STATUS1, reg & ~(0x03)); > + switch (pd->model) { > + case UDA134X_UDA1340: > + case UDA134X_UDA1344: > + case UDA134X_UDA1345: > + reg = uda134x_read_reg_cache(codec, UDA134X_DATA011); > + uda134x_write(codec, UDA134X_DATA011, reg & ~(0x03)); > + break; > + case UDA134X_UDA1341: > + reg = uda134x_read_reg_cache(codec, UDA134X_STATUS1); > + uda134x_write(codec, UDA134X_STATUS1, reg & ~(0x03)); > + break; > + default: > + printk(KERN_ERR "UDA134X SoC codec: " > + "unsupported model %d\n", pd->model); > + return -EINVAL; > + } > break; > case SND_SOC_BIAS_OFF: > /* power off */ > -- > 1.7.0.4 > > _______________________________________________ Alsa-devel mailing list Alsa-devel@xxxxxxxxxxxxxxxx http://mailman.alsa-project.org/mailman/listinfo/alsa-devel