From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 37168C48BE5 for ; Wed, 16 Jun 2021 10:14:37 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1417F613C1 for ; Wed, 16 Jun 2021 10:14:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231892AbhFPKQl (ORCPT ); Wed, 16 Jun 2021 06:16:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51726 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231452AbhFPKQl (ORCPT ); Wed, 16 Jun 2021 06:16:41 -0400 Received: from mail-wm1-x32c.google.com (mail-wm1-x32c.google.com [IPv6:2a00:1450:4864:20::32c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7C4DCC061574 for ; Wed, 16 Jun 2021 03:14:34 -0700 (PDT) Received: by mail-wm1-x32c.google.com with SMTP id l7-20020a05600c1d07b02901b0e2ebd6deso1382803wms.1 for ; Wed, 16 Jun 2021 03:14:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=4U7CRd5ZUHeAQ1mHTEeUDEyK+XRZ/2DD+iIwKeM2DUQ=; b=EJlIwC+w/ZZcUyLS2Wmq9xD/+QoTpHYJn6vBhhOq04HrcqQ3zLjqNMhOlCw3LdBytb AtbsLxrJg3b4TnH+GAksptt1xPeldU9cRmZocKOu80svTqGC6XWsaGvu0QlnEr2F+ttU jb+Z26eE6h0fmWbXGmciv1IrXyo48ZuO7kAAk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=4U7CRd5ZUHeAQ1mHTEeUDEyK+XRZ/2DD+iIwKeM2DUQ=; b=GLuDrIwmM4fi4fKl5WWxlbnNRgARwe2XTqHVPasRXwe+cpR45qwLnrmvN7xtsRuEHl ivnNyev+rerd7KYQ7iSyPuPcQTIzeFED0cke+Ddd7W+54SZejZSUyKTI5gJOcU8ZciwV LMEot4Y6ji2wKgBMWylUBEVUoA5C1EWEII4dlmnZveiAxvZdmECmGE7QisH8lZRDQx0P vu8bXKEEMgpnkeeIbSr0VJIm2aIsiMgU0qetQVTdGDtUUfxKSj+CXjQln2NNB/OrKG+A VelXrnBEQl57in6cZtJEL32zOeQYpm+fx0tCdR4Qwbzi+InQXiHmG1+xph/pzxN06Zgd 8pTA== X-Gm-Message-State: AOAM531XqbVdTtOTd2C8ww+x84NGPj4W4tuAPgQw5Ty56mQrB/C0xag1 Pe7rK862pK8W+SoklwSEjPoVVNPY51JZwpGjk1AwBA== X-Google-Smtp-Source: ABdhPJwvRYer0BSrpn6ulizEkP50tXiNp6EJLSUbHvxNSVpJOzUIbRyL0qQIPiFOhbr31ytuPczvh4qBQIl7ujw3jeM= X-Received: by 2002:a7b:c5d2:: with SMTP id n18mr10523975wmk.97.1623838472860; Wed, 16 Jun 2021 03:14:32 -0700 (PDT) MIME-Version: 1.0 References: <20210526154704.114957-1-judyhsiao@chromium.org> <3501e398-dfba-43b1-4638-325a158e860d@linux.intel.com> In-Reply-To: <3501e398-dfba-43b1-4638-325a158e860d@linux.intel.com> From: Cheng-yi Chiang Date: Wed, 16 Jun 2021 18:14:05 +0800 Message-ID: Subject: Re: [PATCH] ASoC: max98357a: set channels_max to 4 To: Pierre-Louis Bossart Cc: Tzung-Bi Shih , Taniya Das , ALSA development , Banajit Goswami , Takashi Iwai , Rohit kumar , Patrick Lai , Andy Gross , Dylan Reid , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Tzung-Bi Shih , Stephan Gerhold , linux-arm-msm , Stephen Boyd , Rob Herring , Bjorn Andersson , "moderated list:ARM/Mediatek SoC support" , Douglas Anderson , Liam Girdwood , Mark Brown , Judy Hsiao Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org On Wed, Jun 16, 2021 at 12:00 AM Pierre-Louis Bossart wrote: > > > > On 6/15/21 10:47 AM, Cheng-yi Chiang wrote: > > Hi Tzung-Bi, > > > > On a platform, the four max98357a amps will be controlled by only one > > codec device, as GPIO for SD_MODE is shared by all amps and is the > > only thing to be controlled. > > In this sense, I think we can treat max98357a DAI as if it supports > > four channels. > > I understand that this solution is not scalable, because one can > > control as many amps as they want. > > Theoretically, the number of supported channels by this codec device > > is unlimited. > > I found that rt1015.c has similar usage. > > Do you have a better suggestion to support this kind of use case ? > > Thanks! > > please don't top-post... Hi Pierre-Louis, I am sorry about that! > > > I don't think it's correct to declare 4-channel support at the > individual codec DAI level when in practice each device will be provided > with a TDM mask that selects two slots. On this platform there is no TDM support, so there were two I2S data lines. > > This is confusing device capabilities and TDM link configuration. I see that in most of the use cases of multiple amps, we should use codecs and num_codecs of the link. But in this case we only want one codec to control the only GPIO shared by 4 max98357a amps I think we should be able to use 1 max98357 codec and 3 dummy codec to fulfill this use case. Not sure if the number of dummy codec would really matter. With num_codec > 1 we should be able to bypass the channel checking and just use the channel from CPU DAI. Thanks for the suggestion. > > > On Tue, Jun 1, 2021 at 2:20 PM Tzung-Bi Shih wrote: > >> > >> On Wed, May 26, 2021 at 11:47 PM Judy Hsiao wrote: > >>> Sets channels_max to 4 to support QUAD channel. > >> > >> Could you point out probably the up-to-date MAX98357A datasheet for > >> 4-channel support? > >> > >> On a related note, from the public datasheet I could find[1], "Table > >> 5" only shows 2 channel's configuration. > >> > >> [1]: https://pdf1.alldatasheet.com/datasheet-pdf/view/623796/MAXIM/MAX98357A.html From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DE968C48BE5 for ; Wed, 16 Jun 2021 10:15:34 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 737E96135C for ; Wed, 16 Jun 2021 10:15:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 737E96135C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 5C3E215DC; Wed, 16 Jun 2021 12:14:41 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 5C3E215DC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1623838531; bh=4U7CRd5ZUHeAQ1mHTEeUDEyK+XRZ/2DD+iIwKeM2DUQ=; h=References:In-Reply-To:From:Date:Subject:To:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=hIky3ou0moZTRx9uXysWJdCRdqvd6raU/EcjRTpp047SKx6w8jSRJ2CLFc2+23/iH D+Z3LPV6FCmPoBcEsuy0E8QP2e3OPDXPcW+0HJdmq0/6/5v4rJvjUcDD1Fo6DYlVg8 tm018WIB5R6Yq8bBUO8+/qzKC2vJ3hR6NLsLG6RI= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id E4417F802E8; Wed, 16 Jun 2021 12:14:40 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id EAABCF80423; Wed, 16 Jun 2021 12:14:39 +0200 (CEST) Received: from mail-wm1-x333.google.com (mail-wm1-x333.google.com [IPv6:2a00:1450:4864:20::333]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 0E611F80165 for ; Wed, 16 Jun 2021 12:14:33 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 0E611F80165 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="EJlIwC+w" Received: by mail-wm1-x333.google.com with SMTP id l7-20020a05600c1d07b02901b0e2ebd6deso1382801wms.1 for ; Wed, 16 Jun 2021 03:14:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=4U7CRd5ZUHeAQ1mHTEeUDEyK+XRZ/2DD+iIwKeM2DUQ=; b=EJlIwC+w/ZZcUyLS2Wmq9xD/+QoTpHYJn6vBhhOq04HrcqQ3zLjqNMhOlCw3LdBytb AtbsLxrJg3b4TnH+GAksptt1xPeldU9cRmZocKOu80svTqGC6XWsaGvu0QlnEr2F+ttU jb+Z26eE6h0fmWbXGmciv1IrXyo48ZuO7kAAk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=4U7CRd5ZUHeAQ1mHTEeUDEyK+XRZ/2DD+iIwKeM2DUQ=; b=AnLdcQ4sL4zlutgIQ78KyhDeuTmKzxqRj2VzVz/V7uWxAINUxYZ52vWdXBY5jCl6WP 7Kukh4ctg+By38sCMMdP95SVZLtqvktrPKppy+HMbdtqqfwYN2p4HV4fYAkbeRBxJ87e Ind7saOzybfRlx95fJWVDEC10G5DTEcvtDD1WbXA+4KzWZZoTitL2z+NE7jaVawDZTM6 4QBZlkmNNkBd/JDwITK/8ZLt8aCVQwGw78wRomCbLY0hK88544JtWrPDUK/xEjFXzc5y kpk9PUkL7blzJ+RIxe1FJUYl8vew16ZhMNVXQOXeYiYIlw+K+tsC8Jpmdy/6STI+Zgn1 i50w== X-Gm-Message-State: AOAM531mywV1Ld1kF4WAwGb97LJ8YCdF8SNqy4Lq7Uh41cldn/+okgN8 eC7U83o8mIukc/w+ATELMEGRxP0PlxYNrIt5EaDWcQ== X-Google-Smtp-Source: ABdhPJwvRYer0BSrpn6ulizEkP50tXiNp6EJLSUbHvxNSVpJOzUIbRyL0qQIPiFOhbr31ytuPczvh4qBQIl7ujw3jeM= X-Received: by 2002:a7b:c5d2:: with SMTP id n18mr10523975wmk.97.1623838472860; Wed, 16 Jun 2021 03:14:32 -0700 (PDT) MIME-Version: 1.0 References: <20210526154704.114957-1-judyhsiao@chromium.org> <3501e398-dfba-43b1-4638-325a158e860d@linux.intel.com> In-Reply-To: <3501e398-dfba-43b1-4638-325a158e860d@linux.intel.com> From: Cheng-yi Chiang Date: Wed, 16 Jun 2021 18:14:05 +0800 Message-ID: Subject: Re: [PATCH] ASoC: max98357a: set channels_max to 4 To: Pierre-Louis Bossart Content-Type: text/plain; charset="UTF-8" Cc: Taniya Das , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , ALSA development , Banajit Goswami , Rob Herring , Stephan Gerhold , Liam Girdwood , linux-arm-msm , Patrick Lai , Takashi Iwai , Tzung-Bi Shih , Stephen Boyd , Tzung-Bi Shih , Andy Gross , Rohit kumar , Mark Brown , Douglas Anderson , Dylan Reid , Bjorn Andersson , Judy Hsiao , "moderated list:ARM/Mediatek SoC support" X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 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" On Wed, Jun 16, 2021 at 12:00 AM Pierre-Louis Bossart wrote: > > > > On 6/15/21 10:47 AM, Cheng-yi Chiang wrote: > > Hi Tzung-Bi, > > > > On a platform, the four max98357a amps will be controlled by only one > > codec device, as GPIO for SD_MODE is shared by all amps and is the > > only thing to be controlled. > > In this sense, I think we can treat max98357a DAI as if it supports > > four channels. > > I understand that this solution is not scalable, because one can > > control as many amps as they want. > > Theoretically, the number of supported channels by this codec device > > is unlimited. > > I found that rt1015.c has similar usage. > > Do you have a better suggestion to support this kind of use case ? > > Thanks! > > please don't top-post... Hi Pierre-Louis, I am sorry about that! > > > I don't think it's correct to declare 4-channel support at the > individual codec DAI level when in practice each device will be provided > with a TDM mask that selects two slots. On this platform there is no TDM support, so there were two I2S data lines. > > This is confusing device capabilities and TDM link configuration. I see that in most of the use cases of multiple amps, we should use codecs and num_codecs of the link. But in this case we only want one codec to control the only GPIO shared by 4 max98357a amps I think we should be able to use 1 max98357 codec and 3 dummy codec to fulfill this use case. Not sure if the number of dummy codec would really matter. With num_codec > 1 we should be able to bypass the channel checking and just use the channel from CPU DAI. Thanks for the suggestion. > > > On Tue, Jun 1, 2021 at 2:20 PM Tzung-Bi Shih wrote: > >> > >> On Wed, May 26, 2021 at 11:47 PM Judy Hsiao wrote: > >>> Sets channels_max to 4 to support QUAD channel. > >> > >> Could you point out probably the up-to-date MAX98357A datasheet for > >> 4-channel support? > >> > >> On a related note, from the public datasheet I could find[1], "Table > >> 5" only shows 2 channel's configuration. > >> > >> [1]: https://pdf1.alldatasheet.com/datasheet-pdf/view/623796/MAXIM/MAX98357A.html From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 69A75C48BE5 for ; Wed, 16 Jun 2021 10:16:12 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2CE6061185 for ; Wed, 16 Jun 2021 10:16:12 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2CE6061185 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=twlAEYNSh/Vh7DQAja/IzQGocQiC7WG5vpAphgYpbX8=; b=WK1ABt5wgTqNxl dSFuFp8Auw2soCqEyGvlPqy1/1D8+do+KdY0HU30dnnldoqs5CPbEgtyicbg1S87tY3UmRj0bhMh7 G5Kk6Tlc+Xn2H1XMbTGJLCSdO9OVBdfknrm9eO2VZYdcSZx7F5IYVVg9fZGSI2W+Cqu9ZtW4EN8wq IHAlIbKemeuw4T5lfWsDmlFhKaKvZ0wZnsbYn6nJ2GqkJMrtXEAxP472BZF405c3dOH7FDjqPBz3L wwwM7JwTtgz5tD7q9iRiiBD3uGTnAsSDhqJlls7Z9tq19LUMrhQGFPZm4TJ2NWiFZ2H5WJPWYKmqX axlMFg9SWxjrVrCokzXg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ltSZC-005jLt-H7; Wed, 16 Jun 2021 10:14:38 +0000 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ltSZ8-005jLI-L0 for linux-arm-kernel@lists.infradead.org; Wed, 16 Jun 2021 10:14:36 +0000 Received: by mail-wm1-x329.google.com with SMTP id c18-20020a05600c0ad2b02901cee262e45fso1365291wmr.4 for ; Wed, 16 Jun 2021 03:14:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=4U7CRd5ZUHeAQ1mHTEeUDEyK+XRZ/2DD+iIwKeM2DUQ=; b=EJlIwC+w/ZZcUyLS2Wmq9xD/+QoTpHYJn6vBhhOq04HrcqQ3zLjqNMhOlCw3LdBytb AtbsLxrJg3b4TnH+GAksptt1xPeldU9cRmZocKOu80svTqGC6XWsaGvu0QlnEr2F+ttU jb+Z26eE6h0fmWbXGmciv1IrXyo48ZuO7kAAk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=4U7CRd5ZUHeAQ1mHTEeUDEyK+XRZ/2DD+iIwKeM2DUQ=; b=hnAk9F8LQFbYC2VUAPkmsXh7cxkbF2I1wW0uRh/D+Jzie6A9QzMhba1OR8ebJNNWiq /s/zn0hFINxXa+jlRukY6i9cfxrKO1cTgI6Rr7VtJSKYVbticceIO52nUEpKhptBSSgb WrWfdvkW/4qEjhTEKqX5uxFfDbkbNiPL5R5auAgdIYu7u1TGF3sGWGeE4EL3DhGF0tPD QkSeZf0Rq5r02Hj6btguBf0c9cufvKo2/i5FBKuwu/uxPfR7TPnJFNwkxChvJYJgnMOC DMnkGUaFernMDXUY4y1RwC1PB3ULQ3jW8ZEYSAUH6vPGpw/RN7HLmcfW3rECR21r4o2n arzw== X-Gm-Message-State: AOAM530bClk7xAIseNs2SCn6WnjojNpEDvokV+NAqnq7b2IGV9/Xnv0Y JF/b9D0Fimf0G3JTqo4q1g9Xf6NILc52+Rlku+fefw== X-Google-Smtp-Source: ABdhPJwvRYer0BSrpn6ulizEkP50tXiNp6EJLSUbHvxNSVpJOzUIbRyL0qQIPiFOhbr31ytuPczvh4qBQIl7ujw3jeM= X-Received: by 2002:a7b:c5d2:: with SMTP id n18mr10523975wmk.97.1623838472860; Wed, 16 Jun 2021 03:14:32 -0700 (PDT) MIME-Version: 1.0 References: <20210526154704.114957-1-judyhsiao@chromium.org> <3501e398-dfba-43b1-4638-325a158e860d@linux.intel.com> In-Reply-To: <3501e398-dfba-43b1-4638-325a158e860d@linux.intel.com> From: Cheng-yi Chiang Date: Wed, 16 Jun 2021 18:14:05 +0800 Message-ID: Subject: Re: [PATCH] ASoC: max98357a: set channels_max to 4 To: Pierre-Louis Bossart Cc: Tzung-Bi Shih , Taniya Das , ALSA development , Banajit Goswami , Takashi Iwai , Rohit kumar , Patrick Lai , Andy Gross , Dylan Reid , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Tzung-Bi Shih , Stephan Gerhold , linux-arm-msm , Stephen Boyd , Rob Herring , Bjorn Andersson , "moderated list:ARM/Mediatek SoC support" , Douglas Anderson , Liam Girdwood , Mark Brown , Judy Hsiao X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210616_031434_745947_C2D397CA X-CRM114-Status: GOOD ( 26.76 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Jun 16, 2021 at 12:00 AM Pierre-Louis Bossart wrote: > > > > On 6/15/21 10:47 AM, Cheng-yi Chiang wrote: > > Hi Tzung-Bi, > > > > On a platform, the four max98357a amps will be controlled by only one > > codec device, as GPIO for SD_MODE is shared by all amps and is the > > only thing to be controlled. > > In this sense, I think we can treat max98357a DAI as if it supports > > four channels. > > I understand that this solution is not scalable, because one can > > control as many amps as they want. > > Theoretically, the number of supported channels by this codec device > > is unlimited. > > I found that rt1015.c has similar usage. > > Do you have a better suggestion to support this kind of use case ? > > Thanks! > > please don't top-post... Hi Pierre-Louis, I am sorry about that! > > > I don't think it's correct to declare 4-channel support at the > individual codec DAI level when in practice each device will be provided > with a TDM mask that selects two slots. On this platform there is no TDM support, so there were two I2S data lines. > > This is confusing device capabilities and TDM link configuration. I see that in most of the use cases of multiple amps, we should use codecs and num_codecs of the link. But in this case we only want one codec to control the only GPIO shared by 4 max98357a amps I think we should be able to use 1 max98357 codec and 3 dummy codec to fulfill this use case. Not sure if the number of dummy codec would really matter. With num_codec > 1 we should be able to bypass the channel checking and just use the channel from CPU DAI. Thanks for the suggestion. > > > On Tue, Jun 1, 2021 at 2:20 PM Tzung-Bi Shih wrote: > >> > >> On Wed, May 26, 2021 at 11:47 PM Judy Hsiao wrote: > >>> Sets channels_max to 4 to support QUAD channel. > >> > >> Could you point out probably the up-to-date MAX98357A datasheet for > >> 4-channel support? > >> > >> On a related note, from the public datasheet I could find[1], "Table > >> 5" only shows 2 channel's configuration. > >> > >> [1]: https://pdf1.alldatasheet.com/datasheet-pdf/view/623796/MAXIM/MAX98357A.html _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel