From patchwork Wed Aug 30 21:04:31 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian W MORRISON X-Patchwork-Id: 9930787 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 831EF60383 for ; Wed, 30 Aug 2017 21:04:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4843D28668 for ; Wed, 30 Aug 2017 21:04:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3C89C287A6; Wed, 30 Aug 2017 21:04:45 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=no version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 79C6128668 for ; Wed, 30 Aug 2017 21:04:43 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 9412326721E; Wed, 30 Aug 2017 23:04:39 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 4D7F826721F; Wed, 30 Aug 2017 23:04:38 +0200 (CEST) Received: from mail-pg0-f65.google.com (mail-pg0-f65.google.com [74.125.83.65]) by alsa0.perex.cz (Postfix) with ESMTP id 9902A267217 for ; Wed, 30 Aug 2017 23:04:34 +0200 (CEST) Received: by mail-pg0-f65.google.com with SMTP id t3so5848809pgt.5 for ; Wed, 30 Aug 2017 14:04:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=to:cc:from:subject:message-id:date:user-agent:mime-version :content-language:content-transfer-encoding; bh=VQq+E6tfHanQoPloLWwQ+azN0NqKpbVIXMxLCmpBY/o=; b=F6kV90b4vhG3undAOZ9KwkSNY3RAAi7GV8bmI/Kro8ZN+/s2aWtMoA/3bc4SO7Vmbg BhcsT4wwU812ldbS8nW9WyN2pIcLlM1tFyhQk3OcBJx+EOk0K9vy3MyvNQTFCGGrHYBs fLeCul7/VDTH1UdLANYJ48xQmX5tZQrHoLKB8KhGW1hi1fAyHUe/Dr/oswz4VmJeMJQI I0A5nF8BeW8+M1w8Z1rICV+1YxH5OZFKMWQ5i66kvLJx0BPXca0xSk03xezAabwN/1+u HU+2rRCebQuR8cGtisk1cUI7ovgH88z4PGHBod4luvFfwU1ABhkg5D5E02S84/yFl0rf oe5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:cc:from:subject:message-id:date:user-agent :mime-version:content-language:content-transfer-encoding; bh=VQq+E6tfHanQoPloLWwQ+azN0NqKpbVIXMxLCmpBY/o=; b=ARHZk5OInj8TMUsueh7IFsbUNsC9d0dRv/bpA3bg51YGtbl1BO/+dD5Kg8n70MOHmW ImZgfQOdrbKXyosnnZQ22u8Tcw5rj9iF61T2r8xhs/wsMIw0GupjSf25rAhJdnDToUs6 34FkdRxOZiKS4JR975Vu1KuiiRdwuFav5whF1Jt743BPNhvvuA6OzYboHvU6x8p4kueu CFLh5wUm51+GfHpwWXpmp3abw/9EmDmfYFhZTitGRVdSmYSzleak+oePK7Q/8EvXAnbo Lwvu5bMVAkYl6jhC2+u9ZLv7943wus1irz1kBcdOvL0CN/U74yT2sMmP9EbknGiZhJV8 dOIw== X-Gm-Message-State: AHYfb5iSqGfPj/M/qI3YxMSz2wtHkcMOxgJxjzjf2rENj9c2pU3L6VWJ awgbvY2lUOJl6Q== X-Google-Smtp-Source: ADKCNb6pjfu+pUecHRa83ocOBJo3RjeCwqbq1acX0zbS6eltBo9hpiybx3ecxo9ksc4TGw8lNUamtg== X-Received: by 10.98.217.140 with SMTP id b12mr2881645pfl.233.1504127072838; Wed, 30 Aug 2017 14:04:32 -0700 (PDT) Received: from [10.88.88.79] ([101.164.78.97]) by smtp.gmail.com with ESMTPSA id m10sm10437560pgs.70.2017.08.30.14.04.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 30 Aug 2017 14:04:31 -0700 (PDT) To: broonie@kernel.org, alsa-devel@alsa-project.org From: Ian W MORRISON Message-ID: <29ad0cbd-b58d-70e3-0647-a2d633b7e57e@gmail.com> Date: Thu, 31 Aug 2017 07:04:31 +1000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:54.0) Gecko/20100101 Thunderbird/54.0 MIME-Version: 1.0 Content-Language: en-US Cc: tiwai@suse.de Subject: [alsa-devel] [PATCH v2] ASoC: rt5645: Add jack detection workaround for MINIX Z83-4 based devices X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" 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 X-Virus-Scanned: ClamAV using ClamSMTP The MINIX NEO Z83-4 and MINIX NEO Z83-4 Pro devices requires jd_mode=3 to make the jack detection work. Using a BIOS DMI product of "Z83-4" will match both devices of 'NEO Z83-4' and 'Z83-4 Pro'. Signed-off-by: Ian W Morrison --- v2: Applied and tested again sound -b for-next and linux-next -b master v1: Applied and tested again linux -b master --- sound/soc/codecs/rt5645.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/sound/soc/codecs/rt5645.c b/sound/soc/codecs/rt5645.c index cd82302..6a7778a 100644 --- a/sound/soc/codecs/rt5645.c +++ b/sound/soc/codecs/rt5645.c @@ -3655,6 +3655,21 @@ static int rt5645_resume(struct snd_soc_codec *codec) { } }; +static struct rt5645_platform_data minix_z83_4_platform_data = { + .jd_mode = 3, +}; + +static struct dmi_system_id dmi_platform_minix_z83_4[] = { + { + .ident = "MINIX Z83-4", + .matches = { + DMI_EXACT_MATCH(DMI_SYS_VENDOR, "MINIX"), + DMI_MATCH(DMI_PRODUCT_NAME, "Z83-4"), + }, + }, + { } +}; + static bool rt5645_check_dp(struct device *dev) { if (device_property_present(dev, "realtek,in2-differential") || @@ -3709,6 +3724,8 @@ static int rt5645_i2c_probe(struct i2c_client *i2c, rt5645->pdata = gpd_win_platform_data; else if (dmi_check_system(dmi_platform_asus_t100ha)) rt5645->pdata = general_platform_data2; + else if (dmi_check_system(dmi_platform_minix_z83_4)) + rt5645->pdata = minix_z83_4_platform_data; if (quirk != -1) { rt5645->pdata.in2_diff = QUIRK_IN2_DIFF(quirk);