*参照元 [#laf65975]
#backlinks

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

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


**引数 [#db572f91]
-struct snd_soc_jack *jack
--
--[[linux-4.4.1/snd_soc_jack]]
-int status
--
-int mask
--


**返り値 [#b59dd33c]
-なし


**参考 [#mbdc09cd]


*実装 [#b5c728c2]
 /**
  * snd_soc_jack_report - Report the current status for a jack
  *
  * @jack:   the jack
  * @status: a bitmask of enum snd_jack_type values that are currently detected.
  * @mask:   a bitmask of enum snd_jack_type values that being reported.
  *
  * If configured using snd_soc_jack_add_pins() then the associated
  * DAPM pins will be enabled or disabled as appropriate and DAPM
  * synchronised.
  *
  * Note: This function uses mutexes and should be called from a
  * context which can sleep (such as a workqueue).
  */
 void snd_soc_jack_report(struct snd_soc_jack *jack, int status, int mask)
 {
         struct snd_soc_dapm_context *dapm;
         struct snd_soc_jack_pin *pin;
         unsigned int sync = 0;
         int enable;
 
-
--[[linux-4.4.1/snd_soc_dapm_context]]
--[[linux-4.4.1/snd_soc_jack_pin]]

         trace_snd_soc_jack_report(jack, mask, status);
 
-
--[[linux-4.4.1/trace_snd_soc_jack_report()]]

         if (!jack)
                 return;
 
         dapm = &jack->card->dapm;
 
         mutex_lock(&jack->mutex);
 
-
--[[linux-4.4.1/mutex_lock()]]

         jack->status &= ~mask;
         jack->status |= status & mask;
 
         trace_snd_soc_jack_notify(jack, status);
 
-
--[[linux-4.4.1/trace_snd_soc_jack_notify()]]

         list_for_each_entry(pin, &jack->pins, list) {
-
--[[linux-4.4.1/list_for_each_entry()]]

                 enable = pin->mask & jack->status;
 
                 if (pin->invert)
                         enable = !enable;
 
                 if (enable)
                         snd_soc_dapm_enable_pin(dapm, pin->pin);
                 else
                         snd_soc_dapm_disable_pin(dapm, pin->pin);
 
-
--[[linux-4.4.1/snd_soc_dapm_enable_pin()]]
--[[linux-4.4.1/snd_soc_dapm_disable_pin()]]

                 /* we need to sync for this case only */
                 sync = 1;
         }
 
         /* Report before the DAPM sync to help users updating micbias status */
         blocking_notifier_call_chain(&jack->notifier, jack->status, jack);
 
-
--[[linux-4.4.1/blocking_notifier_call_chain()]]

         if (sync)
                 snd_soc_dapm_sync(dapm);
 
-
--[[linux-4.4.1/snd_soc_dapm_sync()]]

         snd_jack_report(jack->jack, jack->status);
 
-
--[[linux-4.4.1/snd_jack_report()]]

         mutex_unlock(&jack->mutex);
-
--[[linux-4.4.1/mutex_unlock()]]

 }
 EXPORT_SYMBOL_GPL(snd_soc_jack_report);
-
--[[linux-4.4.1/EXPORT_SYMBOL_GPL()]]


*コメント [#w9219a80]


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