(i)++)
 #define for_each_rtd_cpu_dais(rtd, i, dai)                             \
        for ((i) = 0;                                                   \
-            ((i) < rtd->num_cpus) && ((dai) = rtd->cpu_dais[i]);       \
+            ((i) < rtd->num_cpus) && ((dai) = asoc_rtd_to_cpu(rtd, i)); \
             (i)++)
 #define for_each_rtd_cpu_dais_rollback(rtd, i, dai)            \
-       for (; (--(i) >= 0) && ((dai) = rtd->cpu_dais[i]);)
+       for (; (--(i) >= 0) && ((dai) = asoc_rtd_to_cpu(rtd, i));)
 #define for_each_rtd_codec_dais(rtd, i, dai)                           \
        for ((i) = 0;                                                   \
-            ((i) < rtd->num_codecs) && ((dai) = rtd->codec_dais[i]);   \
+            ((i) < rtd->num_codecs) && ((dai) = asoc_rtd_to_codec(rtd, i)); \
             (i)++)
 #define for_each_rtd_codec_dais_rollback(rtd, i, dai)          \
-       for (; (--(i) >= 0) && ((dai) = rtd->codec_dais[i]);)
+       for (; (--(i) >= 0) && ((dai) = asoc_rtd_to_codec(rtd, i));)
 #define for_each_rtd_dais(rtd, i, dai)                                 \
        for ((i) = 0;                                                   \
             ((i) < (rtd)->num_cpus + (rtd)->num_codecs) &&             \
        struct snd_soc_pcm_runtime *rtd;
 
        list_for_each_entry(rtd, &card->rtd_list, list) {
-               if (!strcmp(rtd->codec_dai->name, dai_name))
-                       return rtd->codec_dai;
+               if (!strcmp(asoc_rtd_to_codec(rtd, 0)->name, dai_name))
+                       return asoc_rtd_to_codec(rtd, 0);
        }
 
        return NULL;
 
 {
        struct snd_soc_pcm_runtime *rtd = cstream->private_data;
        struct snd_soc_component *component, *save = NULL;
-       struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
+       struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0);
        int ret, i;
 
        for_each_rtd_components(rtd, i, component) {
        struct snd_pcm_substream *fe_substream =
                 fe->pcm->streams[cstream->direction].substream;
        struct snd_soc_component *component;
-       struct snd_soc_dai *cpu_dai = fe->cpu_dai;
+       struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(fe, 0);
        struct snd_soc_dpcm *dpcm;
        struct snd_soc_dapm_widget_list *list;
        int stream;
 {
        struct snd_soc_pcm_runtime *rtd = cstream->private_data;
        struct snd_soc_component *component;
-       struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
-       struct snd_soc_dai *codec_dai = rtd->codec_dai;
+       struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0);
+       struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0);
        int stream, i;
 
        mutex_lock_nested(&rtd->card->pcm_mutex, rtd->card->pcm_subclass);
 static int soc_compr_free_fe(struct snd_compr_stream *cstream)
 {
        struct snd_soc_pcm_runtime *fe = cstream->private_data;
-       struct snd_soc_dai *cpu_dai = fe->cpu_dai;
+       struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(fe, 0);
        struct snd_soc_dpcm *dpcm;
        int stream, ret;
 
 static int soc_compr_trigger(struct snd_compr_stream *cstream, int cmd)
 {
        struct snd_soc_pcm_runtime *rtd = cstream->private_data;
-       struct snd_soc_dai *codec_dai = rtd->codec_dai;
-       struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
+       struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0);
+       struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0);
        int ret;
 
        mutex_lock_nested(&rtd->card->pcm_mutex, rtd->card->pcm_subclass);
 static int soc_compr_trigger_fe(struct snd_compr_stream *cstream, int cmd)
 {
        struct snd_soc_pcm_runtime *fe = cstream->private_data;
-       struct snd_soc_dai *cpu_dai = fe->cpu_dai;
+       struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(fe, 0);
        int ret, stream;
 
        if (cmd == SND_COMPR_TRIGGER_PARTIAL_DRAIN ||
                                struct snd_compr_params *params)
 {
        struct snd_soc_pcm_runtime *rtd = cstream->private_data;
-       struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
+       struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0);
        int ret;
 
        mutex_lock_nested(&rtd->card->pcm_mutex, rtd->card->pcm_subclass);
        struct snd_soc_pcm_runtime *fe = cstream->private_data;
        struct snd_pcm_substream *fe_substream =
                 fe->pcm->streams[cstream->direction].substream;
-       struct snd_soc_dai *cpu_dai = fe->cpu_dai;
+       struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(fe, 0);
        int ret, stream;
 
        if (cstream->direction == SND_COMPRESS_PLAYBACK)
 {
        struct snd_soc_pcm_runtime *rtd = cstream->private_data;
        struct snd_soc_component *component;
-       struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
+       struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0);
        int i, ret = 0;
 
        mutex_lock_nested(&rtd->card->pcm_mutex, rtd->card->pcm_subclass);
 {
        struct snd_soc_pcm_runtime *rtd = cstream->private_data;
        struct snd_soc_component *component;
-       struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
+       struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0);
        int i, ret = 0;
 
        mutex_lock_nested(&rtd->card->pcm_mutex, rtd->card->pcm_subclass);
        struct snd_soc_pcm_runtime *rtd = cstream->private_data;
        struct snd_soc_component *component;
        int i, ret = 0;
-       struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
+       struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0);
 
        mutex_lock_nested(&rtd->card->pcm_mutex, rtd->card->pcm_subclass);
 
 {
        struct snd_soc_pcm_runtime *rtd = cstream->private_data;
        struct snd_soc_component *component;
-       struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
+       struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0);
        int i, ret;
 
        if (cpu_dai->driver->cops && cpu_dai->driver->cops->set_metadata) {
 {
        struct snd_soc_pcm_runtime *rtd = cstream->private_data;
        struct snd_soc_component *component;
-       struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
+       struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0);
        int i, ret;
 
        if (cpu_dai->driver->cops && cpu_dai->driver->cops->get_metadata) {
 int snd_soc_new_compress(struct snd_soc_pcm_runtime *rtd, int num)
 {
        struct snd_soc_component *component;
-       struct snd_soc_dai *codec_dai = rtd->codec_dai;
-       struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
+       struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0);
+       struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0);
        struct snd_compr *compr;
        struct snd_pcm *be_pcm;
        char new_name[64];
        ret = snd_compress_new(rtd->card->snd_card, num, direction,
                                new_name, compr);
        if (ret < 0) {
-               component = rtd->codec_dai->component;
+               component = asoc_rtd_to_codec(rtd, 0)->component;
                dev_err(component->dev,
                        "Compress ASoC: can't create compress for codec %s: %d\n",
                        component->name, ret);
 
  */
 void snd_soc_close_delayed_work(struct snd_soc_pcm_runtime *rtd)
 {
-       struct snd_soc_dai *codec_dai = rtd->codec_dai;
+       struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0);
        int playback = SNDRV_PCM_STREAM_PLAYBACK;
 
        mutex_lock_nested(&rtd->card->pcm_mutex, rtd->card->pcm_subclass);
 
        rtd->num_cpus = dai_link->num_cpus;
        for_each_link_cpus(dai_link, i, cpu) {
-               rtd->cpu_dais[i] = snd_soc_find_dai(cpu);
-               if (!rtd->cpu_dais[i]) {
+               asoc_rtd_to_cpu(rtd, i) = snd_soc_find_dai(cpu);
+               if (!asoc_rtd_to_cpu(rtd, i)) {
                        dev_info(card->dev, "ASoC: CPU DAI %s not registered\n",
                                 cpu->dai_name);
                        goto _err_defer;
                }
-               snd_soc_rtd_add_component(rtd, rtd->cpu_dais[i]->component);
+               snd_soc_rtd_add_component(rtd, asoc_rtd_to_cpu(rtd, i)->component);
        }
 
        /* Single cpu links expect cpu and cpu_dai in runtime data */
        /* Find CODEC from registered CODECs */
        rtd->num_codecs = dai_link->num_codecs;
        for_each_link_codecs(dai_link, i, codec) {
-               rtd->codec_dais[i] = snd_soc_find_dai(codec);
-               if (!rtd->codec_dais[i]) {
+               asoc_rtd_to_codec(rtd, i) = snd_soc_find_dai(codec);
+               if (!asoc_rtd_to_codec(rtd, i)) {
                        dev_info(card->dev, "ASoC: CODEC DAI %s not registered\n",
                                 codec->dai_name);
                        goto _err_defer;
                }
 
-               snd_soc_rtd_add_component(rtd, rtd->codec_dais[i]->component);
+               snd_soc_rtd_add_component(rtd, asoc_rtd_to_codec(rtd, i)->component);
        }
 
        /* Single codec links expect codec and codec_dai in runtime data */
                                struct snd_soc_pcm_runtime *rtd)
 {
        struct snd_soc_dai_link *dai_link = rtd->dai_link;
-       struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
+       struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(rtd, 0);
        struct snd_soc_component *component;
        int ret, num, i;
 
 
        if (rtd->num_cpus == 1) {
                for_each_rtd_codec_dais(rtd, i, codec_dai)
                        dapm_add_valid_dai_widget(card, rtd, codec_dai,
-                                                 rtd->cpu_dais[0]);
+                                                 asoc_rtd_to_cpu(rtd, 0));
        } else if (rtd->num_codecs == rtd->num_cpus) {
                for_each_rtd_codec_dais(rtd, i, codec_dai)
                        dapm_add_valid_dai_widget(card, rtd, codec_dai,
-                                                 rtd->cpu_dais[i]);
+                                                 asoc_rtd_to_cpu(rtd, i));
        } else {
                dev_err(card->dev,
                        "N cpus to M codecs link is not supported yet\n");
 
                return -EINVAL;
        }
 
-       dma_data = snd_soc_dai_get_dma_data(rtd->cpu_dai, substream);
+       dma_data = snd_soc_dai_get_dma_data(asoc_rtd_to_cpu(rtd, 0), substream);
 
        ret = snd_hwparams_to_dma_slave_config(substream, params, slave_config);
        if (ret)
                return snd_soc_set_runtime_hwparams(substream,
                                pcm->config->pcm_hardware);
 
-       dma_data = snd_soc_dai_get_dma_data(rtd->cpu_dai, substream);
+       dma_data = snd_soc_dai_get_dma_data(asoc_rtd_to_cpu(rtd, 0), substream);
 
        memset(&hw, 0, sizeof(hw));
        hw.info = SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_MMAP_VALID |
                return NULL;
        }
 
-       dma_data = snd_soc_dai_get_dma_data(rtd->cpu_dai, substream);
+       dma_data = snd_soc_dai_get_dma_data(asoc_rtd_to_cpu(rtd, 0), substream);
 
        if ((pcm->flags & SND_DMAENGINE_PCM_FLAG_HALF_DUPLEX) && pcm->chan[0])
                return pcm->chan[0];
 
                return -ENOMEM;
 
        for_each_pcm_streams(stream)
-               if (snd_soc_dai_stream_valid(fe->cpu_dai, stream))
+               if (snd_soc_dai_stream_valid(asoc_rtd_to_cpu(fe, 0), stream))
                        offset += dpcm_show_state(fe, stream,
                                                  buf + offset,
                                                  out_count - offset);
        soc_pcm_init_runtime_hw(substream);
 
        if (rtd->num_codecs == 1)
-               codec_dai_name = rtd->codec_dai->name;
+               codec_dai_name = asoc_rtd_to_codec(rtd, 0)->name;
 
        if (rtd->num_cpus == 1)
-               cpu_dai_name = rtd->cpu_dai->name;
+               cpu_dai_name = asoc_rtd_to_cpu(rtd, 0)->name;
 
        if (soc_pcm_has_symmetry(substream))
                runtime->hw.info |= SNDRV_PCM_INFO_JOINT_DUPLEX;
 int dpcm_path_get(struct snd_soc_pcm_runtime *fe,
        int stream, struct snd_soc_dapm_widget_list **list)
 {
-       struct snd_soc_dai *cpu_dai = fe->cpu_dai;
+       struct snd_soc_dai *cpu_dai = asoc_rtd_to_cpu(fe, 0);
        int paths;
 
        if (fe->num_cpus > 1) {
                 * DAIs connected to a single CPU DAI, use CPU DAI's directly
                 */
                if (be->num_codecs == 1) {
-                       codec_stream = snd_soc_dai_get_pcm_stream(be->codec_dais[0], stream);
+                       codec_stream = snd_soc_dai_get_pcm_stream(asoc_rtd_to_codec(be, 0), stream);
 
                        *channels_min = max(*channels_min,
                                            codec_stream->channels_min);
                return 0;
 
        /* only check active links */
-       if (!fe->cpu_dai->active)
+       if (!asoc_rtd_to_cpu(fe, 0)->active)
                return 0;
 
        /* DAPM sync will call this to update DSP paths */
        for_each_pcm_streams(stream) {
 
                /* skip if FE doesn't have playback/capture capability */
-               if (!snd_soc_dai_stream_valid(fe->cpu_dai,   stream) ||
-                   !snd_soc_dai_stream_valid(fe->codec_dai, stream))
+               if (!snd_soc_dai_stream_valid(asoc_rtd_to_cpu(fe, 0),   stream) ||
+                   !snd_soc_dai_stream_valid(asoc_rtd_to_codec(fe, 0), stream))
                        continue;
 
                /* skip if FE isn't currently playing/capturing */
-               if (!fe->cpu_dai->stream_active[stream] ||
-                   !fe->codec_dai->stream_active[stream])
+               if (!asoc_rtd_to_cpu(fe, 0)->stream_active[stream] ||
+                   !asoc_rtd_to_codec(fe, 0)->stream_active[stream])
                        continue;
 
                paths = dpcm_path_get(fe, stream, &list);
 
                for_each_rtd_codec_dais(rtd, i, codec_dai) {
                        if (rtd->num_cpus == 1) {
-                               cpu_dai = rtd->cpu_dais[0];
+                               cpu_dai = asoc_rtd_to_cpu(rtd, 0);
                        } else if (rtd->num_cpus == rtd->num_codecs) {
-                               cpu_dai = rtd->cpu_dais[i];
+                               cpu_dai = asoc_rtd_to_cpu(rtd, i);
                        } else {
                                dev_err(rtd->card->dev,
                                        "N cpus to M codecs link is not supported yet\n");
                        snprintf(new_name, sizeof(new_name), "%s %s-%d",
                                rtd->dai_link->stream_name,
                                (rtd->num_codecs > 1) ?
-                               "multicodec" : rtd->codec_dai->name, num);
+                               "multicodec" : asoc_rtd_to_codec(rtd, 0)->name, num);
 
                ret = snd_pcm_new(rtd->card->snd_card, new_name, num, playback,
                        capture, &pcm);
        pcm->no_device_suspend = true;
 out:
        dev_info(rtd->card->dev, "%s <-> %s mapping ok\n",
-                (rtd->num_codecs > 1) ? "multicodec" : rtd->codec_dai->name,
-                (rtd->num_cpus > 1) ? "multicpu" : rtd->cpu_dai->name);
+                (rtd->num_codecs > 1) ? "multicodec" : asoc_rtd_to_codec(rtd, 0)->name,
+                (rtd->num_cpus > 1)   ? "multicpu"   : asoc_rtd_to_cpu(rtd, 0)->name);
        return ret;
 }