linux-4.4.1/snd_soc_jack_add_pins()
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
|
ログイン
]
開始行:
*参照元 [#xb7df35c]
#backlinks
*説明 [#b5083cfb]
-パス: [[linux-4.4.1/sound/soc/soc-jack.c]]
-FIXME: これは何?
--説明
**引数 [#k94fca46]
-struct snd_soc_jack *jack
--
--[[linux-4.4.1/snd_soc_jack]]
-int count
--
-struct snd_soc_jack_pin *pins
--
--[[linux-4.4.1/snd_soc_jack_pin]]
**返り値 [#q6cfd7a6]
-int
--
**参考 [#o9adf8c1]
*実装 [#x08324db]
/**
* snd_soc_jack_add_pins - Associate DAPM pins with an A...
*
* @jack: ASoC jack
* @count: Number of pins
* @pins: Array of pins
*
* After this function has been called the DAPM pins spe...
* pins array will have their status updated to reflect ...
* state of the jack whenever the jack status is updated.
*/
int snd_soc_jack_add_pins(struct snd_soc_jack *jack, int...
struct snd_soc_jack_pin *pins)
{
int i;
for (i = 0; i < count; i++) {
if (!pins[i].pin) {
dev_err(jack->card->dev, "ASoC: ...
i);
return -EINVAL;
}
if (!pins[i].mask) {
dev_err(jack->card->dev, "ASoC: ...
" (%s)\n", i, pins[i].pi...
return -EINVAL;
}
-
--[[linux-4.4.1/dev_err()]]
INIT_LIST_HEAD(&pins[i].list);
list_add(&(pins[i].list), &jack->pins);
snd_jack_add_new_kctl(jack->jack, pins[i...
-
--[[linux-4.4.1/INIT_LIST_HEAD()]]
--[[linux-4.4.1/list_add()]]
--[[linux-4.4.1/snd_jack_add_new_kctl()]]
}
/* Update to reflect the last reported status; c...
* implementations are likely to set their state...
* card has an opportunity to associate pins.
*/
snd_soc_jack_report(jack, 0, 0);
-
--[[linux-4.4.1/snd_soc_jack_report()]]
return 0;
}
EXPORT_SYMBOL_GPL(snd_soc_jack_add_pins);
-
--[[linux-4.4.1/EXPORT_SYMBOL_GPL()]]
*コメント [#e5f451a3]
終了行:
*参照元 [#xb7df35c]
#backlinks
*説明 [#b5083cfb]
-パス: [[linux-4.4.1/sound/soc/soc-jack.c]]
-FIXME: これは何?
--説明
**引数 [#k94fca46]
-struct snd_soc_jack *jack
--
--[[linux-4.4.1/snd_soc_jack]]
-int count
--
-struct snd_soc_jack_pin *pins
--
--[[linux-4.4.1/snd_soc_jack_pin]]
**返り値 [#q6cfd7a6]
-int
--
**参考 [#o9adf8c1]
*実装 [#x08324db]
/**
* snd_soc_jack_add_pins - Associate DAPM pins with an A...
*
* @jack: ASoC jack
* @count: Number of pins
* @pins: Array of pins
*
* After this function has been called the DAPM pins spe...
* pins array will have their status updated to reflect ...
* state of the jack whenever the jack status is updated.
*/
int snd_soc_jack_add_pins(struct snd_soc_jack *jack, int...
struct snd_soc_jack_pin *pins)
{
int i;
for (i = 0; i < count; i++) {
if (!pins[i].pin) {
dev_err(jack->card->dev, "ASoC: ...
i);
return -EINVAL;
}
if (!pins[i].mask) {
dev_err(jack->card->dev, "ASoC: ...
" (%s)\n", i, pins[i].pi...
return -EINVAL;
}
-
--[[linux-4.4.1/dev_err()]]
INIT_LIST_HEAD(&pins[i].list);
list_add(&(pins[i].list), &jack->pins);
snd_jack_add_new_kctl(jack->jack, pins[i...
-
--[[linux-4.4.1/INIT_LIST_HEAD()]]
--[[linux-4.4.1/list_add()]]
--[[linux-4.4.1/snd_jack_add_new_kctl()]]
}
/* Update to reflect the last reported status; c...
* implementations are likely to set their state...
* card has an opportunity to associate pins.
*/
snd_soc_jack_report(jack, 0, 0);
-
--[[linux-4.4.1/snd_soc_jack_report()]]
return 0;
}
EXPORT_SYMBOL_GPL(snd_soc_jack_add_pins);
-
--[[linux-4.4.1/EXPORT_SYMBOL_GPL()]]
*コメント [#e5f451a3]
ページ名: