*参照元 [#g23a6b17] #backlinks *説明 [#sabe0bbf] -パス: [[linux-4.4.1/sound/soc/soc-dapm.c]] -FIXME: これは何? --説明 ドライバでは下記のように定義することが多い。 static const char *sinkaaa_srcsel_text[] = { "ValueA", "ValueB", "ValueC", //e->texts[i] "ValueA", "ValueB", "ValueC", }; static SOC_ENUM_SINGLE_DECL(sinkaaa_srcsel_enum, REG_ADDR, REG_SHIFT, sinkaaa_srcsel_text); static const struct snd_kcontrol_new sinkaaa_mux[] = { SOC_DAPM_ENUM("SinkAAA Source", sinkaaa_srcsel_enum), }; //これ static const struct snd_soc_dapm_route foo_routes[] = { // sink control source { "SinkAAA", "ValueA", "SourceA" }, { "SinkAAA", "ValueB", "SourceB" }, { "SinkAAA", "ValueC", "SourceC" }, { "SinkBBB", NULL, "SourceD" }, //... }; **参考 [#z8c43fa5] *実装 [#x6f1cad7] /* * DAPM audio route definition. * * Defines an audio route originating at source via control and finishing * at sink. */ struct snd_soc_dapm_route { const char *sink; const char *control; const char *source; /* Note: currently only supported for links where source is a supply */ int (*connected)(struct snd_soc_dapm_widget *source, struct snd_soc_dapm_widget *sink); - --[[linux-4.4.1/snd_soc_dapm_widget]] }; *コメント [#p499af18]