Skip to contentSkip to conversation

ASoC: arizona: Implement TDM support for Arizona devices

PATCH Superseded Charles Keepax 2 participants 3 messages Jun 3, 2014 – Jun 4, 2014

Subsystems (4)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ASoC: arizona: Implement TDM support for Arizona devices

---
 include/linux/mfd/arizona/core.h |    3 +
 sound/soc/codecs/arizona.c       |   81 +++++++++++++++++++++++++++++++++++---
 2 files changed, 78 insertions(+), 6 deletions(-)
include/linux/mfd/arizona/core.h +3 -0
index 5cf8b91..11783b5 100644
@@ -110,6 +110,9 @@ struct arizona {
 	int clk32k_ref;
 
 	struct snd_soc_dapm_context *dapm;
+
+	int tdm_width[ARIZONA_MAX_AIF];
+	int tdm_slots[ARIZONA_MAX_AIF];
 };
 
 int arizona_clk32k_enable(struct arizona *arizona);
sound/soc/codecs/arizona.c +75 -6

115 lines not on this page · raw message

Signature · 1 line
1.7.2.5
maintainer
#1 lore raw

sound/soc/codecs/arizona.c static int arizona_hw_params(struct snd_pcm_substream *substream, · line 1245

Quoted 3 lines · Charles Keepax
sound/soc/codecs/arizona.c +3 -0
+	if (tdm_width && wl != tdm_width)
+		arizona_aif_warn(dai, "Word length not equal to TDM width\n");
+

Is it a problem to have say 16 bit words in a 32 bit TDM slot? One of the reasons this stuff sometimes gets used is to help out the other connected device if it's having trouble configuring the "natural" clock rates. Ignoring LSBs shouldn't be an issue.

#2 lore raw
Quoted 10 lines · Mark Brown

sound/soc/codecs/arizona.c static int arizona_hw_params(struct snd_pcm_substream *substream, · line 1245

Quoted 3 lines · Charles Keepax
sound/soc/codecs/arizona.c +3 -0
+	if (tdm_width && wl != tdm_width)
+		arizona_aif_warn(dai, "Word length not equal to TDM width\n");
+

Is it a problem to have say 16 bit words in a 32 bit TDM slot? One of the reasons this stuff sometimes gets used is to help out the other connected device if it's having trouble configuring the "natural" clock rates. Ignoring LSBs shouldn't be an issue.

A good point I will respin and take this out.

Thanks,
Charles