From patchwork Tue Dec 27 14:00:54 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jose Abreu X-Patchwork-Id: 9489275 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 5B9A860838 for ; Tue, 27 Dec 2016 14:04:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 431FA2621E for ; Tue, 27 Dec 2016 14:04:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3777D26223; Tue, 27 Dec 2016 14:04:23 +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.9 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE autolearn=ham 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 7F8892621E for ; Tue, 27 Dec 2016 14:04:22 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 01C43266AD9; Tue, 27 Dec 2016 15:04:20 +0100 (CET) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 29E74265DB7; Tue, 27 Dec 2016 15:01:59 +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 BB5F5266AD9; Tue, 27 Dec 2016 15:01:42 +0100 (CET) Received: from smtprelay.synopsys.com (smtprelay4.synopsys.com [198.182.47.9]) by alsa0.perex.cz (Postfix) with ESMTP id E66022666D3 for ; Tue, 27 Dec 2016 15:01:37 +0100 (CET) Received: from mailhost.synopsys.com (mailhost1.synopsys.com [10.12.238.239]) by smtprelay.synopsys.com (Postfix) with ESMTP id A87FB24E0177; Tue, 27 Dec 2016 06:01:35 -0800 (PST) Received: from mailhost.synopsys.com (localhost [127.0.0.1]) by mailhost.synopsys.com (Postfix) with ESMTP id 0E1A3B11; Tue, 27 Dec 2016 06:01:35 -0800 (PST) Received: from joabreu-VirtualBox.internal.synopsys.com (joabreu-e7440.internal.synopsys.com [10.107.19.42]) by mailhost.synopsys.com (Postfix) with ESMTP id 1EDBCB08; Tue, 27 Dec 2016 06:01:32 -0800 (PST) From: Jose Abreu To: alsa-devel@alsa-project.org Date: Tue, 27 Dec 2016 14:00:54 +0000 Message-Id: <4208c77798e92cfeb7305add296b6eb414c96f27.1482846853.git.joabreu@synopsys.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: References: In-Reply-To: References: Cc: Jose Abreu , Liam Girdwood , linux-kernel@vger.kernel.org, Takashi Iwai , Mark Brown , Carlos Palminha Subject: [alsa-devel] [PATCH 2/2] ASoC: dwc: Enable 24 bit sample size in PIO mode 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 Sample size of 24 bits use in reality 32 bits for storage. We can safelly enable this sample size and treat the data as 32 bits. Tested in a x86_64 platform and in ARC AXS101 SDP platform. Signed-off-by: Jose Abreu Cc: Carlos Palminha Cc: Liam Girdwood Cc: Mark Brown Cc: Jaroslav Kysela Cc: Takashi Iwai Cc: alsa-devel@alsa-project.org Cc: linux-kernel@vger.kernel.org --- sound/soc/dwc/designware_pcm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sound/soc/dwc/designware_pcm.c b/sound/soc/dwc/designware_pcm.c index b063c86..459ec86 100644 --- a/sound/soc/dwc/designware_pcm.c +++ b/sound/soc/dwc/designware_pcm.c @@ -80,6 +80,7 @@ .rate_min = 32000, .rate_max = 48000, .formats = SNDRV_PCM_FMTBIT_S16_LE | + SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S32_LE, .channels_min = 2, .channels_max = 2, @@ -175,6 +176,7 @@ static int dw_pcm_hw_params(struct snd_pcm_substream *substream, dev->tx_fn = dw_pcm_tx_16; dev->rx_fn = dw_pcm_rx_16; break; + case SNDRV_PCM_FORMAT_S24_LE: case SNDRV_PCM_FORMAT_S32_LE: dev->tx_fn = dw_pcm_tx_32; dev->rx_fn = dw_pcm_rx_32;