13 May
2011
13 May
'11
9:11 a.m.
On Thu, May 12, 2011 at 11:28 AM, jinyoungp@nvidia.com wrote:
+static int max98088_dai1_digital_mute(struct snd_soc_dai *codec_dai, int mute) +{
- struct snd_soc_codec *codec = codec_dai->codec;
- int reg;
- if (mute)
- reg = M98088_DAI_MUTE;
- else
- reg = 0;
- snd_soc_update_bits(codec, M98088_REG_2F_LVL_DAI1_PLAY,
- M98088_DAI_MUTE_MASK, reg);
- return 0;
+}
+static int max98088_dai2_digital_mute(struct snd_soc_dai *codec_dai, int mute) +{
- struct snd_soc_codec *codec = codec_dai->codec;
- int reg;
- if (mute)
- reg = M98088_DAI_MUTE;
- else
- reg = 0;
- snd_soc_update_bits(codec, M98088_REG_31_LVL_DAI2_PLAY,
- M98088_DAI_MUTE_MASK, reg);
- return 0;
+}
max98088_dai1_digital_mute max98088_dai2_digital_mute max98088_dai1_set_fmt max98088_dai2_set_fmt max98088_dai1_hw_params max98088_dai2_hw_params
These pairs are essentially same function operating on different registers. Can't we compress them ?