Received: by 2002:a05:6a10:83d0:0:0:0:0 with SMTP id o16csp23191pxh; Thu, 7 Apr 2022 12:49:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw21KmzHsY5kOpnpSRrG+hZGpUatYpS4hZY1gi7Q+S9VZr9SQhmnYbaFX5sl9Ba4oiH2X9b X-Received: by 2002:a63:475c:0:b0:381:ef1e:7099 with SMTP id w28-20020a63475c000000b00381ef1e7099mr12526473pgk.225.1649360954969; Thu, 07 Apr 2022 12:49:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649360954; cv=none; d=google.com; s=arc-20160816; b=kTsE6Yr/GTg1F6PydyPxvTffAaoXkxLMTKHOEh9I4igmShJ4kI/U1hk9Guk2iK2uQ0 R75tBqKvJqwH64IyrgLxTbpfwVgSOmVW42Z4M9u8IISszLK9XotVhINKdw3q/1UfrpD0 Jc3KG06sjgBe4+S8KX6XAi4sKnmcLMjdMgYewiTyWr/XCM3vDC0YfjSwBbhpsUQ8FAnx KQLYZXw5P9PAeV02Po5SeYijX5rykE8VtSx+h3KRBlfl4EH/po9roqhmSl8SP7j4luye KW+sHa5PTGWA0hmVmdsm9mhLkQrXxbMhLFdhxomZXxYAYyb3ZFxc7CUPeweuXgmmualH zE0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=CzjnguXiadlz7eUY9Kx6829Is7Jt6JaiEaPs+5sqqTA=; b=vdoIO/WB4tz1gS/PNzyWllFof8570XtOH+2KiNvKlSIQgEl1yAvFsP7lSRKScgVJiO qrwcToo20iAZE1LqtnVmdQ6V6+NNJuvqSohaYTAfxY/lc3VXbIcmzcdXpZ8Z9nmQIYov kRSi5JLBjsUh41Nb3Wjw0QsmrsYS5QJG4MzmH5LW1RfD96O9BLkyR45oMV8vU4J2p34d 9O0XtBOFVr8WUFhllv7fnCwY9Q5Z7cdpfgmP1/pKnuakGtv05sE1W1Q1W1QNoFRHtfTz 4Is0NZCp5GGTr3lV52IKHxG7f5TbNbJO7i5tSTYaZ3716VYec5/l9+T5KwSO7N2+v9/V ed5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=FJ1qN4a5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id c21-20020a170902c2d500b001541561fef7si608389pla.41.2022.04.07.12.49.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Apr 2022 12:49:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=FJ1qN4a5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 5F8A9224530; Thu, 7 Apr 2022 12:21:17 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230306AbiDGRSw (ORCPT + 99 others); Thu, 7 Apr 2022 13:18:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33974 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346022AbiDGRSu (ORCPT ); Thu, 7 Apr 2022 13:18:50 -0400 Received: from mail-pj1-x1035.google.com (mail-pj1-x1035.google.com [IPv6:2607:f8b0:4864:20::1035]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 92D2ADB2EC for ; Thu, 7 Apr 2022 10:16:49 -0700 (PDT) Received: by mail-pj1-x1035.google.com with SMTP id u14so6236194pjj.0 for ; Thu, 07 Apr 2022 10:16:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=CzjnguXiadlz7eUY9Kx6829Is7Jt6JaiEaPs+5sqqTA=; b=FJ1qN4a5bVhIVqPz+llJc+3m0NxSx14176vB3YwGMMqbFFd7DF300IuvPiiFbY3DYI jlfeGcnzmuptkWrsHOCwZAcOAFceTx3nM3m7kJDHX4w3s1kdb3hn4NBYZfJPiPwV8fVv fLHh0HqH3V31MlMTLoxyGq1UUGxwhgaOsQkKaNLUOucnXuRK1xX36Ryy5fIjdInxDw6+ r57NNFPjU0p00GyZxiIJndYJfs4csq6zOhkkpYRHWkxKQpxJZw7Q6/R2+N0D+EfQhwYF cULrVncucRpwZTcwYOJOwPcjqlAUmUV+TIW9dfl2teEOwLl2nIAQpm6mb3DcvOt/WuaW uLcw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=CzjnguXiadlz7eUY9Kx6829Is7Jt6JaiEaPs+5sqqTA=; b=C9c7SbkzDH+0xr1KL5PaEbzHVZlUI/sYeoKN3qnyEv9qJKDUsMdw1b42UVEU05wO5H wEGq8lMUfLc0ivbZ55EKWqgtdg+o5mbj+9+U1XjejwzlU6Lh6TtEfkZLsTrMjeurpeCM Gz8LVzfk2RJSPy1udeXz31XGnJjoSFtwuD5Nf94PFt2rbHGJc4eWBiOMSzrZnBWtLsPL UkPaK5XTPklR2dZnuMaogSKBLBCAWpZGDvHEXhziR5CBCK5cOuy7c4ofC8pyLMZ/1fQe 5aldN59Q7KIntVL1kZ67rWe+2zWhIhnLmxbZDtm95maEi8foHkdHTyrhg7K+1tp8S8gV BELw== X-Gm-Message-State: AOAM532y6jH2ME9P+rrrTnZbUPW1cNpi6uZYTBY3L5Iwd7hvMAfMCFmf 8iJEOy+ZJ+jDBqn4jc5mx2A= X-Received: by 2002:a17:903:205:b0:157:c51:12cd with SMTP id r5-20020a170903020500b001570c5112cdmr3342521plh.94.1649351806027; Thu, 07 Apr 2022 10:16:46 -0700 (PDT) Received: from [192.168.66.3] (p912131-ipoe.ipoe.ocn.ne.jp. [153.243.13.130]) by smtp.gmail.com with ESMTPSA id il3-20020a17090b164300b001c6d5ed3cacsm10209485pjb.1.2022.04.07.10.16.43 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 07 Apr 2022 10:16:45 -0700 (PDT) Message-ID: <57747e9a-10e0-e4f6-0644-5225396802f9@gmail.com> Date: Fri, 8 Apr 2022 02:16:41 +0900 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux aarch64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: Re: [PATCH] ASoC: rt5682: Add jack kcontrol Content-Language: en-US To: Mark Brown Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Jaroslav Kysela , Oder Chiou , Liam Girdwood References: <20220407141316.5099-1-akihiko.odaki@gmail.com> <96dae189-c0ff-4054-3d00-41c3b44c2cd6@gmail.com> From: Akihiko Odaki In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2022/04/08 1:37, Mark Brown wrote: > j > On Fri, Apr 08, 2022 at 01:11:22AM +0900, Akihiko Odaki wrote: >> On 2022/04/08 1:00, Mark Brown wrote: > >>> That bit is very common but there's still machine specific aspects - is >>> the required hardware wired up, if it is wired up how exactly are things >>> wired (separate microphone jack, headset jack, one of many jacks?). A >>> lot of the machine driver part of things is about labeling things so >>> that it can be displayed in a way that's easy to connect to the physical >>> system. Generally the machine driver would define a jack and then >>> connect the CODEC to it. > >> Whether the required hardware wired is told from the user of the codec via >> jack's type specified with snd_soc_card_jack_new(). The other details live >> in the codec. > > So I'm confused about what problem this patch is intended to fix. It > really sounds like there's some issue with the driver not using standard > interfaces that you're trying to work around but the changelog is not at > all clear. The "doesn't use DAPM" bit is a bit of a warning sign, it > sounds like the audio signals to and from the CODEC aren't being > connected to the jack properly. > > Look at how other devices with jack detection hardware handle this and > follow a similar pattern. The situation actually seems quite a mess. You can find many drivers not using DAPM pins by searching for snd_soc_card_jack_new() calls with num_pins argument is 0. ams-delta-audio is exceptional as it adds DAPM pins later with snd_soc_jack_add_pins(). They do not have kcontrols for the jacks. The only exception is skl_hda_dsp_generic which calls snd_jack_add_new_kctl() as my patch does. Looking at other devices is probably not helpful to find an alternative in this case. Regards, Akihiko Odaki