From patchwork Mon Dec 23 15:47:11 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Angus Ainslie X-Patchwork-Id: 11308497 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B73A2138C for ; Mon, 23 Dec 2019 15:50:36 +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 4CBC82075B for ; Mon, 23 Dec 2019 15:50:36 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="mo9MEc7q"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=akkea.ca header.i=@akkea.ca header.b="OQheLzYK"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=akkea.ca header.i=@akkea.ca header.b="OQheLzYK" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4CBC82075B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=akkea.ca 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 8BDB2169D; Mon, 23 Dec 2019 16:49:44 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 8BDB2169D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1577116234; bh=pm8DZcpgZSs/ExLqOjuQyr03ocrsB1qStefH3DZJSjM=; h=From:To:Date:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=mo9MEc7q1hmab0i33Woa7Ndu0R3TB5yKmuReVJhCe8V7KmZZO9NiWcg6f+VYm2EQL /MEJCvnEuRD8AYNWMo4vJ9vG+rVsP7d4ckfpjbkjVR2E2FZCClnTQ5WiYEkReSVheD /abEf4xWax0t4Y3UHaVzeWjAPEu/HVuihEjLbL7Q= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 328E7F8026A; Mon, 23 Dec 2019 16:48:06 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id AB7D7F8012F; Mon, 23 Dec 2019 16:48:01 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,SPF_HELO_NONE,SPF_PASS,SURBL_BLOCKED,URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from node.akkea.ca (node.akkea.ca [192.155.83.177]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 46A68F80130 for ; Mon, 23 Dec 2019 16:47:56 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 46A68F80130 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=akkea.ca header.i=@akkea.ca header.b="OQheLzYK"; dkim=pass (1024-bit key) header.d=akkea.ca header.i=@akkea.ca header.b="OQheLzYK" Received: from localhost (localhost [127.0.0.1]) by node.akkea.ca (Postfix) with ESMTP id A26024E201A; Mon, 23 Dec 2019 15:47:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=akkea.ca; s=mail; t=1577116074; bh=WqmvSpCpKdfEKGMrhNPJ7uiAMSHmxyw8X3Se1/YVDR4=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=OQheLzYKE9s1TnbenSYyXx03UE/6UOn2CCyMI4T/mbVfdzkd4u2rjMOV+MKqt5yim AtPEgyto7OeFqdkjr3306FXxQM4C1MA5bYZqjerTPr6qBo08H+Gm2IQrObiBWt8Q3k TMec4N1J32ByymT/QeeBi/Enptz8ZX+61ABIr32E= X-Virus-Scanned: Debian amavisd-new at mail.akkea.ca Received: from node.akkea.ca ([127.0.0.1]) by localhost (mail.akkea.ca [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id W_oXF-J36k12; Mon, 23 Dec 2019 15:47:54 +0000 (UTC) Received: from midas.localdomain (S0106788a2041785e.gv.shawcable.net [70.66.86.75]) by node.akkea.ca (Postfix) with ESMTPSA id 1AD9E4E2006; Mon, 23 Dec 2019 15:47:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=akkea.ca; s=mail; t=1577116074; bh=WqmvSpCpKdfEKGMrhNPJ7uiAMSHmxyw8X3Se1/YVDR4=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=OQheLzYKE9s1TnbenSYyXx03UE/6UOn2CCyMI4T/mbVfdzkd4u2rjMOV+MKqt5yim AtPEgyto7OeFqdkjr3306FXxQM4C1MA5bYZqjerTPr6qBo08H+Gm2IQrObiBWt8Q3k TMec4N1J32ByymT/QeeBi/Enptz8ZX+61ABIr32E= From: "Angus Ainslie (Purism)" To: broonie@kernel.org Date: Mon, 23 Dec 2019 07:47:11 -0800 Message-Id: <20191223154712.18581-2-angus@akkea.ca> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191223154712.18581-1-angus@akkea.ca> References: <20191223154712.18581-1-angus@akkea.ca> Cc: robh@kernel.org, alsa-devel@alsa-project.org, kernel@puri.sm, "Angus Ainslie \(Purism\)" , Liam Girdwood , linux-kernel@vger.kernel.org Subject: [alsa-devel] [PATCH v4 1/2] ASoC: gtm601: add Broadmobi bm818 sound profile 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: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" The Broadmobi bm818 uses stereo sound at 48Khz sample rate Signed-off-by: Angus Ainslie (Purism) --- sound/soc/codecs/gtm601.c | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/sound/soc/codecs/gtm601.c b/sound/soc/codecs/gtm601.c index d454294c8d06..7f05ebcb88d1 100644 --- a/sound/soc/codecs/gtm601.c +++ b/sound/soc/codecs/gtm601.c @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include #include #include @@ -47,6 +47,24 @@ static struct snd_soc_dai_driver gtm601_dai = { }, }; +static struct snd_soc_dai_driver bm818_dai = { + .name = "bm818", + .playback = { + .stream_name = "Playback", + .channels_min = 2, + .channels_max = 2, + .rates = SNDRV_PCM_RATE_48000, + .formats = SNDRV_PCM_FMTBIT_S16_LE, + }, + .capture = { + .stream_name = "Capture", + .channels_min = 2, + .channels_max = 2, + .rates = SNDRV_PCM_RATE_48000, + .formats = SNDRV_PCM_FMTBIT_S16_LE, + }, +}; + static const struct snd_soc_component_driver soc_component_dev_gtm601 = { .dapm_widgets = gtm601_dapm_widgets, .num_dapm_widgets = ARRAY_SIZE(gtm601_dapm_widgets), @@ -60,13 +78,19 @@ static const struct snd_soc_component_driver soc_component_dev_gtm601 = { static int gtm601_platform_probe(struct platform_device *pdev) { + const struct snd_soc_dai_driver *dai_driver; + + dai_driver = of_device_get_match_data(&pdev->dev); + return devm_snd_soc_register_component(&pdev->dev, - &soc_component_dev_gtm601, >m601_dai, 1); + &soc_component_dev_gtm601, + (struct snd_soc_dai_driver *)dai_driver, 1); } #if defined(CONFIG_OF) static const struct of_device_id gtm601_codec_of_match[] = { - { .compatible = "option,gtm601", }, + { .compatible = "option,gtm601", .data = (void *)>m601_dai }, + { .compatible = "broadmobi,bm818", .data = (void *)&bm818_dai }, {}, }; MODULE_DEVICE_TABLE(of, gtm601_codec_of_match); From patchwork Mon Dec 23 15:47:12 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Angus Ainslie X-Patchwork-Id: 11308493 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4078E13A4 for ; Mon, 23 Dec 2019 15:48:56 +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 61A2720715 for ; Mon, 23 Dec 2019 15:48:55 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="chbOEN7P"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=akkea.ca header.i=@akkea.ca header.b="hRnL2nMM"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=akkea.ca header.i=@akkea.ca header.b="WQTq/9PA" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 61A2720715 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=akkea.ca 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 4C810167F; Mon, 23 Dec 2019 16:48:03 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 4C810167F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1577116133; bh=1POjPEtEflTMyjkwffusj3P5dmZtSMh1nqAFHluxFKA=; h=From:To:Date:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=chbOEN7PwjshbNQvlhjSTVDJvNJcm6qkgx2qb8MIcFx57NW0iQZvN07kWbu1moR9r 1ipAVlo/k1Gm9wt57v/Mr36h9Q1NXakOV1MOCpZZjbDhxsD0DCHAvsyI2iG32souWu WH+m1zEVzJg7IU9EeMGydkiqyfQNGkGyBP6sm8hI= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id C4238F8012F; Mon, 23 Dec 2019 16:48:02 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id 87D65F80132; Mon, 23 Dec 2019 16:48:00 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on alsa1.perex.cz X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,SPF_HELO_NONE,SPF_PASS autolearn=disabled version=3.4.0 Received: from node.akkea.ca (node.akkea.ca [192.155.83.177]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 357FDF8012F for ; Mon, 23 Dec 2019 16:47:56 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 357FDF8012F Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=akkea.ca header.i=@akkea.ca header.b="hRnL2nMM"; dkim=pass (1024-bit key) header.d=akkea.ca header.i=@akkea.ca header.b="WQTq/9PA" Received: from localhost (localhost [127.0.0.1]) by node.akkea.ca (Postfix) with ESMTP id 19B934E2010; Mon, 23 Dec 2019 15:47:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=akkea.ca; s=mail; t=1577116075; bh=l91r0YDEN+oe9jxf3D6wJpDm6U1PN8Ku0lGaSjCm2s8=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=hRnL2nMMVwL+nce9WFkgKmJXsZ4RcKCTA2Ygm2lc9ItXuygoCZMCb17IgSEHtOc1D hXjGtIugvpDo421/z2dVb2RftAQAXd3/MjwFNd9KZclSlthNp90oMvORCKl1n9TqxZ IjmP3IiPrXrQCR4wETvFw2ucM3Sesc6igWr13vAs= X-Virus-Scanned: Debian amavisd-new at mail.akkea.ca Received: from node.akkea.ca ([127.0.0.1]) by localhost (mail.akkea.ca [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id NxrCUansM3_G; Mon, 23 Dec 2019 15:47:54 +0000 (UTC) Received: from midas.localdomain (S0106788a2041785e.gv.shawcable.net [70.66.86.75]) by node.akkea.ca (Postfix) with ESMTPSA id 80F804E2003; Mon, 23 Dec 2019 15:47:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=akkea.ca; s=mail; t=1577116074; bh=l91r0YDEN+oe9jxf3D6wJpDm6U1PN8Ku0lGaSjCm2s8=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=WQTq/9PAYT8c5stV9E7wa1+BFWRJMaMeLSGEK21UeOUtftJ/iyb8IrAFeQD6pMVk6 Mv+jLvnkJxo+DLiYllp1zDhtDbyXl8jFZS640nSHKiVRkFWlq5UvoRFHJ1R8HPFa0t gOPMI0DIAtc6JlHlqHUFkYt41wzdzj5XogMqpB9M= From: "Angus Ainslie (Purism)" To: broonie@kernel.org Date: Mon, 23 Dec 2019 07:47:12 -0800 Message-Id: <20191223154712.18581-3-angus@akkea.ca> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191223154712.18581-1-angus@akkea.ca> References: <20191223154712.18581-1-angus@akkea.ca> Cc: robh@kernel.org, alsa-devel@alsa-project.org, kernel@puri.sm, "Angus Ainslie \(Purism\)" , Liam Girdwood , linux-kernel@vger.kernel.org Subject: [alsa-devel] [PATCH v4 2/2] dt-bindings: sound: gtm601: add the broadmobi interface 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: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" The Broadmobi BM818 uses a different sample rate and channels from the option modem. Signed-off-by: Angus Ainslie (Purism) Reviewed-by: Rob Herring --- Documentation/devicetree/bindings/sound/gtm601.txt | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/sound/gtm601.txt b/Documentation/devicetree/bindings/sound/gtm601.txt index 5efc8c068de0..efa32a486c4a 100644 --- a/Documentation/devicetree/bindings/sound/gtm601.txt +++ b/Documentation/devicetree/bindings/sound/gtm601.txt @@ -1,10 +1,16 @@ GTM601 UMTS modem audio interface CODEC -This device has no configuration interface. Sample rate is fixed - 8kHz. +This device has no configuration interface. The sample rate and channels are +based on the compatible string + "option,gtm601" = 8kHz mono + "broadmobi,bm818" = 48KHz stereo Required properties: - - compatible : "option,gtm601" + - compatible : one of + "option,gtm601" + "broadmobi,bm818" + Example: