From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755370Ab1KVHa2 (ORCPT ); Tue, 22 Nov 2011 02:30:28 -0500 Received: from cantor2.suse.de ([195.135.220.15]:56731 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753682Ab1KVHa1 (ORCPT ); Tue, 22 Nov 2011 02:30:27 -0500 Date: Tue, 22 Nov 2011 08:30:24 +0100 Message-ID: From: Takashi Iwai To: Wu Fengguang Cc: "alsa-devel@alsa-project.org" , LKML Subject: Re: [PATCH 2/3] hda - delayed ELD repoll In-Reply-To: <20111121064811.GA24027@localhost> References: <20111116082945.414733231@intel.com> <20111116083514.568265053@intel.com> <20111121064811.GA24027@localhost> User-Agent: Wanderlust/2.15.6 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.7 Emacs/23.3 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org At Mon, 21 Nov 2011 14:48:11 +0800, Wu Fengguang wrote: > > On Wed, Nov 16, 2011 at 04:29:47PM +0800, Wu, Fengguang wrote: > > The Intel HDMI chips (ironlake at least) are found to have ~250ms delay > > between the ELD_Valid=1 hotplug event is send and the ELD buffer becomes > > actually readable. During the time the ELD buffer is mysteriously all 0. > > > > Fix it by scheduling a delayed work to re-read ELD buffer after 300ms. > > Just FYI. > > Up to now the 300ms looks sufficient. But if ever there comes longer > delays, I've already prepared a patch for retrying it for several times ;) Thanks. I think it's safer to have a repoll mechanism. But, looking at the patch, one question remains: > @@ -989,10 +990,9 @@ static void hdmi_present_sense(struct hd > if (eld_valid) { > if (!snd_hdmi_get_eld(eld, codec, pin_nid)) > snd_hdmi_show_eld(eld); > - else if (retry) { > + else if (repoll) { > queue_delayed_work(codec->bus->workq, > - &per_pin->work, > - msecs_to_jiffies(300)); > + &per_pin->work, repoll * HZ / 3); Do you really want to wait longer with a higher repoll number? Takashi