linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: flatmax@flatmax.org (Matt Flax)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ASoC: bcm2835: Increase channels_max to 8
Date: Thu,  2 Feb 2017 10:37:44 +1100	[thread overview]
Message-ID: <1485992264-9058-1-git-send-email-flatmax@flatmax.org> (raw)

The AudioInjector Octo sound card operates with 8 channels,
however the bcm2835 I2S driver was limited to 2 channels.

This patch increases the channel capability to 8 by setting
channels_max to 8 in the bcm2835_i2s_dai structure. It also
adds the 8 channel condition to the channel guard in the
bcm2835_i2s_hw_params function.

Signed-off-by: Matt Flax <flatmax@flatmax.org>
---
 sound/soc/bcm/bcm2835-i2s.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/sound/soc/bcm/bcm2835-i2s.c b/sound/soc/bcm/bcm2835-i2s.c
index 6ba2049..c65ce28 100644
--- a/sound/soc/bcm/bcm2835-i2s.c
+++ b/sound/soc/bcm/bcm2835-i2s.c
@@ -312,6 +312,7 @@ static int bcm2835_i2s_hw_params(struct snd_pcm_substream *substream,
 
 	switch (params_channels(params)) {
 	case 2:
+	case 8:
 		format = BCM2835_I2S_CH1(format) | BCM2835_I2S_CH2(format);
 		format |= BCM2835_I2S_CH1(BCM2835_I2S_CHPOS(ch1pos));
 		format |= BCM2835_I2S_CH2(BCM2835_I2S_CHPOS(ch2pos));
@@ -577,7 +578,7 @@ static struct snd_soc_dai_driver bcm2835_i2s_dai = {
 	.probe	= bcm2835_i2s_dai_probe,
 	.playback = {
 		.channels_min = 2,
-		.channels_max = 2,
+		.channels_max = 8,
 		.rates =	SNDRV_PCM_RATE_8000_192000,
 		.formats =	SNDRV_PCM_FMTBIT_S16_LE
 				| SNDRV_PCM_FMTBIT_S24_LE
@@ -585,7 +586,7 @@ static struct snd_soc_dai_driver bcm2835_i2s_dai = {
 		},
 	.capture = {
 		.channels_min = 2,
-		.channels_max = 2,
+		.channels_max = 8,
 		.rates =	SNDRV_PCM_RATE_8000_192000,
 		.formats =	SNDRV_PCM_FMTBIT_S16_LE
 				| SNDRV_PCM_FMTBIT_S24_LE
-- 
2.7.4

             reply	other threads:[~2017-02-01 23:37 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-01 23:37 Matt Flax [this message]
2017-02-04 15:49 ` [PATCH] ASoC: bcm2835: Increase channels_max to 8 Mark Brown
2017-02-05  1:26   ` [alsa-devel] " Matt Flax
2017-02-05 10:20     ` Florian Kauer
2017-02-05 10:55       ` Matt Flax
2017-02-05 16:34     ` Mark Brown
2017-02-05 20:37       ` Matt Flax
2017-02-05 22:49         ` Matt Flax
2017-02-06 16:43         ` Mark Brown
2017-02-06 20:25           ` Matt Flax

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1485992264-9058-1-git-send-email-flatmax@flatmax.org \
    --to=flatmax@flatmax.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).