亲宝软件园·资讯

展开

ALSA driver---DPCM

fellow_jing 人气:0

https://www.kernel.orghttps://img.qb5200.com/download-x/doc/html/v4.11/sound/sochttps://img.qb5200.com/download-x/dpcm.html

Description

Dynamic PCM allows an ALSA PCM device to digitally route its PCM audio to various digital endpoints during the PCM stream runtime. e.g. PCM0 can route digital audio to I2S DAI0, I2S DAI1 or PDM DAI2. This is useful for on SoC DSP drivers that expose several ALSA PCMs and can route to multiple DAIs.

The DPCM runtime routing is determined by the ALSA mixer settings in the same way as the analog signal is routed in an ASoC codec driver. DPCM uses a DAPM graph representing the DSP internal audio paths and uses the mixer settings to determine the patch used by each ALSA PCM.

DPCM re-uses all the existing component codec, platform and DAI drivers without any modifications.

Phone Audio System with SoC based DSP

Consider the following phone audio subsystem. This will be used in this document for all examples :-

| Front End PCMs    |  SoC DSP  | Back End DAIs | Audio devices |

                    *************
PCM0 <------------> *           * <----DAI0-----> Codec Headset
                    *           *
PCM1 <------------> *           * <----DAI1-----> Codec Speakers
                    *   DSP     *
PCM2 <------------> *           * <----DAI2-----> MODEM
                    *           *
PCM3 <------------> *           * <----DAI3-----> BT
                    *           *
                    *           * <----DAI4-----> DMIC
                    *           *
                    *           * <----DAI5-----> FM
                    *************

This diagram shows a simple smart phone audio subsystem. It supports Bluetooth, FM digital radio, Speakers, Headset Jack, digital microphones and cellular modem. This sound card exposes 4 DSP front end (FE) ALSA PCM devices and supports 6 back end (BE) DAIs. Each FE PCM can digitally route audio data to any of the BE DAIs. The FE PCM devices can also route audio to more than 1 BE DAI.

DPCM machine driver

The DPCM enabled ASoC machine driver is similar to normal machine drivers except that we also have to :-

  1. Define the FE and BE DAI links.
  2. Define any FE/BE PCM operations.
  3. Define widget graph connections.

FE and BE DAI links

| Front End PCMs    |  SoC DSP  | Back End DAIs | Audio devices |

                    *************
PCM0 <------------> *           * <----DAI0-----> Codec Headset
                    *           *
PCM1 <------------> *           * <----DAI1-----> Codec Speakers
                    *   DSP     *
PCM2 <------------> *           * <----DAI2-----> MODEM
                    *           *
PCM3 <------------> *           * <----DAI3-----> BT
                    *           *
                    *           * <----DAI4-----> DMIC
                    *           *
                    *           * <----DAI5-----> FM
                    *************

For the example above we have to define 4 FE DAI links and 6 BE DAI links. The FE DAI links are defined as follows :-

static struct snd_soc_dai_link machine_dais[] = {
      {
              .name = "PCM0 System",
              .stream_name = "System Playback",
              .cpu_dai_name = "System Pin",
              .platform_name = "dsp-audio",
              .codec_name = "snd-soc-dummy",
              .codec_dai_name = "snd-soc-dummy-dai",
              .dynamic = 1,
              .trigger = {SND_SOC_DPCM_TRIGGER_POST, SND_SOC_DPCM_TRIGGER_POST},
              .dpcm_playback = 1,
      },
      .....< other FE and BE DAI links here >
};

This FE DAI link is pretty similar to a regular DAI link except that we also set the DAI link to a DPCM FE with the dynamic = 1. The supported FE stream directions should also be set with the dpcm_playback and dpcm_capture flags. There is also an option to specify the ordering of the trigger call for each FE. This allows the ASoC core to trigger the DSP before or after the other components (as some DSPs have strong requirements for the ordering DAI/DSP start and stop sequences).

The FE DAI above sets the codec and code DAIs to dummy devices since the BE is dynamic and will change depending on runtime config.

The BE DAIs are configured as follows :-

static struct snd_soc_dai_link machine_dais[] = {
      .....< FE DAI links here >
      {
              .name = "Codec Headset",
              .cpu_dai_name = "ssp-dai.0",
              .platform_name = "snd-soc-dummy",
              .no_pcm = 1,
              .codec_name = "rt5640.0-001c",
              .codec_dai_name = "rt5640-aif1",
              .ignore_suspend = 1,
              .ignore_pmdown_time = 1,
              .be_hw_params_fixup = hswult_ssp0_fixup,
              .ops = &haswell_ops,
              .dpcm_playback = 1,
              .dpcm_capture = 1,
      },
      .....< other BE DAI links here >
};

This BE DAI link connects DAI0 to the codec (in this case RT5460 AIF1). It sets the no_pcm flag to mark it has a BE and sets flags for supported stream directions using dpcm_playback and dpcm_capture above.

The BE has also flags set for ignoring suspend and PM down time. This allows the BE to work in a hostless mode where the host CPU is not transferring data like a BT phone call :-

                    *************
PCM0 <------------> *           * <----DAI0-----> Codec Headset
                    *           *
PCM1 <------------> *           * <----DAI1-----> Codec Speakers
                    *   DSP     *
PCM2 <------------> *           * <====DAI2=====> MODEM
                    *           *
PCM3 <------------> *           * <====DAI3=====> BT
                    *           *
                    *           * <----DAI4-----> DMIC
                    *           *
                    *           * <----DAI5-----> FM
                    *************

This allows the host CPU to sleep whilst the DSP, MODEM DAI and the BT DAI are still in operation.

A BE DAI link can also set the codec to a dummy device if the code is a device that is managed externally.

Likewise a BE DAI can also set a dummy cpu DAI if the CPU DAI is managed by the DSP firmware.

FE/BE PCM operations

The BE above also exports some PCM operations and a fixup callback. The fixup callback is used by the machine driver to (re)configure the DAI based upon the FE hw params. i.e. the DSP may perform SRC or ASRC from the FE to BE.

e.g. DSP converts all FE hw params to run at fixed rate of 48k, 16bit, stereo for DAI0. This means all FE hw_params have to be fixed in the machine driver for DAI0 so that the DAI is running at desired configuration regardless of the FE configuration.

static int dai0_fixup(struct snd_soc_pcm_runtime *rtd,
                      struct snd_pcm_hw_params *params)
{
      struct snd_interval *rate = hw_param_interval(params,
                      SNDRV_PCM_HW_PARAM_RATE);
      struct snd_interval *channels = hw_param_interval(params,
                                              SNDRV_PCM_HW_PARAM_CHANNELS);

      /* The DSP will covert the FE rate to 48k, stereo */
      rate->min = rate->max = 48000;
      channels->min = channels->max = 2;

      /* set DAI0 to 16 bit */
      snd_mask_set(&params->masks[SNDRV_PCM_HW_PARAM_FORMAT -
                                  SNDRV_PCM_HW_PARAM_FIRST_MASK],
                                  SNDRV_PCM_FORMAT_S16_LE);
      return 0;
}

The other PCM operation are the same as for regular DAI links. Use as necessary.

Widget graph connections

The BE DAI links will normally be connected to the graph at initialisation time by the ASoC DAPM core. However, if the BE codec or BE DAI is a dummy then this has to be set explicitly in the driver :-

/* BE for codec Headset -  DAI0 is dummy and managed by DSP FW */
{"DAI0 CODEC IN", NULL, "AIF1 Capture"},
{"AIF1 Playback", NULL, "DAI0 CODEC OUT"},

Writing a DPCM DSP driver

The DPCM DSP driver looks much like a standard platform class ASoC driver combined with elements from a codec class driver. A DSP platform driver must implement :-

  1. Front End PCM DAIs - i.e. struct snd_soc_dai_driver.
  2. DAPM graph showing DSP audio routing from FE DAIs to BEs.
  3. DAPM widgets from DSP graph.
  4. Mixers for gains, routing, etc.
  5. DMA configuration.
  6. BE AIF widgets.

Items 6 is important for routing the audio outside of the DSP. AIF need to be defined for each BE and each stream direction. e.g for BE DAI0 above we would have :-

SND_SOC_DAPM_AIF_IN("DAI0 RX", NULL, 0, SND_SOC_NOPM, 0, 0),
SND_SOC_DAPM_AIF_OUT("DAI0 TX", NULL, 0, SND_SOC_NOPM, 0, 0),

The BE AIF are used to connect the DSP graph to the graphs for the other component drivers (e.g. codec graph).

Example:

FE & BE DAIs:

sound/soc/mediatek/mt2701/mt2701-cs42448.c

static struct snd_soc_dai_link mt2701_cs42448_dai_links[] = {
    /* FE */
    [DAI_LINK_FE_MULTI_CH_OUT] = {
        .name = "mt2701-cs42448-multi-ch-out",
        .stream_name = "mt2701-cs42448-multi-ch-out",
        .cpu_dai_name = "PCM_multi",
        .codec_name = "snd-soc-dummy",
        .codec_dai_name = "snd-soc-dummy-dai",
        .trigger = {SND_SOC_DPCM_TRIGGER_POST,
                SND_SOC_DPCM_TRIGGER_POST},
        .ops = &mt2701_cs42448_48k_fe_ops,
        .dynamic = 1,
        .dpcm_playback = 1,
    },
    [DAI_LINK_FE_PCM0_IN] = {
        .name = "mt2701-cs42448-pcm0",
        .stream_name = "mt2701-cs42448-pcm0-data-UL",
        .cpu_dai_name = "PCM0",
        .codec_name = "snd-soc-dummy",
        .codec_dai_name = "snd-soc-dummy-dai",
        .trigger = {SND_SOC_DPCM_TRIGGER_POST,
                SND_SOC_DPCM_TRIGGER_POST},
        .ops = &mt2701_cs42448_48k_fe_ops,
        .dynamic = 1,
        .dpcm_capture = 1,
    },
    [DAI_LINK_FE_PCM1_IN] = {
        .name = "mt2701-cs42448-pcm1-data-UL",
        .stream_name = "mt2701-cs42448-pcm1-data-UL",
        .cpu_dai_name = "PCM1",
        .codec_name = "snd-soc-dummy",
        .codec_dai_name = "snd-soc-dummy-dai",
        .trigger = {SND_SOC_DPCM_TRIGGER_POST,
                SND_SOC_DPCM_TRIGGER_POST},
        .ops = &mt2701_cs42448_48k_fe_ops,
        .dynamic = 1,
        .dpcm_capture = 1,
    },
    [DAI_LINK_FE_BT_OUT] = {
        .name = "mt2701-cs42448-pcm-BT-out",
        .stream_name = "mt2701-cs42448-pcm-BT",
        .cpu_dai_name = "PCM_BT_DL",
        .codec_name = "snd-soc-dummy",
        .codec_dai_name = "snd-soc-dummy-dai",
        .trigger = {SND_SOC_DPCM_TRIGGER_POST,
                SND_SOC_DPCM_TRIGGER_POST},
        .dynamic = 1,
        .dpcm_playback = 1,
    },
    [DAI_LINK_FE_BT_IN] = {
        .name = "mt2701-cs42448-pcm-BT-in",
        .stream_name = "mt2701-cs42448-pcm-BT",
        .cpu_dai_name = "PCM_BT_UL",
        .codec_name = "snd-soc-dummy",
        .codec_dai_name = "snd-soc-dummy-dai",
        .trigger = {SND_SOC_DPCM_TRIGGER_POST,
                SND_SOC_DPCM_TRIGGER_POST},
        .dynamic = 1,
        .dpcm_capture = 1,
    },
    /* BE */
    [DAI_LINK_BE_I2S0] = {
        .name = "mt2701-cs42448-I2S0",
        .cpu_dai_name = "I2S0",
        .no_pcm = 1,
        .codec_dai_name = "cs42448",
        .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_CBS_CFS
             | SND_SOC_DAIFMT_GATED,
        .ops = &mt2701_cs42448_be_ops,
        .dpcm_playback = 1,
        .dpcm_capture = 1,
    },
    [DAI_LINK_BE_I2S1] = {
        .name = "mt2701-cs42448-I2S1",
        .cpu_dai_name = "I2S1",
        .no_pcm = 1,
        .codec_dai_name = "cs42448",
        .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_CBS_CFS
             | SND_SOC_DAIFMT_GATED,
        .ops = &mt2701_cs42448_be_ops,
        .dpcm_playback = 1,
        .dpcm_capture = 1,
    },
    [DAI_LINK_BE_I2S2] = {
        .name = "mt2701-cs42448-I2S2",
        .cpu_dai_name = "I2S2",
        .no_pcm = 1,
        .codec_dai_name = "cs42448",
        .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_CBS_CFS
             | SND_SOC_DAIFMT_GATED,
        .ops = &mt2701_cs42448_be_ops,
        .dpcm_playback = 1,
        .dpcm_capture = 1,
    },
    [DAI_LINK_BE_I2S3] = {
        .name = "mt2701-cs42448-I2S3",
        .cpu_dai_name = "I2S3",
        .no_pcm = 1,
        .codec_dai_name = "cs42448",
        .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_CBS_CFS
             | SND_SOC_DAIFMT_GATED,
        .ops = &mt2701_cs42448_be_ops,
        .dpcm_playback = 1,
        .dpcm_capture = 1,
    },
    [DAI_LINK_BE_MRG_BT] = {
        .name = "mt2701-cs42448-MRG-BT",
        .cpu_dai_name = "MRG BT",
        .no_pcm = 1,
        .codec_dai_name = "bt-sco-pcm-wb",
        .dpcm_playback = 1,
        .dpcm_capture = 1,
    },
};

static struct snd_soc_card mt2701_cs42448_soc_card = {
    .name = "mt2701-cs42448",
    .owner = THIS_MODULE,
    .dai_link = mt2701_cs42448_dai_links,
    .num_links = ARRAY_SIZE(mt2701_cs42448_dai_links),
    .controls = mt2701_cs42448_controls,
    .num_controls = ARRAY_SIZE(mt2701_cs42448_controls),
    .dapm_widgets = mt2701_cs42448_asoc_card_dapm_widgets,
    .num_dapm_widgets = ARRAY_SIZE(mt2701_cs42448_asoc_card_dapm_widgets),
};

DAPM graph showing DSP audio routing from FE DAIs to BEs.

PCM_Multi(FE cpu DAI) -->DLM(FE DAI Widget)-->"Asrc0 out Switch"(ctrl)-->ASRC_O0(widget)-->"Multich I2S0 out Switch"(ctrl)-->I12I13(widget)-->I12(widget)-->"I2 Switch"(ctrl)-->O15(widget)-->I2S0 Playback(BE DAI Widget)-->I2S0(BE cpu DAI)-->cs42448(codec DAI)

sound/soc/mediatek/mt2701/mt2701-afe-pcm.c

static const struct snd_kcontrol_new mt2701_afe_multi_ch_out_asrc0[] = {
    SOC_DAPM_SINGLE_AUTODISABLE("Asrc0 out Switch", AUDIO_TOP_CON4, 14, 1,
                    1),
};
static const struct snd_kcontrol_new mt2701_afe_multi_ch_out_i2s0[] = {
    SOC_DAPM_SINGLE_AUTODISABLE("Multich I2S0 Out Switch",
                    ASYS_I2SO1_CON, 26, 1, 0),
};
static const struct snd_kcontrol_new mt2701_afe_o15_mix[] = {
    SOC_DAPM_SINGLE_AUTODISABLE("I12 Switch", AFE_CONN15, 12, 1, 0),
};
static const struct snd_soc_dapm_widget mt2701_afe_pcm_widgets[] = {
    /* inter-connections */
    SND_SOC_DAPM_MIXER("I00", SND_SOC_NOPM, 0, 0, NULL, 0),
    SND_SOC_DAPM_MIXER("I01", SND_SOC_NOPM, 0, 0, NULL, 0),
    SND_SOC_DAPM_MIXER("I02", SND_SOC_NOPM, 0, 0, mt2701_afe_i02_mix,
               ARRAY_SIZE(mt2701_afe_i02_mix)),
    SND_SOC_DAPM_MIXER("I03", SND_SOC_NOPM, 0, 0, NULL, 0),
    SND_SOC_DAPM_MIXER("I12", SND_SOC_NOPM, 0, 0, NULL, 0),
    SND_SOC_DAPM_MIXER("I13", SND_SOC_NOPM, 0, 0, NULL, 0),
    SND_SOC_DAPM_MIXER("I14", SND_SOC_NOPM, 0, 0, NULL, 0),
    SND_SOC_DAPM_MIXER("I15", SND_SOC_NOPM, 0, 0, NULL, 0),
    SND_SOC_DAPM_MIXER("I16", SND_SOC_NOPM, 0, 0, NULL, 0),
    SND_SOC_DAPM_MIXER("I17", SND_SOC_NOPM, 0, 0, NULL, 0),
    SND_SOC_DAPM_MIXER("I18", SND_SOC_NOPM, 0, 0, NULL, 0),
    SND_SOC_DAPM_MIXER("I19", SND_SOC_NOPM, 0, 0, NULL, 0),
    SND_SOC_DAPM_MIXER("I26", SND_SOC_NOPM, 0, 0, NULL, 0),
    SND_SOC_DAPM_MIXER("I35", SND_SOC_NOPM, 0, 0, NULL, 0),

    SND_SOC_DAPM_MIXER("O00", SND_SOC_NOPM, 0, 0, mt2701_afe_o00_mix,
               ARRAY_SIZE(mt2701_afe_o00_mix)),
    SND_SOC_DAPM_MIXER("O01", SND_SOC_NOPM, 0, 0, mt2701_afe_o01_mix,
               ARRAY_SIZE(mt2701_afe_o01_mix)),
    SND_SOC_DAPM_MIXER("O02", SND_SOC_NOPM, 0, 0, mt2701_afe_o02_mix,
               ARRAY_SIZE(mt2701_afe_o02_mix)),
    SND_SOC_DAPM_MIXER("O03", SND_SOC_NOPM, 0, 0, mt2701_afe_o03_mix,
               ARRAY_SIZE(mt2701_afe_o03_mix)),
    SND_SOC_DAPM_MIXER("O14", SND_SOC_NOPM, 0, 0, mt2701_afe_o14_mix,
               ARRAY_SIZE(mt2701_afe_o14_mix)),
    SND_SOC_DAPM_MIXER("O15", SND_SOC_NOPM, 0, 0, mt2701_afe_o15_mix,
               ARRAY_SIZE(mt2701_afe_o15_mix)),
    SND_SOC_DAPM_MIXER("O16", SND_SOC_NOPM, 0, 0, mt2701_afe_o16_mix,
               ARRAY_SIZE(mt2701_afe_o16_mix)),
    SND_SOC_DAPM_MIXER("O17", SND_SOC_NOPM, 0, 0, mt2701_afe_o17_mix,
               ARRAY_SIZE(mt2701_afe_o17_mix)),
    SND_SOC_DAPM_MIXER("O18", SND_SOC_NOPM, 0, 0, mt2701_afe_o18_mix,
               ARRAY_SIZE(mt2701_afe_o18_mix)),
    SND_SOC_DAPM_MIXER("O19", SND_SOC_NOPM, 0, 0, mt2701_afe_o19_mix,
               ARRAY_SIZE(mt2701_afe_o19_mix)),
    SND_SOC_DAPM_MIXER("O20", SND_SOC_NOPM, 0, 0, mt2701_afe_o20_mix,
               ARRAY_SIZE(mt2701_afe_o20_mix)),
    SND_SOC_DAPM_MIXER("O21", SND_SOC_NOPM, 0, 0, mt2701_afe_o21_mix,
               ARRAY_SIZE(mt2701_afe_o21_mix)),
    SND_SOC_DAPM_MIXER("O22", SND_SOC_NOPM, 0, 0, mt2701_afe_o22_mix,
               ARRAY_SIZE(mt2701_afe_o22_mix)),
    SND_SOC_DAPM_MIXER("O31", SND_SOC_NOPM, 0, 0, mt2701_afe_o31_mix,
               ARRAY_SIZE(mt2701_afe_o31_mix)),

    SND_SOC_DAPM_MIXER("I12I13", SND_SOC_NOPM, 0, 0,
               mt2701_afe_multi_ch_out_i2s0,
               ARRAY_SIZE(mt2701_afe_multi_ch_out_i2s0)),
    SND_SOC_DAPM_MIXER("I14I15", SND_SOC_NOPM, 0, 0,
               mt2701_afe_multi_ch_out_i2s1,
               ARRAY_SIZE(mt2701_afe_multi_ch_out_i2s1)),
    SND_SOC_DAPM_MIXER("I16I17", SND_SOC_NOPM, 0, 0,
               mt2701_afe_multi_ch_out_i2s2,
               ARRAY_SIZE(mt2701_afe_multi_ch_out_i2s2)),
    SND_SOC_DAPM_MIXER("I18I19", SND_SOC_NOPM, 0, 0,
               mt2701_afe_multi_ch_out_i2s3,
               ARRAY_SIZE(mt2701_afe_multi_ch_out_i2s3)),

    SND_SOC_DAPM_MIXER("ASRC_O0", SND_SOC_NOPM, 0, 0,
               mt2701_afe_multi_ch_out_asrc0,
               ARRAY_SIZE(mt2701_afe_multi_ch_out_asrc0)),
    SND_SOC_DAPM_MIXER("ASRC_O1", SND_SOC_NOPM, 0, 0,
               mt2701_afe_multi_ch_out_asrc1,
               ARRAY_SIZE(mt2701_afe_multi_ch_out_asrc1)),
    SND_SOC_DAPM_MIXER("ASRC_O2", SND_SOC_NOPM, 0, 0,
               mt2701_afe_multi_ch_out_asrc2,
               ARRAY_SIZE(mt2701_afe_multi_ch_out_asrc2)),
    SND_SOC_DAPM_MIXER("ASRC_O3", SND_SOC_NOPM, 0, 0,
               mt2701_afe_multi_ch_out_asrc3,
               ARRAY_SIZE(mt2701_afe_multi_ch_out_asrc3)),
};

static const struct snd_soc_dapm_route mt2701_afe_pcm_routes[] = {
    {"I12", NULL, "DL1"},
    {"I13", NULL, "DL1"},
    {"I35", NULL, "DLBT"},

    {"I2S0 Playback", NULL, "O15"},
    {"I2S0 Playback", NULL, "O16"},

    {"I2S1 Playback", NULL, "O17"},
    {"I2S1 Playback", NULL, "O18"},
    {"I2S2 Playback", NULL, "O19"},
    {"I2S2 Playback", NULL, "O20"},
    {"I2S3 Playback", NULL, "O21"},
    {"I2S3 Playback", NULL, "O22"},
    {"BT Playback", NULL, "O31"},

    {"UL1", NULL, "O00"},
    {"UL1", NULL, "O01"},
    {"UL2", NULL, "O02"},
    {"UL2", NULL, "O03"},
    {"ULBT", NULL, "O14"},

    {"I00", NULL, "I2S0 Capture"},
    {"I01", NULL, "I2S0 Capture"},

    {"I02", NULL, "I2S1 Capture"},
    {"I03", NULL, "I2S1 Capture"},
    /* I02,03 link to UL2, also need to open I2S0 */
    {"I02", "I2S0 Switch", "I2S0 Capture"},

    {"I26", NULL, "BT Capture"},

    {"ASRC_O0", "Asrc0 out Switch", "DLM"},
    {"ASRC_O1", "Asrc1 out Switch", "DLM"},
    {"ASRC_O2", "Asrc2 out Switch", "DLM"},
    {"ASRC_O3", "Asrc3 out Switch", "DLM"},

    {"I12I13", "Multich I2S0 Out Switch", "ASRC_O0"},
    {"I14I15", "Multich I2S1 Out Switch", "ASRC_O1"},
    {"I16I17", "Multich I2S2 Out Switch", "ASRC_O2"},
    {"I18I19", "Multich I2S3 Out Switch", "ASRC_O3"},

    { "I12", NULL, "I12I13" },
    { "I13", NULL, "I12I13" },
    { "I14", NULL, "I14I15" },
    { "I15", NULL, "I14I15" },
    { "I16", NULL, "I16I17" },
    { "I17", NULL, "I16I17" },
    { "I18", NULL, "I18I19" },
    { "I19", NULL, "I18I19" },

    { "O00", "I00 Switch", "I00" },
    { "O01", "I01 Switch", "I01" },
    { "O02", "I02 Switch", "I02" },
    { "O03", "I03 Switch", "I03" },
    { "O14", "I26 Switch", "I26" },
    { "O15", "I12 Switch", "I12" },
    { "O16", "I13 Switch", "I13" },
    { "O17", "I14 Switch", "I14" },
    { "O18", "I15 Switch", "I15" },
    { "O19", "I16 Switch", "I16" },
    { "O20", "I17 Switch", "I17" },
    { "O21", "I18 Switch", "I18" },
    { "O22", "I19 Switch", "I19" },
    { "O31", "I35 Switch", "I35" },

};

static const struct snd_soc_component_driver mt2701_afe_pcm_dai_component = {
    .name = "mt2701-afe-pcm-dai",
    .dapm_widgets = mt2701_afe_pcm_widgets,
    .num_dapm_widgets = ARRAY_SIZE(mt2701_afe_pcm_widgets),
    .dapm_routes = mt2701_afe_pcm_routes,
    .num_dapm_routes = ARRAY_SIZE(mt2701_afe_pcm_routes),
};

 

 

 

 

加载全部内容

相关教程
猜你喜欢
用户评论