Lines Matching refs:hcp

304 	struct hdmi_codec_priv *hcp = snd_soc_component_get_drvdata(component);  in hdmi_eld_ctl_get()  local
306 memcpy(ucontrol->value.bytes.data, hcp->eld, sizeof(hcp->eld)); in hdmi_eld_ctl_get()
328 static void hdmi_codec_eld_chmap(struct hdmi_codec_priv *hcp) in hdmi_codec_eld_chmap() argument
333 spk_alloc = drm_eld_get_spk_alloc(hcp->eld); in hdmi_codec_eld_chmap()
337 if ((spk_mask & ~(FL | FR)) && hcp->chmap_info->max_channels > 2) in hdmi_codec_eld_chmap()
338 hcp->chmap_info->chmap = hdmi_codec_8ch_chmaps; in hdmi_codec_eld_chmap()
340 hcp->chmap_info->chmap = hdmi_codec_stereo_chmaps; in hdmi_codec_eld_chmap()
343 static int hdmi_codec_get_ch_alloc_table_idx(struct hdmi_codec_priv *hcp, in hdmi_codec_get_ch_alloc_table_idx() argument
351 spk_alloc = drm_eld_get_spk_alloc(hcp->eld); in hdmi_codec_get_ch_alloc_table_idx()
373 struct hdmi_codec_priv *hcp = info->private_data; in hdmi_codec_chmap_ctl_get() local
375 map = info->chmap[hcp->chmap_idx].map; in hdmi_codec_chmap_ctl_get()
378 if (hcp->chmap_idx == HDMI_CODEC_CHMAP_IDX_UNKNOWN) in hdmi_codec_chmap_ctl_get()
390 struct hdmi_codec_priv *hcp = snd_soc_dai_get_drvdata(dai); in hdmi_codec_startup() local
393 ret = test_and_set_bit(0, &hcp->busy); in hdmi_codec_startup()
399 if (hcp->hcd.ops->audio_startup) { in hdmi_codec_startup()
400 ret = hcp->hcd.ops->audio_startup(dai->dev->parent, hcp->hcd.data); in hdmi_codec_startup()
405 if (hcp->hcd.ops->get_eld) { in hdmi_codec_startup()
406 ret = hcp->hcd.ops->get_eld(dai->dev->parent, hcp->hcd.data, in hdmi_codec_startup()
407 hcp->eld, sizeof(hcp->eld)); in hdmi_codec_startup()
411 hcp->eld); in hdmi_codec_startup()
416 hdmi_codec_eld_chmap(hcp); in hdmi_codec_startup()
422 clear_bit(0, &hcp->busy); in hdmi_codec_startup()
429 struct hdmi_codec_priv *hcp = snd_soc_dai_get_drvdata(dai); in hdmi_codec_shutdown() local
431 hcp->chmap_idx = HDMI_CODEC_CHMAP_IDX_UNKNOWN; in hdmi_codec_shutdown()
432 hcp->hcd.ops->audio_shutdown(dai->dev->parent, hcp->hcd.data); in hdmi_codec_shutdown()
434 clear_bit(0, &hcp->busy); in hdmi_codec_shutdown()
441 struct hdmi_codec_priv *hcp = snd_soc_dai_get_drvdata(dai); in hdmi_codec_hw_params() local
472 idx = hdmi_codec_get_ch_alloc_table_idx(hcp, hp.cea.channels); in hdmi_codec_hw_params()
476 hcp->chmap_idx = HDMI_CODEC_CHMAP_IDX_UNKNOWN; in hdmi_codec_hw_params()
480 hcp->chmap_idx = hdmi_codec_channel_alloc[idx].ca_id; in hdmi_codec_hw_params()
486 return hcp->hcd.ops->hw_params(dai->dev->parent, hcp->hcd.data, in hdmi_codec_hw_params()
559 struct hdmi_codec_priv *hcp = snd_soc_dai_get_drvdata(dai); in hdmi_codec_digital_mute() local
561 if (hcp->hcd.ops->digital_mute) in hdmi_codec_digital_mute()
562 return hcp->hcd.ops->digital_mute(dai->dev->parent, in hdmi_codec_digital_mute()
563 hcp->hcd.data, mute); in hdmi_codec_digital_mute()
611 struct hdmi_codec_priv *hcp = snd_soc_dai_get_drvdata(dai); in hdmi_codec_pcm_new() local
626 &hcp->chmap_info); in hdmi_codec_pcm_new()
631 hcp->chmap_info->private_data = hcp; in hdmi_codec_pcm_new()
632 hcp->chmap_info->kctl->get = hdmi_codec_chmap_ctl_get; in hdmi_codec_pcm_new()
635 hcp->chmap_info->chmap = hdmi_codec_stereo_chmaps; in hdmi_codec_pcm_new()
636 hcp->chmap_idx = HDMI_CODEC_CHMAP_IDX_UNKNOWN; in hdmi_codec_pcm_new()
669 static void hdmi_codec_jack_report(struct hdmi_codec_priv *hcp, in hdmi_codec_jack_report() argument
672 if (hcp->jack && jack_status != hcp->jack_status) { in hdmi_codec_jack_report()
673 snd_soc_jack_report(hcp->jack, jack_status, SND_JACK_LINEOUT); in hdmi_codec_jack_report()
674 hcp->jack_status = jack_status; in hdmi_codec_jack_report()
680 struct hdmi_codec_priv *hcp = dev_get_drvdata(dev); in plugged_cb() local
683 hdmi_codec_jack_report(hcp, SND_JACK_LINEOUT); in plugged_cb()
685 hdmi_codec_jack_report(hcp, 0); in plugged_cb()
696 struct hdmi_codec_priv *hcp = snd_soc_component_get_drvdata(component); in hdmi_codec_set_jack_detect() local
699 if (hcp->hcd.ops->hook_plugged_cb) { in hdmi_codec_set_jack_detect()
700 hcp->jack = jack; in hdmi_codec_set_jack_detect()
701 ret = hcp->hcd.ops->hook_plugged_cb(component->dev->parent, in hdmi_codec_set_jack_detect()
702 hcp->hcd.data, in hdmi_codec_set_jack_detect()
706 hcp->jack = NULL; in hdmi_codec_set_jack_detect()
769 struct hdmi_codec_priv *hcp = snd_soc_component_get_drvdata(component); in hdmi_of_xlate_dai_id() local
772 if (hcp->hcd.ops->get_dai_id) in hdmi_of_xlate_dai_id()
773 ret = hcp->hcd.ops->get_dai_id(component, endpoint); in hdmi_of_xlate_dai_id()
793 struct hdmi_codec_priv *hcp; in hdmi_codec_probe() local
809 hcp = devm_kzalloc(dev, sizeof(*hcp), GFP_KERNEL); in hdmi_codec_probe()
810 if (!hcp) in hdmi_codec_probe()
813 hcp->hcd = *hcd; in hdmi_codec_probe()
827 dev_set_drvdata(dev, hcp); in hdmi_codec_probe()