[alsa-devel] [PATCH v3 5/5] ALSA: hda - hdmi setup pin when monitor hotplug in pcm dynamic assignment mode

Takashi Iwai tiwai at suse.de
Fri Dec 11 11:58:34 CET 2015


On Thu, 10 Dec 2015 02:52:12 +0100,
libin.yang at linux.intel.com wrote:
> 
> From: Libin Yang <libin.yang at linux.intel.com>
> 
> Setup pin configuration when monitor is hotplugged
> in pcm dynamic assignment if the PCM is in open state.
> 
> When monitor is disconnect, The pin will be reset.
> 
> Signed-off-by: Libin Yang <libin.yang at linux.intel.com>
> ---
>  sound/pci/hda/hda_codec.h  |  1 +
>  sound/pci/hda/patch_hdmi.c | 82 +++++++++++++++++++++++++++++++++++++++++++---
>  2 files changed, 79 insertions(+), 4 deletions(-)
> 
> diff --git a/sound/pci/hda/hda_codec.h b/sound/pci/hda/hda_codec.h
> index 373fcad..ee97401 100644
> --- a/sound/pci/hda/hda_codec.h
> +++ b/sound/pci/hda/hda_codec.h
> @@ -167,6 +167,7 @@ enum {
>  /* for PCM creation */
>  struct hda_pcm {
>  	char *name;
> +	bool in_use;

No need to add such a flag in a common object.  (And actually it's
wrong to add here, it should be per stream.)

The check is needed only for HDMI/DP, thus it can be put in
hdmi_spec.  And it can be a bit flag protected via your new pcm_lock.


Takashi


More information about the Alsa-devel mailing list