diff options
-rw-r--r-- | sound/soc/codecs/w2cbw003-bt.c | 2 | ||||
-rw-r--r-- | sound/soc/omap/gta04-audio.c | 15 | ||||
-rw-r--r-- | sound/soc/omap/gta04-fm.c | 6 | ||||
-rw-r--r-- | sound/soc/omap/gta04-headset.c | 17 | ||||
-rw-r--r-- | sound/soc/omap/gta04-voice.c | 11 |
5 files changed, 20 insertions, 31 deletions
diff --git a/sound/soc/codecs/w2cbw003-bt.c b/sound/soc/codecs/w2cbw003-bt.c index 0ed327e..f2cd41e 100644 --- a/sound/soc/codecs/w2cbw003-bt.c +++ b/sound/soc/codecs/w2cbw003-bt.c @@ -49,7 +49,7 @@ struct snd_soc_dai_driver w2cbw003_dai = { .rates = W2CBW003_RATES, .formats = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S24_LE, }, - .playback = { + .capture = { .stream_name = "Capture", .channels_min = 2, .channels_max = 2, diff --git a/sound/soc/omap/gta04-audio.c b/sound/soc/omap/gta04-audio.c index 78fa530..e5a8354 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 }; @@ -216,7 +219,7 @@ static int __init omap3gta04_soc_init(void) // FIXME: set any GPIOs i.e. enable Audio in/out switch // microphone power etc. - omap3gta04_snd_device = platform_device_alloc("soc-audio", -1); + omap3gta04_snd_device = platform_device_alloc("soc-audio", 0); if (!omap3gta04_snd_device) { printk(KERN_ERR "Platform device allocation failed\n"); return -ENOMEM; diff --git a/sound/soc/omap/gta04-fm.c b/sound/soc/omap/gta04-fm.c index e6e67b1..036c0dd 100644 --- a/sound/soc/omap/gta04-fm.c +++ b/sound/soc/omap/gta04-fm.c @@ -91,7 +91,8 @@ 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", + .platform_name = "omap-pcm-audio", .codec_dai_name = "Si47xx", .init = gta04_fm_init, .ops = >a04_fm_ops, @@ -100,7 +101,6 @@ static struct snd_soc_dai_link gta04_fm_dai = { /* fm machine driver */ static struct snd_soc_card gta04_fm_card = { .name = "gta04-fm", -// .platform_name = "omap-pcm-audio", .dai_link = >a04_fm_dai, .num_links = 1, }; @@ -134,8 +134,6 @@ static int __init gta04_fm_soc_init(void) dev = >a04_fm_snd_device->dev; platform_set_drvdata(gta04_fm_snd_device, >a04_fm_card); -// gta04_fm_devdata.dev = >a04_fm_snd_device->dev; -// *(unsigned int *)gta04_fm_dai.cpu_dai->private_data = 0; // McBSP1 ret = platform_device_add(gta04_fm_snd_device); if (ret) { diff --git a/sound/soc/omap/gta04-headset.c b/sound/soc/omap/gta04-headset.c index af7c450..3c19f08f 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-audio", + .codec_dai_name = "W2CBW003", + .codec_name = "w2cbw003_codec_audio", .init = gta04_headset_init, .ops = >a04_headset_ops, }; @@ -102,17 +102,10 @@ static struct snd_soc_dai_link gta04_headset_dai = { /* headset machine driver */ static struct snd_soc_card gta04_headset_card = { .name = "gta04-headset", -// .platform = &omap_soc_platform, .dai_link = >a04_headset_dai, .num_links = 1, }; -/* headset subsystem */ -/*static struct snd_soc_device gta04_headset_devdata = { - .card = >a04_headset_card, - .codec_dev = &soc_codec_dev_w2cbw003, -};*/ - static struct platform_device *gta04_headset_snd_device; static int __init gta04_headset_soc_init(void) @@ -131,8 +124,6 @@ static int __init gta04_headset_soc_init(void) dev = >a04_headset_snd_device->dev; platform_set_drvdata(gta04_headset_snd_device, >a04_headset_card); -// gta04_headset_devdata.dev = >a04_headset_snd_device->dev; -// *(unsigned int *)gta04_headset_dai.cpu_dai->private_data = 2; // McBSP3 ret = platform_device_add(gta04_headset_snd_device); if (ret) { diff --git a/sound/soc/omap/gta04-voice.c b/sound/soc/omap/gta04-voice.c index dcc81cf..e02fb00 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 = >m601_dai, - .codec_dai_name = "gtm601_codec_audio", + .cpu_dai_name = "omap-mcbsp-dai.3", + .platform_name = "omap-pcm-audio", + .codec_dai_name = "GTM601", + .codec_name = "gtm601_codec_audio", .init = gta04_voice_init, .ops = >a04_voice_ops, }; @@ -129,7 +129,6 @@ static struct snd_soc_dai_link gta04_voice_dai = { /* voice machine driver */ static struct snd_soc_card gta04_voice_card = { .name = "gta04-voice", -// .platform = &omap_soc_platform, .dai_link = >a04_voice_dai, .num_links = 1, }; @@ -158,8 +157,6 @@ static int __init gta04_voice_soc_init(void) dev = >a04_voice_snd_device->dev; platform_set_drvdata(gta04_voice_snd_device, >a04_voice_card); -// gta04_voice_devdata.dev = >a04_voice_snd_device->dev; -// *(unsigned int *)gta04_voice_dai.cpu_dai->private_data = 3; // McBSP4 ret = platform_device_add(gta04_voice_snd_device); if (ret) { |