From nobody Fri Nov 22 17:09:45 2024 Received: from mail.loongson.cn (mail.loongson.cn [114.242.206.163]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5537E1D4610; Fri, 15 Nov 2024 15:07:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=114.242.206.163 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731683228; cv=none; b=fUpaHlBRX25zzR/ABxYiZ07VHJOm/8Ct8T2gbTLZxzXhNxyMcEMAPf3u+6KP3Yksh7XLc+UGjTBrmapXdpcuLQH0K+oJlm+hyXEN4medUmyVwOLgOBYOT0AUgQRLW/sHl4pjFVrSWVF2toz//E3TXyOZ426AQlbTcU1DSKoa7iA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731683228; c=relaxed/simple; bh=Gt8CRfv0JnpQNa9j/2D2BL+u9sRR7UF5j1sio1duMJo=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=ZnLUiqrFnK1Xr8fLn/WwrY63Jv9eBWTc9ROuv8qDLF69tZA7O8Hx1vNE5G4PCys0KD2PAaVPqciAo/y7c4tvtYRiHFEU4CGgb8Vj1felRJyq6F3dJcd8HRJJ4tyxS/jUQz+7EhRNPG8sA8vaBoBnNmg8myogmrdW79g1VyfohVk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=loongson.cn; spf=pass smtp.mailfrom=loongson.cn; arc=none smtp.client-ip=114.242.206.163 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=loongson.cn Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=loongson.cn Received: from loongson.cn (unknown [223.64.68.202]) by gateway (Coremail) with SMTP id _____8DxmeCUYzdnrnc+AA--.57873S3; Fri, 15 Nov 2024 23:07:00 +0800 (CST) Received: from localhost.localdomain (unknown [223.64.68.202]) by front1 (Coremail) with SMTP id qMiowMCxOMGPYzdnqgFXAA--.5752S2; Fri, 15 Nov 2024 23:06:59 +0800 (CST) From: Huacai Chen To: Takashi Iwai , Jaroslav Kysela , Huacai Chen Cc: linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, Xuerui Wang , Jiaxun Yang , Huacai Chen , stable@vger.kernel.org Subject: [PATCH] ALSA: hda: Poll jack events for LS7A HD-Audio Date: Fri, 15 Nov 2024 23:06:53 +0800 Message-ID: <20241115150653.2819100-1-chenhuacai@loongson.cn> X-Mailer: git-send-email 2.43.5 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-CM-TRANSID: qMiowMCxOMGPYzdnqgFXAA--.5752S2 X-CM-SenderInfo: hfkh0x5xdftxo6or00hjvr0hdfq/ X-Coremail-Antispam: 1Uk129KBj9xXoWrZw4kCr4rWFWrCr4xAry8Xrc_yoWDJFb_ua 1I9r1kW345JFnxCr1Yyrn5JF4Ykw48CrWIgF4IqF4UJ393KrWFqry5ury7CF1xWr4rWryF 9w1qvw1Fvr1jgosvyTuYvTs0mTUanT9S1TB71UUUUj7qnTZGkaVYY2UrUUUUj1kv1TuYvT s0mT0YCTnIWjqI5I8CrVACY4xI64kE6c02F40Ex7xfYxn0WfASr-VFAUDa7-sFnT9fnUUI cSsGvfJTRUUUbSxYFVCjjxCrM7AC8VAFwI0_Jr0_Gr1l1xkIjI8I6I8E6xAIw20EY4v20x vaj40_Wr0E3s1l1IIY67AEw4v_JrI_Jryl8cAvFVAK0II2c7xJM28CjxkF64kEwVA0rcxS w2x7M28EF7xvwVC0I7IYx2IY67AKxVWUCVW8JwA2z4x0Y4vE2Ix0cI8IcVCY1x0267AKxV W8JVWxJwA2z4x0Y4vEx4A2jsIE14v26r4UJVWxJr1l84ACjcxK6I8E87Iv6xkF7I0E14v2 6r4UJVWxJr1ln4kS14v26r126r1DM2AIxVAIcxkEcVAq07x20xvEncxIr21l57IF6xkI12 xvs2x26I8E6xACxx1l5I8CrVACY4xI64kE6c02F40Ex7xfMcIj6xIIjxv20xvE14v26r1q 6rW5McIj6I8E87Iv67AKxVW8JVWxJwAm72CE4IkC6x0Yz7v_Jr0_Gr1lF7xvr2IYc2Ij64 vIr41lc7CjxVAaw2AFwI0_JF0_Jw1l42xK82IYc2Ij64vIr41l4I8I3I0E4IkC6x0Yz7v_ Jr0_Gr1l4IxYO2xFxVAFwI0_JF0_Jw1lx2IqxVAqx4xG67AKxVWUJVWUGwC20s026x8Gjc xK67AKxVWUGVWUWwC2zVAF1VAY17CE14v26r1q6r43MIIYrxkI7VAKI48JMIIF0xvE2Ix0 cI8IcVAFwI0_JFI_Gr1lIxAIcVC0I7IYx2IY6xkF7I0E14v26r4j6F4UMIIF0xvE42xK8V AvwI8IcIk0rVWUJVWUCwCI42IY6I8E87Iv67AKxVWUJVW8JwCI42IY6I8E87Iv6xkF7I0E 14v26r4j6r4UJbIYCTnIWIevJa73UjIFyTuYvjxU4BHqDUUUU Content-Type: text/plain; charset="utf-8" LS7A HD-Audio disable interrupts and use polling mode due to hardware drawbacks. As a result, unsolicited jack events are also unusable. If we want to support headphone hotplug, we need to also poll jack events. Here we use 1500ms as the poll interval if no module parameter specify it. Cc: stable@vger.kernel.org Signed-off-by: Huacai Chen --- sound/pci/hda/hda_intel.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index b4540c5cd2a6..5060d5428caf 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c @@ -1867,6 +1867,8 @@ static int azx_first_init(struct azx *chip) bus->polling_mode =3D 1; bus->not_use_interrupts =3D 1; bus->access_sdnctl_in_dword =3D 1; + if (!chip->jackpoll_interval) + chip->jackpoll_interval =3D msecs_to_jiffies(1500); } =20 err =3D pcim_iomap_regions(pci, 1 << 0, "ICH HD audio"); --=20 2.43.5