From: kernel@martin.sperl.org To: Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>, Stephen Warren <swarren@wwwdotorg.org>, Lee Jones <lee@kernel.org>, Eric Anholt <eric@anholt.net>, alsa-devel@alsa-project.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, Matthias Reichl <hias@horus.com>, Florian Meier <florian.meier@koalo.de> Cc: Martin Sperl <kernel@martin.sperl.org> Subject: [PATCH 1/3] ASoC: bcm2835: add 24bit support Date: Mon, 25 Apr 2016 13:39:38 +0000 [thread overview] Message-ID: <1461591580-7565-1-git-send-email-kernel@martin.sperl.org> (raw) From: Matthias Reichl <hias@horus.com> This adds 24 bit support to the I2S driver of the BCM2835 Code ported from bcm2708-i2s driver in Raspberry Pi tree. Signed-off-by: Florian Meier <florian.meier@koalo.de> Signed-off-by: Matthias Reichl <hias@horus.com> Signed-off-by: Martin Sperl <kernel@martin.sperl.org> --- sound/soc/bcm/bcm2835-i2s.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sound/soc/bcm/bcm2835-i2s.c b/sound/soc/bcm/bcm2835-i2s.c index 1c1f221..d2663e7 100644 --- a/sound/soc/bcm/bcm2835-i2s.c +++ b/sound/soc/bcm/bcm2835-i2s.c @@ -259,6 +259,9 @@ static int bcm2835_i2s_hw_params(struct snd_pcm_substream *substream, case SNDRV_PCM_FORMAT_S16_LE: data_length = 16; break; + case SNDRV_PCM_FORMAT_S24_LE: + data_length = 24; + break; case SNDRV_PCM_FORMAT_S32_LE: data_length = 32; break; @@ -279,7 +282,7 @@ static int bcm2835_i2s_hw_params(struct snd_pcm_substream *substream, /* Setup the frame format */ format = BCM2835_I2S_CHEN; - if (data_length > 24) + if (data_length >= 24) format |= BCM2835_I2S_CHWEX; format |= BCM2835_I2S_CHWID((data_length-8)&0xf); @@ -570,6 +573,7 @@ static struct snd_soc_dai_driver bcm2835_i2s_dai = { .channels_max = 2, .rates = SNDRV_PCM_RATE_8000_192000, .formats = SNDRV_PCM_FMTBIT_S16_LE + | SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S32_LE }, .capture = { @@ -577,6 +581,7 @@ static struct snd_soc_dai_driver bcm2835_i2s_dai = { .channels_max = 2, .rates = SNDRV_PCM_RATE_8000_192000, .formats = SNDRV_PCM_FMTBIT_S16_LE + | SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S32_LE }, .ops = &bcm2835_i2s_dai_ops, -- 2.1.4
WARNING: multiple messages have this Message-ID (diff)
From: kernel@martin.sperl.org (kernel at martin.sperl.org) To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 1/3] ASoC: bcm2835: add 24bit support Date: Mon, 25 Apr 2016 13:39:38 +0000 [thread overview] Message-ID: <1461591580-7565-1-git-send-email-kernel@martin.sperl.org> (raw) From: Matthias Reichl <hias@horus.com> This adds 24 bit support to the I2S driver of the BCM2835 Code ported from bcm2708-i2s driver in Raspberry Pi tree. Signed-off-by: Florian Meier <florian.meier@koalo.de> Signed-off-by: Matthias Reichl <hias@horus.com> Signed-off-by: Martin Sperl <kernel@martin.sperl.org> --- sound/soc/bcm/bcm2835-i2s.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sound/soc/bcm/bcm2835-i2s.c b/sound/soc/bcm/bcm2835-i2s.c index 1c1f221..d2663e7 100644 --- a/sound/soc/bcm/bcm2835-i2s.c +++ b/sound/soc/bcm/bcm2835-i2s.c @@ -259,6 +259,9 @@ static int bcm2835_i2s_hw_params(struct snd_pcm_substream *substream, case SNDRV_PCM_FORMAT_S16_LE: data_length = 16; break; + case SNDRV_PCM_FORMAT_S24_LE: + data_length = 24; + break; case SNDRV_PCM_FORMAT_S32_LE: data_length = 32; break; @@ -279,7 +282,7 @@ static int bcm2835_i2s_hw_params(struct snd_pcm_substream *substream, /* Setup the frame format */ format = BCM2835_I2S_CHEN; - if (data_length > 24) + if (data_length >= 24) format |= BCM2835_I2S_CHWEX; format |= BCM2835_I2S_CHWID((data_length-8)&0xf); @@ -570,6 +573,7 @@ static struct snd_soc_dai_driver bcm2835_i2s_dai = { .channels_max = 2, .rates = SNDRV_PCM_RATE_8000_192000, .formats = SNDRV_PCM_FMTBIT_S16_LE + | SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S32_LE }, .capture = { @@ -577,6 +581,7 @@ static struct snd_soc_dai_driver bcm2835_i2s_dai = { .channels_max = 2, .rates = SNDRV_PCM_RATE_8000_192000, .formats = SNDRV_PCM_FMTBIT_S16_LE + | SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S32_LE }, .ops = &bcm2835_i2s_dai_ops, -- 2.1.4
next reply other threads:[~2016-04-25 13:39 UTC|newest] Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top 2016-04-25 13:39 kernel [this message] 2016-04-25 13:39 ` [PATCH 1/3] ASoC: bcm2835: add 24bit support kernel at martin.sperl.org 2016-04-25 13:39 ` [PATCH 2/3] ASoC: bcm2835: setup clock only if CPU is clock master kernel 2016-04-25 13:39 ` kernel at martin.sperl.org 2016-04-25 13:39 ` [PATCH 3/3] ASoC: bcm2835: Register also as PCM device kernel 2016-04-25 13:39 ` kernel at martin.sperl.org 2016-04-25 13:54 ` Lars-Peter Clausen 2016-04-25 13:54 ` Lars-Peter Clausen 2016-04-25 17:15 ` Matthias Reichl 2016-04-25 17:15 ` Matthias Reichl 2016-04-26 8:47 ` Lars-Peter Clausen 2016-04-26 8:47 ` [alsa-devel] " Lars-Peter Clausen 2016-04-26 13:09 ` Matthias Reichl 2016-04-26 13:09 ` [alsa-devel] " Matthias Reichl 2016-04-26 13:22 ` Lars-Peter Clausen 2016-04-26 13:22 ` [alsa-devel] " Lars-Peter Clausen 2016-04-26 15:18 ` Matthias Reichl 2016-04-26 15:18 ` [alsa-devel] " Matthias Reichl 2016-04-26 15:30 ` Lars-Peter Clausen 2016-04-26 15:30 ` [alsa-devel] " Lars-Peter Clausen 2016-04-26 18:05 ` Matthias Reichl 2016-04-26 18:05 ` [alsa-devel] " Matthias Reichl 2016-04-26 19:09 ` Lars-Peter Clausen 2016-04-26 19:09 ` [alsa-devel] " Lars-Peter Clausen
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=1461591580-7565-1-git-send-email-kernel@martin.sperl.org \ --to=kernel@martin.sperl.org \ --cc=alsa-devel@alsa-project.org \ --cc=broonie@kernel.org \ --cc=eric@anholt.net \ --cc=florian.meier@koalo.de \ --cc=hias@horus.com \ --cc=lee@kernel.org \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-rpi-kernel@lists.infradead.org \ --cc=perex@perex.cz \ --cc=swarren@wwwdotorg.org \ --cc=tiwai@suse.com \ /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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.