From patchwork Thu Mar 31 13:35:59 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jyri Sarha X-Patchwork-Id: 8713061 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 5E4DCC0555 for ; Thu, 31 Mar 2016 13:37:15 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8431520270 for ; Thu, 31 Mar 2016 13:37:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9DB7020272 for ; Thu, 31 Mar 2016 13:37:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756913AbcCaNhK (ORCPT ); Thu, 31 Mar 2016 09:37:10 -0400 Received: from devils.ext.ti.com ([198.47.26.153]:60036 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756882AbcCaNhH (ORCPT ); Thu, 31 Mar 2016 09:37:07 -0400 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id u2VDaMuQ028703; Thu, 31 Mar 2016 08:36:22 -0500 Received: from DFLE73.ent.ti.com (dfle73.ent.ti.com [128.247.5.110]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id u2VDaMfl029010; Thu, 31 Mar 2016 08:36:22 -0500 Received: from dlep32.itg.ti.com (157.170.170.100) by DFLE73.ent.ti.com (128.247.5.110) with Microsoft SMTP Server id 14.3.224.2; Thu, 31 Mar 2016 08:36:22 -0500 Received: from imryr.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id u2VDaC5M031394; Thu, 31 Mar 2016 08:36:19 -0500 From: Jyri Sarha To: , , , , , CC: , , , , , , , , , Jyri Sarha Subject: [PATCH v9 2/7] ALSA: pcm: Allow 32 bit sample format in IEC958 channel status helper Date: Thu, 31 Mar 2016 16:35:59 +0300 Message-ID: <44ee7ac5c0ddb4d25ac1bd4f189d328f8205e4a0.1459431292.git.jsarha@ti.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: References: MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Spam-Status: No, score=-7.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Treat 32 bit sample width as if it was 24 bits when generating IEC958 channel status bits. On some platforms 24 sample width is problematic and to get full 24 bit precision a 32 bit format, using only the 24 most significant bits, may have to be used. Signed-off-by: Jyri Sarha Reviewed-by: Takashi Iwai --- sound/core/pcm_iec958.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sound/core/pcm_iec958.c b/sound/core/pcm_iec958.c index e016871..5e6aed6 100644 --- a/sound/core/pcm_iec958.c +++ b/sound/core/pcm_iec958.c @@ -59,6 +59,7 @@ static int create_iec958_consumer(uint rate, uint sample_width, IEC958_AES4_CON_MAX_WORDLEN_24; break; case 24: + case 32: /* Assume 24-bit width for 32-bit samples. */ ws = IEC958_AES4_CON_WORDLEN_24_20 | IEC958_AES4_CON_MAX_WORDLEN_24; break;