Received: by 2002:a17:90a:88:0:0:0:0 with SMTP id a8csp4563248pja; Thu, 21 Nov 2019 21:56:28 -0800 (PST) X-Google-Smtp-Source: APXvYqypIv8wHkUI+rD4dhkUMwnqnkUUsFOwEl6EmJaV+K+f9uOpcbMxQ4FYgEXtsqhm7b/SM+Sj X-Received: by 2002:a17:906:2e81:: with SMTP id o1mr19564745eji.284.1574402188628; Thu, 21 Nov 2019 21:56:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574402188; cv=none; d=google.com; s=arc-20160816; b=FhoQ3gVs3sUiuPID7YCARpKdsXqICJcDdc3Duf2hROgBOhlBroIvSO/1gnMcYAEurS T7jznLxfJI7Dc2+nW1OVw6dn1jlRp9wTx0ZEDKt38ivwbDxywY/cJrWDPrJ66HiDFY9N O/Y/bIUlwTwEQJn5DOxetIp9JMJs1sfcgSmJwIw9kRant2DuArIrAWnUOAZmugY9UbXZ GCeMGQ9PGkwbSqN6NHTlUQFWm4e2jxsIbBEqQtIJjeXdyafzmHHprqTzPJsh7j8hUiYC 92ZPfdPRWexQXT+8xi+HgdL64xB4KhBgJeLuNSRvL0VIdtEHLM7mgtx/OqjU2QO1PceD LNmg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=EFGtAN5Z+osIXfwP7v8/97LzDuoFY7ngExoDZpr/7UA=; b=aIoMwLvs/RJMntAL12cRnznnAyv3BPdpcNsi6A5RyMugauTRxmGD6/jIfEhfR/mwry GG17TKvPHJ2j4ayxACOK42Svq2CPj9rthmHa3QmKWF/dwwM3gJzwCQJlJSIDJ0TmKf30 U7dpUczM8C8RoGhh7G9oWzrPHT72HLw/MD6xzIC8BuJr0N/EEI1ycQygeWPIBr3fYWGA tGDPakEta3YIktd6WQ4RnKizE3FcwzWQ9lHUCop6yzETYGn94ITOmldiXDWCvCntcE7l u/HMIoGYHGNaHTg5rePO0JuqcfKX4EAMkxzyYmvZq+D3dWosevZc77YpRgFZxpVfwLq2 oJxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=tsry0BzO; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k43si3957331edb.150.2019.11.21.21.56.04; Thu, 21 Nov 2019 21:56:28 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=tsry0BzO; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727910AbfKVFx7 (ORCPT + 99 others); Fri, 22 Nov 2019 00:53:59 -0500 Received: from mail.kernel.org ([198.145.29.99]:59342 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727669AbfKVFxS (ORCPT ); Fri, 22 Nov 2019 00:53:18 -0500 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 03E60207FA; Fri, 22 Nov 2019 05:53:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1574401997; bh=pz78iwdXUENbZcbYUMALJIFQGQOKoTGxA9AdC7L3WZw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tsry0BzOfr/ITWMcYzCLSjqO3Nel0KOHa6QWVsM+1FW6xC8ebcS6y7Ffd8gNcPAw4 yF/G0oN5FehqIjZ5ofeuSKSj2jcbkJuyBykoBK3stQ7vStYfPj5ksYmtXgFMx611JY qQ/XRUZY+az3cRYkVu7Z5ubmbexZq8OB4VCG4wdY= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Hui Wang , Mark Brown , Sasha Levin , alsa-devel@alsa-project.org Subject: [PATCH AUTOSEL 4.19 215/219] ASoC: rt5645: Headphone Jack sense inverts on the LattePanda board Date: Fri, 22 Nov 2019 00:49:06 -0500 Message-Id: <20191122054911.1750-207-sashal@kernel.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20191122054911.1750-1-sashal@kernel.org> References: <20191122054911.1750-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Hui Wang [ Upstream commit 406dcbc55a0a20fd155be889a4a0c4b812f7c18e ] The LattePanda board has a sound card chtrt5645, when there is nothing plugged in the headphone jack, the system thinks the headphone is plugged in, while we plug a headphone in the jack, the system thinks the headphone is unplugged. If adding quirk=0x21 in the module parameter, the headphone jack can work well. So let us fix it via platform_data. https://bugs.launchpad.net/bugs/182459 Signed-off-by: Hui Wang Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/codecs/rt5645.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/sound/soc/codecs/rt5645.c b/sound/soc/codecs/rt5645.c index 1dc70f452c1b9..f842db498c741 100644 --- a/sound/soc/codecs/rt5645.c +++ b/sound/soc/codecs/rt5645.c @@ -3662,6 +3662,11 @@ static const struct rt5645_platform_data jd_mode3_platform_data = { .jd_mode = 3, }; +static const struct rt5645_platform_data lattepanda_board_platform_data = { + .jd_mode = 2, + .inv_jd1_1 = true +}; + static const struct dmi_system_id dmi_platform_data[] = { { .ident = "Chrome Buddy", @@ -3759,6 +3764,15 @@ static const struct dmi_system_id dmi_platform_data[] = { }, .driver_data = (void *)&intel_braswell_platform_data, }, + { + .ident = "LattePanda board", + .matches = { + DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "AMI Corporation"), + DMI_EXACT_MATCH(DMI_BOARD_NAME, "Cherry Trail CR"), + DMI_EXACT_MATCH(DMI_BOARD_VERSION, "Default string"), + }, + .driver_data = (void *)&lattepanda_board_platform_data, + }, { } }; -- 2.20.1