diff options
author | Jin Park <jinyoungp@nvidia.com> | 2011-05-12 01:58:38 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-05-16 00:26:36 -0400 |
commit | 25709f6d83cc23d6f2912194c77ebf850310223e (patch) | |
tree | c3a5ef020ce53a583d6d324896bf01f261b67da4 /sound/soc/codecs/max98088.c | |
parent | 938b4fbc916667cbe0410c325e7163c99a08c05f (diff) |
ASoC: codecs: max98088: Added digital mute function in DAI1 and DAI2
Added digital mute function in DAI1 and DAI2.
Signed-off-by: Jin Park <jinyoungp@nvidia.com>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/codecs/max98088.c')
-rw-r--r-- | sound/soc/codecs/max98088.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/sound/soc/codecs/max98088.c b/sound/soc/codecs/max98088.c index 16eb90666c45..4173b67c94d1 100644 --- a/sound/soc/codecs/max98088.c +++ b/sound/soc/codecs/max98088.c | |||
@@ -1566,6 +1566,36 @@ static int max98088_dai2_set_fmt(struct snd_soc_dai *codec_dai, | |||
1566 | return 0; | 1566 | return 0; |
1567 | } | 1567 | } |
1568 | 1568 | ||
1569 | static int max98088_dai1_digital_mute(struct snd_soc_dai *codec_dai, int mute) | ||
1570 | { | ||
1571 | struct snd_soc_codec *codec = codec_dai->codec; | ||
1572 | int reg; | ||
1573 | |||
1574 | if (mute) | ||
1575 | reg = M98088_DAI_MUTE; | ||
1576 | else | ||
1577 | reg = 0; | ||
1578 | |||
1579 | snd_soc_update_bits(codec, M98088_REG_2F_LVL_DAI1_PLAY, | ||
1580 | M98088_DAI_MUTE_MASK, reg); | ||
1581 | return 0; | ||
1582 | } | ||
1583 | |||
1584 | static int max98088_dai2_digital_mute(struct snd_soc_dai *codec_dai, int mute) | ||
1585 | { | ||
1586 | struct snd_soc_codec *codec = codec_dai->codec; | ||
1587 | int reg; | ||
1588 | |||
1589 | if (mute) | ||
1590 | reg = M98088_DAI_MUTE; | ||
1591 | else | ||
1592 | reg = 0; | ||
1593 | |||
1594 | snd_soc_update_bits(codec, M98088_REG_31_LVL_DAI2_PLAY, | ||
1595 | M98088_DAI_MUTE_MASK, reg); | ||
1596 | return 0; | ||
1597 | } | ||
1598 | |||
1569 | static void max98088_sync_cache(struct snd_soc_codec *codec) | 1599 | static void max98088_sync_cache(struct snd_soc_codec *codec) |
1570 | { | 1600 | { |
1571 | u16 *reg_cache = codec->reg_cache; | 1601 | u16 *reg_cache = codec->reg_cache; |
@@ -1627,12 +1657,14 @@ static struct snd_soc_dai_ops max98088_dai1_ops = { | |||
1627 | .set_sysclk = max98088_dai_set_sysclk, | 1657 | .set_sysclk = max98088_dai_set_sysclk, |
1628 | .set_fmt = max98088_dai1_set_fmt, | 1658 | .set_fmt = max98088_dai1_set_fmt, |
1629 | .hw_params = max98088_dai1_hw_params, | 1659 | .hw_params = max98088_dai1_hw_params, |
1660 | .digital_mute = max98088_dai1_digital_mute, | ||
1630 | }; | 1661 | }; |
1631 | 1662 | ||
1632 | static struct snd_soc_dai_ops max98088_dai2_ops = { | 1663 | static struct snd_soc_dai_ops max98088_dai2_ops = { |
1633 | .set_sysclk = max98088_dai_set_sysclk, | 1664 | .set_sysclk = max98088_dai_set_sysclk, |
1634 | .set_fmt = max98088_dai2_set_fmt, | 1665 | .set_fmt = max98088_dai2_set_fmt, |
1635 | .hw_params = max98088_dai2_hw_params, | 1666 | .hw_params = max98088_dai2_hw_params, |
1667 | .digital_mute = max98088_dai2_digital_mute, | ||
1636 | }; | 1668 | }; |
1637 | 1669 | ||
1638 | static struct snd_soc_dai_driver max98088_dai[] = { | 1670 | static struct snd_soc_dai_driver max98088_dai[] = { |