*参照元 [#kc538868]
#backlinks

*説明 [#w4132968]
-パス: [[linux-4.4.1/sound/soc/soc-dapm.c]]

-FIXME: これは何?
--説明


**引数 [#hff68424]
-struct snd_soc_card *card
--
--[[linux-4.4.1/snd_soc_card]]
-struct snd_kcontrol *kcontrol
--
--[[linux-4.4.1/snd_kcontrol]]
-int mux
-struct soc_enum *e
--
--[[linux-4.4.1/soc_enum]]


**返り値 [#pda59f62]
-int
--


**参考 [#k3666675]


*実装 [#l73edebd]
 /* test and update the power status of a mux widget */
 static int soc_dapm_mux_update_power(struct snd_soc_card *card,
 				 struct snd_kcontrol *kcontrol, int mux, struct soc_enum *e)
 {
 	struct snd_soc_dapm_path *path;
 	int found = 0;
 	bool connect;
 
-
--[[linux-4.4.1/snd_soc_dapm_path]]

 	lockdep_assert_held(&card->dapm_mutex);
 
-
--[[linux-4.4.1/lockdep_assert_held()]]

 	/* find dapm widget path assoc with kcontrol */
 	dapm_kcontrol_for_each_path(path, kcontrol) {
 		found = 1;
 		/* we now need to match the string in the enum to the path */
 		if (!(strcmp(path->name, e->texts[mux])))
 			connect = true;
 		else
 			connect = false;
 
 		soc_dapm_connect_path(path, connect, "mux update");
 	}
 
-
--[[linux-4.4.1/dapm_kcontrol_for_each_path()]]
--[[linux-4.4.1/strcmp()]]
--[[linux-4.4.1/soc_dapm_connect_path()]]
-kcontrol に path を追加している場所は下記。
--[[linux-4.4.1/dapm_new_mux()]]
--他にもある?
-ここで使用する kcontrol は private_data に dapm_kcontrol_data のポインタが入っていなければならない。
--[[linux-4.4.1/dapm_kcontrol_data]]

 	if (found)
 		dapm_power_widgets(card, SND_SOC_DAPM_STREAM_NOP);
 
-
--[[linux-4.4.1/dapm_power_widgets()]]

 	return found;
 }


*コメント [#ffe57a26]

トップ   編集 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS