Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Oder Chiou <oder_chiou@realtek.com>
To: broonie@kernel.org, lgirdwood@gmail.com
Cc: Oder Chiou <oder_chiou@realtek.com>,
	alsa-devel@alsa-project.org, yang.a.fang@intel.com,
	john.lin@realtek.com, bardliao@realtek.com, flove@realtek.com
Subject: [PATCH] ASoC: rt5677: Add the slot_width "25" support in the TDM mode
Date: Mon, 12 Jan 2015 13:34:55 +0800	[thread overview]
Message-ID: <1421040895-15345-1-git-send-email-oder_chiou@realtek.com> (raw)

Add the slot_width "25" support in the TDM mode for the Intel platform.

Signed-off-by: Oder Chiou <oder_chiou@realtek.com>
---
 sound/soc/codecs/rt5677.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/sound/soc/codecs/rt5677.c b/sound/soc/codecs/rt5677.c
index 32c368c..af34ffc 100644
--- a/sound/soc/codecs/rt5677.c
+++ b/sound/soc/codecs/rt5677.c
@@ -4123,6 +4123,7 @@ static int rt5677_set_tdm_slot(struct snd_soc_dai *dai, unsigned int tx_mask,
 		val |= (1 << 8);
 		break;
 	case 24:
+	case 25:
 		val |= (2 << 8);
 		break;
 	case 32:
@@ -4136,9 +4137,14 @@ static int rt5677_set_tdm_slot(struct snd_soc_dai *dai, unsigned int tx_mask,
 	switch (dai->id) {
 	case RT5677_AIF1:
 		snd_soc_update_bits(codec, RT5677_TDM1_CTRL1, 0x1f00, val);
+		if (slot_width == 25)
+			snd_soc_update_bits(codec, RT5677_DIG_MISC, 0x8000,
+				0x8000);
 		break;
 	case RT5677_AIF2:
 		snd_soc_update_bits(codec, RT5677_TDM2_CTRL1, 0x1f00, val);
+		if (slot_width == 25)
+			snd_soc_update_bits(codec, RT5677_DIG_MISC, 0x80, 0x80);
 		break;
 	default:
 		break;
-- 
1.8.1.1.439.g50a6b54

             reply	other threads:[~2015-01-12  5:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-12  5:34 Oder Chiou [this message]
2015-01-12 19:13 ` [PATCH] ASoC: rt5677: Add the slot_width "25" support in the TDM mode Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1421040895-15345-1-git-send-email-oder_chiou@realtek.com \
    --to=oder_chiou@realtek.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=bardliao@realtek.com \
    --cc=broonie@kernel.org \
    --cc=flove@realtek.com \
    --cc=john.lin@realtek.com \
    --cc=lgirdwood@gmail.com \
    --cc=yang.a.fang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox