diff options
Diffstat (limited to 'sound/soc/omap/osk5912.c')
-rw-r--r-- | sound/soc/omap/osk5912.c | 24 |
1 files changed, 9 insertions, 15 deletions
diff --git a/sound/soc/omap/osk5912.c b/sound/soc/omap/osk5912.c index 498ca2e..f0e6625 100644 --- a/sound/soc/omap/osk5912.c +++ b/sound/soc/omap/osk5912.c @@ -55,8 +55,8 @@ static int osk_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params) { struct snd_soc_pcm_runtime *rtd = substream->private_data; - struct snd_soc_dai *codec_dai = rtd->dai->codec_dai; - struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai; + struct snd_soc_dai *codec_dai = rtd->codec_dai; + struct snd_soc_dai *cpu_dai = rtd->cpu_dai; int err; /* Set codec DAI configuration */ @@ -113,8 +113,9 @@ static const struct snd_soc_dapm_route audio_map[] = { {"MICIN", NULL, "Mic Jack"}, }; -static int osk_tlv320aic23_init(struct snd_soc_codec *codec) +static int osk_tlv320aic23_init(struct snd_soc_pcm_runtime *rtd) { + struct snd_soc_codec *codec = rtd->codec; /* Add osk5912 specific widgets */ snd_soc_dapm_new_controls(codec, tlv320aic23_dapm_widgets, @@ -136,8 +137,10 @@ static int osk_tlv320aic23_init(struct snd_soc_codec *codec) static struct snd_soc_dai_link osk_dai = { .name = "TLV320AIC23", .stream_name = "AIC23", - .cpu_dai = &omap_mcbsp_dai[0], - .codec_dai = &tlv320aic23_dai, + .cpu_dai_name = "omap-mcbsp-dai.0", + .codec_dai_name = "tlv320aic23-hifi", + .platform_name = "omap-pcm-audio", + .codec_name = "tlv320aic23-codec", .init = osk_tlv320aic23_init, .ops = &osk_ops, }; @@ -145,17 +148,10 @@ static struct snd_soc_dai_link osk_dai = { /* Audio machine driver */ static struct snd_soc_card snd_soc_card_osk = { .name = "OSK5912", - .platform = &omap_soc_platform, .dai_link = &osk_dai, .num_links = 1, }; -/* Audio subsystem */ -static struct snd_soc_device osk_snd_devdata = { - .card = &snd_soc_card_osk, - .codec_dev = &soc_codec_dev_tlv320aic23, -}; - static struct platform_device *osk_snd_device; static int __init osk_soc_init(void) @@ -171,9 +167,7 @@ static int __init osk_soc_init(void) if (!osk_snd_device) return -ENOMEM; - platform_set_drvdata(osk_snd_device, &osk_snd_devdata); - osk_snd_devdata.dev = &osk_snd_device->dev; - *(unsigned int *)osk_dai.cpu_dai->private_data = 0; /* McBSP1 */ + platform_set_drvdata(osk_snd_device, &snd_soc_card_osk); err = platform_device_add(osk_snd_device); if (err) goto err1; |