From patchwork Sun Aug 26 22:55:09 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matt Flax X-Patchwork-Id: 10579671 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E799F1805 for ; Wed, 29 Aug 2018 08:35:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D89732A60A for ; Wed, 29 Aug 2018 08:35:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CD2722A648; Wed, 29 Aug 2018 08:35:11 +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=-2.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, 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 5E7052AAA9 for ; Wed, 29 Aug 2018 08:35:10 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id E2EA0267668; Wed, 29 Aug 2018 09:56:28 +0200 (CEST) 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 3C899267849; Mon, 27 Aug 2018 00:55:32 +0200 (CEST) Received: from mx.flatmax.org (mx.flatmax.org [13.55.16.222]) by alsa0.perex.cz (Postfix) with ESMTP id 146DA2676C6 for ; Mon, 27 Aug 2018 00:55:28 +0200 (CEST) Received: from flatmax by mx.flatmax.org with local (Exim 4.89) (envelope-from ) id 1fu3wK-0003YR-5H; Mon, 27 Aug 2018 08:55:24 +1000 From: Matt Flax To: Mark Brown , alsa-devel@alsa-project.org, Brian Austin , Paul Handrigan , ckeepax@opensource.cirrus.com Date: Mon, 27 Aug 2018 08:55:09 +1000 Message-Id: <20180826225511.13619-1-flatmax@flatmax.com> X-Mailer: git-send-email 2.11.0 X-Mailman-Approved-At: Wed, 29 Aug 2018 09:56:26 +0200 Cc: Matt Flax Subject: [alsa-devel] [PATCH 1/3] ASoC: cs4265: SOC_SINGLE register value error fix 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: Matt Flax The cs4265 driver declares the "MMTLR Data Switch" register setting with a 0 register value rather then the 0x12 register (CS4265_SPDIF_CTL2). This incorrect value causes alsamixer to fault with the output : cannot load mixer controls: Input/output error This patch corrects the register value. alsamixer now runs. Signed-off-by: Matt Flax --- sound/soc/codecs/cs4265.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sound/soc/codecs/cs4265.c b/sound/soc/codecs/cs4265.c index 275677de..15b4ae04 100644 --- a/sound/soc/codecs/cs4265.c +++ b/sound/soc/codecs/cs4265.c @@ -157,8 +157,7 @@ static const struct snd_kcontrol_new cs4265_snd_controls[] = { SOC_SINGLE("Validity Bit Control Switch", CS4265_SPDIF_CTL2, 3, 1, 0), SOC_ENUM("SPDIF Mono/Stereo", spdif_mono_stereo_enum), - SOC_SINGLE("MMTLR Data Switch", 0, - 1, 1, 0), + SOC_SINGLE("MMTLR Data Switch", CS4265_SPDIF_CTL2, 0, 1, 0), SOC_ENUM("Mono Channel Select", spdif_mono_select_enum), SND_SOC_BYTES("C Data Buffer", CS4265_C_DATA_BUFF, 24), }; From patchwork Sun Aug 26 22:55:10 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matt Flax X-Patchwork-Id: 10579669 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id ADCDA175A for ; Wed, 29 Aug 2018 08:35:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9DE3A2A60A for ; Wed, 29 Aug 2018 08:35:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 91F0E2AAC6; Wed, 29 Aug 2018 08:35:11 +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=-2.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, 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 548E22A648 for ; Wed, 29 Aug 2018 08:35:10 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 3900E267741; Wed, 29 Aug 2018 09:56:34 +0200 (CEST) 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 3D99A26784A; Mon, 27 Aug 2018 00:55:34 +0200 (CEST) Received: from mx.flatmax.org (mx.flatmax.org [13.55.16.222]) by alsa0.perex.cz (Postfix) with ESMTP id 685F826777F for ; Mon, 27 Aug 2018 00:55:32 +0200 (CEST) Received: from flatmax by mx.flatmax.org with local (Exim 4.89) (envelope-from ) id 1fu3wR-0003YZ-8j; Mon, 27 Aug 2018 08:55:31 +1000 From: Matt Flax To: Mark Brown , alsa-devel@alsa-project.org, Brian Austin , Paul Handrigan , ckeepax@opensource.cirrus.com Date: Mon, 27 Aug 2018 08:55:10 +1000 Message-Id: <20180826225511.13619-2-flatmax@flatmax.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180826225511.13619-1-flatmax@flatmax.com> References: <20180826225511.13619-1-flatmax@flatmax.com> X-Mailman-Approved-At: Wed, 29 Aug 2018 09:56:26 +0200 Cc: Matt Flax Subject: [alsa-devel] [PATCH 2/3] ASoC: cs4265: Add native 32bit I2S transport 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: Matt Flax The cs4265 uses 32 bit transport on the I2S bus. This patch enables native 32 bit mode for machine drivers which use this sound card driver. Signed-off-by: Matt Flax --- sound/soc/codecs/cs4265.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sound/soc/codecs/cs4265.c b/sound/soc/codecs/cs4265.c index 15b4ae04..17d7e6f0 100644 --- a/sound/soc/codecs/cs4265.c +++ b/sound/soc/codecs/cs4265.c @@ -495,7 +495,8 @@ static int cs4265_set_bias_level(struct snd_soc_component *component, SNDRV_PCM_RATE_176400 | SNDRV_PCM_RATE_192000) #define CS4265_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_U16_LE | \ - SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_U24_LE) + SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_U24_LE | \ + SNDRV_PCM_FMTBIT_S32_LE | SNDRV_PCM_FMTBIT_U32_LE) static const struct snd_soc_dai_ops cs4265_ops = { .hw_params = cs4265_pcm_hw_params, From patchwork Sun Aug 26 22:55:11 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matt Flax X-Patchwork-Id: 10579673 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4889317DB for ; Wed, 29 Aug 2018 08:35:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3775C2A60A for ; Wed, 29 Aug 2018 08:35:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2C20B2AAB9; Wed, 29 Aug 2018 08:35:12 +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=-2.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, 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 5B1232AA04 for ; Wed, 29 Aug 2018 08:35:10 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id AEFE6267821; Wed, 29 Aug 2018 09:56:35 +0200 (CEST) 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 0678F26784E; Mon, 27 Aug 2018 00:55:36 +0200 (CEST) Received: from mx.flatmax.org (mx.flatmax.org [13.55.16.222]) by alsa0.perex.cz (Postfix) with ESMTP id 4B4F326784A for ; Mon, 27 Aug 2018 00:55:34 +0200 (CEST) Received: from flatmax by mx.flatmax.org with local (Exim 4.89) (envelope-from ) id 1fu3wT-0003Yh-1b; Mon, 27 Aug 2018 08:55:33 +1000 From: Matt Flax To: Mark Brown , alsa-devel@alsa-project.org, Brian Austin , Paul Handrigan , ckeepax@opensource.cirrus.com Date: Mon, 27 Aug 2018 08:55:11 +1000 Message-Id: <20180826225511.13619-3-flatmax@flatmax.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180826225511.13619-1-flatmax@flatmax.com> References: <20180826225511.13619-1-flatmax@flatmax.com> X-Mailman-Approved-At: Wed, 29 Aug 2018 09:56:26 +0200 Cc: Matt Flax Subject: [alsa-devel] [PATCH 3/3] ASoC: cs4265: Add a SPDIF enable actl 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: Matt Flax This patch adds a SPDIF enable/disable toggle switch to the sound controls. Signed-off-by: Matt Flax --- sound/soc/codecs/cs4265.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sound/soc/codecs/cs4265.c b/sound/soc/codecs/cs4265.c index 17d7e6f0..cdfcca9c 100644 --- a/sound/soc/codecs/cs4265.c +++ b/sound/soc/codecs/cs4265.c @@ -112,6 +112,13 @@ static const char * const cam_mono_stereo_text[] = { static SOC_ENUM_SINGLE_DECL(spdif_mono_stereo_enum, CS4265_SPDIF_CTL2, 2, cam_mono_stereo_text); +static const char * const spdif_enable_text[] = { + "Enabled", "Disabled" +}; + +static SOC_ENUM_SINGLE_DECL(spdif_enable_enum, CS4265_SPDIF_CTL2, 5, + spdif_enable_text); + static const char * const mono_select_text[] = { "Channel A", "Channel B" }; @@ -151,6 +158,7 @@ static const struct snd_kcontrol_new cs4265_snd_controls[] = { 1, 1), SOC_SINGLE("ADC Soft Ramp Switch", CS4265_ADC_CTL2, 7, 1, 0), + SOC_ENUM("SPDIF Enable", spdif_enable_enum), SOC_SINGLE("E to F Buffer Disable Switch", CS4265_SPDIF_CTL1, 6, 1, 0), SOC_ENUM("C Data Access", cam_mode_enum),