From patchwork Wed Nov 26 05:08:58 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Barry Song <21cnbao@gmail.com> X-Patchwork-Id: 5384111 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id CD577C11AC for ; Wed, 26 Nov 2014 05:11:45 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 15C88201C7 for ; Wed, 26 Nov 2014 05:11:45 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id D573E2014A for ; Wed, 26 Nov 2014 05:11:43 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 160192654EA; Wed, 26 Nov 2014 06:11:42 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, NO_DNS_FOR_FROM, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=no version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id DFBEA261B31; Wed, 26 Nov 2014 06:11:31 +0100 (CET) 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 C4C7C265130; Wed, 26 Nov 2014 06:11:30 +0100 (CET) Received: from mail-pa0-f52.google.com (mail-pa0-f52.google.com [209.85.220.52]) by alsa0.perex.cz (Postfix) with ESMTP id AA4A3261A40 for ; Wed, 26 Nov 2014 06:11:22 +0100 (CET) Received: by mail-pa0-f52.google.com with SMTP id eu11so2076530pac.25 for ; Tue, 25 Nov 2014 21:11:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=i/T4GaNP1c/rwvQgN9EyTefd+3nKiLWbpecIg4cRMU4=; b=E55ShE6IraQiK13YMPDIN22ej0kqSy0m8FchOqDXBPfUcMjZJl495H9ZXuuDqs+XkD vnu2ItvP9GwEcbeTUxsun6YcaWGuVIeoDM8tvv8Lrv1uWV3eMgM/1uyAZr/HJizOj+oA dtDrcDos0njUHI+QDmrcAATSniitzz5l2udUaSzsBzcFmYUqkN2Ta6Z5AGrGE4tIc87h 5CyyJxKOGrswmAGGVtPVz7PZKRcs+NhlZ5qYMS9BmbZk6nYLb3iA0tvH/fo6iWPsznL6 Xo039sSbMHjaWIX9OfRYSaS+rKSFocYFtXf/RQNis9Oyzmmk+VSkDpX1GnDn2tYjNZ1Y 5S7w== X-Received: by 10.70.48.166 with SMTP id m6mr51186076pdn.22.1416978680745; Tue, 25 Nov 2014 21:11:20 -0800 (PST) Received: from localhost.localdomain ([183.194.142.205]) by mx.google.com with ESMTPSA id xd3sm2990196pbc.54.2014.11.25.21.11.18 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 25 Nov 2014 21:11:20 -0800 (PST) From: Barry Song <21cnbao@gmail.com> To: broonie@kernel.org, lgirdwood@gmail.com, alsa-devel@alsa-project.org Date: Wed, 26 Nov 2014 13:08:58 +0800 Message-Id: <1416978538-3318-1-git-send-email-21cnbao@gmail.com> X-Mailer: git-send-email 1.7.9.5 Cc: Yibo Cai , workgroup.linux@csr.com, Barry Song Subject: [alsa-devel] [PATCH v2] ASoC: bt-sco: support wide band speech 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: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP From: Yibo Cai HFP1.6 requires support for wide band speech(16KHz) over Bluetooth. Signed-off-by: Yibo Cai Signed-off-by: Barry Song --- sound/soc/codecs/bt-sco.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/sound/soc/codecs/bt-sco.c b/sound/soc/codecs/bt-sco.c index c4cf069..3878491 100644 --- a/sound/soc/codecs/bt-sco.c +++ b/sound/soc/codecs/bt-sco.c @@ -52,6 +52,14 @@ static struct snd_soc_codec_driver soc_codec_dev_bt_sco = { static int bt_sco_probe(struct platform_device *pdev) { + const struct platform_device_id *id = platform_get_device_id(pdev); + + /* Check wide band SCO(16KHz) support */ + if (id && (strcmp(id->name, "bt-sco-wb") == 0)) { + bt_sco_dai.playback.rates |= SNDRV_PCM_RATE_16000; + bt_sco_dai.capture.rates |= SNDRV_PCM_RATE_16000; + } + return snd_soc_register_codec(&pdev->dev, &soc_codec_dev_bt_sco, &bt_sco_dai, 1); } @@ -70,6 +78,9 @@ static struct platform_device_id bt_sco_driver_ids[] = { { .name = "bt-sco", }, + { + .name = "bt-sco-wb", + }, {}, }; MODULE_DEVICE_TABLE(platform, bt_sco_driver_ids);