From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: [PATCH v2 1/2] ALSA: hda/hdmi - Read the pin sense from register when repolling Date: Mon, 06 May 2019 16:26:59 +0200 Message-ID: References: <20190506140932.7942-1-hui.wang@canonical.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 mx1.suse.de (mx2.suse.de [195.135.220.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id B7B83F89673 for ; Mon, 6 May 2019 16:27:01 +0200 (CEST) In-Reply-To: <20190506140932.7942-1-hui.wang@canonical.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" To: Hui Wang Cc: alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org On Mon, 06 May 2019 16:09:31 +0200, Hui Wang wrote: > > The driver will check the monitor presence when resuming from suspend, > starting poll or interrupt triggers. In these 3 situations, the > jack_dirty will be set to 1 first, then the hda_jack.c reads the > pin_sense from register, after reading the register, the jack_dirty > will be set to 0. But hdmi_repoll_work() is enabled in these 3 > situations, It will read the pin_sense a couple of times subsequently, > since the jack_dirty is 0 now, It does not read the register anymore, > instead it uses the shadow pin_sense which is read at the first time. > > It is meaningless to check the shadow pin_sense a couple of times, > we need to read the register to check the real plugging state, so > we set the jack_dirty to 1 in the hdmi_repoll_work(). > > Signed-off-by: Hui Wang Thanks, applied both patches. They deserve for Cc-to-stable, so I added it. Takashi