[Gta04-owner] no sound on 3.2

NeilBrown neilb at suse.de
Tue Dec 27 00:29:04 CET 2011


On Tue, 27 Dec 2011 00:01:38 +0100 "Denis 'GNUtoo' Carikli"
<GNUtoo at no-log.org> wrote:

> Because of that commit in meta-smartphones(part of the SHR distribution), we 
> lost audio:
> 
> commit 13fa7402b5003cc49516bd78fefc60cf5884996a
> Author: Klaus Kurzmann <mok at fluxnetz.de>
> Date:   Tue Nov 15 21:10:51 2011 +0100
> 
>     linux-gta04_git.bb: switch to master branch based on 3.1

Yes... that's a bit premature.  The 3.x code really isn't ready.

I've been playing with audio over the last day or two and have basic sound
working but not sound from the modem, bluetooth or FM.

I'll probably have something working by the end of the week.

Below is the diff against git://neil.brown.name/gta04#merge which gives
be basic sound.
The 'voice' and 'headset' stuff is definitely wrong, but the audio seems ok.

NeilBrown



diff --git a/sound/soc/omap/gta04-audio.c b/sound/soc/omap/gta04-audio.c
index 78fa530..83f96b4 100644
--- a/sound/soc/omap/gta04-audio.c
+++ b/sound/soc/omap/gta04-audio.c
@@ -89,7 +89,7 @@ static int omap3gta04_hw_params(struct snd_pcm_substream *substream,
 /* this shows how we could control the AUX in/out switch or the Video in/out */
 
 static int omap3pandora_hp_event(struct snd_soc_dapm_widget *w,
-								 struct snd_kcontrol *k, int event)
+				 struct snd_kcontrol *k, int event)
 {
 	/*
 	 if (SND_SOC_DAPM_EVENT_ON(event)) {
@@ -107,8 +107,8 @@ static int omap3pandora_hp_event(struct snd_soc_dapm_widget *w,
 static const struct snd_soc_dapm_widget gta04_dapm_widgets[] = {
 	SND_SOC_DAPM_DAC("PCM DAC", "HiFi Playback", SND_SOC_NOPM, 0, 0),
 	SND_SOC_DAPM_PGA_E("Headphone Amplifier", SND_SOC_NOPM,
-					   0, 0, NULL, 0, omap3pandora_hp_event,
-					   SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD),
+			   0, 0, NULL, 0, omap3pandora_hp_event,
+			   SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD),
 	SND_SOC_DAPM_HP("Headphone Jack", NULL),
 	SND_SOC_DAPM_LINE("Line Out", NULL),
 	SND_SOC_DAPM_MIC("Internal Mic", NULL),
@@ -148,7 +148,7 @@ static int omap3gta04_init(struct snd_soc_pcm_runtime *runtime)
 		return ret;
 	
 	snd_soc_dapm_add_routes(dapm, audio_map,
-							ARRAY_SIZE(audio_map));
+				ARRAY_SIZE(audio_map));
 
 //	snd_soc_dapm_enable_pin(codec, "Ext Mic");
 //	snd_soc_dapm_enable_pin(codec, "Ext Spk");
@@ -184,9 +184,12 @@ static struct snd_soc_ops omap3gta04_ops = {
 static struct snd_soc_dai_link omap3gta04_dai = {
 		.name = "TWL4030",
 		.stream_name = "TWL4030",
-		.cpu_dai_name	= "omap-mcpdm-dai.0",
+		.cpu_dai_name	= "omap-mcbsp-dai.1",
 		.platform_name = "omap-pcm-audio",
 		.codec_dai_name = "twl4030-hifi",
+		.codec_name = "twl4030-codec",
+		.dai_fmt = (SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF |
+			    SND_SOC_DAIFMT_CBM_CFM),
 		.ops = &omap3gta04_ops,
 		.init = &omap3gta04_init
 };
diff --git a/sound/soc/omap/gta04-fm.c b/sound/soc/omap/gta04-fm.c
index e6e67b1..460a727 100644
--- a/sound/soc/omap/gta04-fm.c
+++ b/sound/soc/omap/gta04-fm.c
@@ -91,7 +91,7 @@ static struct snd_soc_ops gta04_fm_ops = {
 static struct snd_soc_dai_link gta04_fm_dai = {
 	.name 		= "Si47xx",
 	.stream_name 	= "Si47xx",
-	.cpu_dai_name	= "omap-mcbsp-dai.3",
+	.cpu_dai_name	= "omap-mcbsp-dai.0",
 	.codec_dai_name = "Si47xx",
 	.init		= gta04_fm_init,
 	.ops 		= &gta04_fm_ops,
diff --git a/sound/soc/omap/gta04-headset.c b/sound/soc/omap/gta04-headset.c
index af7c450..526b80e 100644
--- a/sound/soc/omap/gta04-headset.c
+++ b/sound/soc/omap/gta04-headset.c
@@ -91,10 +91,10 @@ static struct snd_soc_ops gta04_headset_ops = {
 static struct snd_soc_dai_link gta04_headset_dai = {
 	.name 		= "W2CBW003",
 	.stream_name 	= "W2CBW003",
-// 	.cpu_dai 	= &omap_mcbsp_dai[2],
-	.cpu_dai_name	= "omap-mcpdm-dai.2",
-// 	.codec_dai 	= &w2cbw003_dai,
-	.codec_dai_name 	= "w2cbw003_codec_audio",
+	.cpu_dai_name	= "omap-mcbsp-dai.2",
+	.platform_name	= "omap-pcm-headset",
+	.codec_dai_name	= "w2cbw003_codec_audio",
+	.codec_name	= "twl4030-codec",
 	.init		= gta04_headset_init,
 	.ops 		= &gta04_headset_ops,
 };
diff --git a/sound/soc/omap/gta04-voice.c b/sound/soc/omap/gta04-voice.c
index dcc81cf..36593a0 100644
--- a/sound/soc/omap/gta04-voice.c
+++ b/sound/soc/omap/gta04-voice.c
@@ -118,10 +118,10 @@ static struct snd_soc_ops gta04_voice_ops = {
 static struct snd_soc_dai_link gta04_voice_dai = {
 	.name 		= "GTM601",
 	.stream_name 	= "GTM601",
-// 	.cpu_dai 	= &omap_mcbsp_dai[1],
-	.cpu_dai_name	= "omap-mcpdm-dai.1",
-// 	.codec_dai 	= &gtm601_dai,
-	.codec_dai_name = "gtm601_codec_audio",
+	.cpu_dai_name	= "omap-mcbsp-dai.3",
+	.platform_name	= "omap-pcm-voice",
+	.codec_dai_name = "twl4030-voice",
+	.codec_name	= "twl4030-codec",
 	.init		= gta04_voice_init,
 	.ops 		= &gta04_voice_ops,
 };
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 828 bytes
Desc: not available
URL: <http://lists.goldelico.com/pipermail/gta04-owner/attachments/20111227/11a7d435/attachment.bin>


More information about the Gta04-owner mailing list