*参照元 [#hebf22ca] #backlinks *説明 [#j8a59685] -パス: [[linux-4.4.1/sound/soc/soc-ops.c]] -FIXME: これは何? --説明 **引数 [#gf8ab563] -struct snd_kcontrol *kcontrol -- --[[linux-4.4.1/snd_kcontrol]] -struct snd_ctl_elem_info *uinfo -- --[[linux-4.4.1/snd_ctl_elem_info]] **返り値 [#xd5484c7] -int -- **参考 [#rd83cdc3] *実装 [#ta2fc8e9] /** * snd_soc_info_volsw - single mixer info callback * @kcontrol: mixer control * @uinfo: control element information * * Callback to provide information about a single mixer control, or a double * mixer control that spans 2 registers. * * Returns 0 for success. */ int snd_soc_info_volsw(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) { struct soc_mixer_control *mc = (struct soc_mixer_control *)kcontrol->private_value; int platform_max; - --[[linux-4.4.1/soc_mixer_control]] if (!mc->platform_max) mc->platform_max = mc->max; platform_max = mc->platform_max; if (platform_max == 1 && !strstr(kcontrol->id.name, " Volume")) uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN; else uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER; - --[[linux-4.4.1/strstr()]] uinfo->count = snd_soc_volsw_is_stereo(mc) ? 2 : 1; uinfo->value.integer.min = 0; uinfo->value.integer.max = platform_max - mc->min; - --[[linux-4.4.1/snd_soc_volsw_is_stereo()]] return 0; } EXPORT_SYMBOL_GPL(snd_soc_info_volsw); - --[[linux-4.4.1/EXPORT_SYMBOL_GPL()]] *コメント [#qb42def1]