From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: [PATCH v3 5/5] ALSA: hda - hdmi setup pin when monitor hotplug in pcm dynamic assignment mode Date: Fri, 11 Dec 2015 11:58:34 +0100 Message-ID: References: <1449712332-106365-1-git-send-email-libin.yang@linux.intel.com> <1449712332-106365-6-git-send-email-libin.yang@linux.intel.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id 9DF4826665A for ; Fri, 11 Dec 2015 11:58:34 +0100 (CET) In-Reply-To: <1449712332-106365-6-git-send-email-libin.yang@linux.intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org To: libin.yang@linux.intel.com Cc: libin.yang@intel.com, mengdong.lin@intel.com, alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org On Thu, 10 Dec 2015 02:52:12 +0100, libin.yang@linux.intel.com wrote: > > From: Libin Yang > > 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 > --- > 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