mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Arnaud Pouliquen <arnaud.pouliquen@st.com>
To: <srinivas.kandagatla@linaro.org>, Jyri Sarha <jsarha@ti.com>,
	Mark Brown <broonie@kernel.org>, <alsa-devel@alsa-project.org>
Cc: Archit Taneja <architt@codeaurora.org>,
	David Airlie <airlied@linux.ie>, <linux-kernel@vger.kernel.org>,
	Liam Girdwood <lgirdwood@gmail.com>,
	<dri-devel@lists.freedesktop.org>, Takashi Iwai <tiwai@suse.com>,
	Andrzej Hajda <a.hajda@samsung.com>
Subject: Re: [alsa-devel] [PATCH v2 2/2] drm/bridge: adv7511: restrict audio sample sizes
Date: Tue, 1 Aug 2017 10:42:57 +0200	[thread overview]
Message-ID: <7d700845-da72-5c40-31f9-c3faa7ca93a2@st.com> (raw)
In-Reply-To: <20170731224944.9986-3-srinivas.kandagatla@linaro.org>

Hello Srinivas,

On 08/01/2017 12:49 AM, srinivas.kandagatla@linaro.org wrote:
> From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> 
> ADV7533 only supports audio samples word width from 16-24 bits.
> This patch restricts the audio sample sizes to the supported ones,
> so that sound card does not report wrong list of supported hwparms.
> 
> Without this patch aplay would fail when playing a 32 bit audio.
> 
> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> ---
>  drivers/gpu/drm/bridge/adv7511/adv7511_audio.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/gpu/drm/bridge/adv7511/adv7511_audio.c b/drivers/gpu/drm/bridge/adv7511/adv7511_audio.c
> index 67469c26bae8..d01d0aa0eef7 100644
> --- a/drivers/gpu/drm/bridge/adv7511/adv7511_audio.c
> +++ b/drivers/gpu/drm/bridge/adv7511/adv7511_audio.c
> @@ -214,6 +214,8 @@ static struct hdmi_codec_pdata codec_data = {
>  	.ops = &adv7511_codec_ops,
>  	.max_i2s_channels = 2,
>  	.i2s = 1,
> +	.formats = (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S16_BE |
> +		    SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S24_BE),
>  };

I'm not sure that this limitation is needed.
I already used ADV7513 and i did not observe this limitation.

I had a look to ADV7533 data-sheet. it should support 32 and 64 bits I2S
format bus, with 16 or 24 bits precision sample. So it should support
SNDRV_PCM_FMTBIT_S32_LE and SNDRV_PCM_FMTBIT_S32_BE

As example, if you configure bus in Left justified format with 24 bits
sample length, 32 bits application samples should be truncated to 24
bits samples at ADV7533 I2S interface level (LSB dropped).

Perhaps i missed something... but look like more an I2S bus
configuration issue in your DT card description, that that a miss in the
drivers.

Regards
Arnaud
>  
>  int adv7511_audio_init(struct device *dev, struct adv7511 *adv7511)
> 

  reply	other threads:[~2017-08-01  8:43 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-31 22:49 [PATCH v2 0/2] ASoC: hdmi-codec: Allow driver to restrict sample size srinivas.kandagatla
2017-07-31 22:49 ` [PATCH v2 1/2] ASoC: hdmi-codec: Allow drivers to restrict sample sizes srinivas.kandagatla
2017-07-31 22:49 ` [PATCH v2 2/2] drm/bridge: adv7511: restrict audio " srinivas.kandagatla
2017-08-01  8:42   ` Arnaud Pouliquen [this message]
2017-08-01 12:24     ` [alsa-devel] " Srinivas Kandagatla
2017-08-01 12:28       ` Mark Brown
2017-08-01 12:52         ` Srinivas Kandagatla
2017-08-01 13:15           ` Mark Brown
2017-08-01 15:50           ` Arnaud Pouliquen

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=7d700845-da72-5c40-31f9-c3faa7ca93a2@st.com \
    --to=arnaud.pouliquen@st.com \
    --cc=a.hajda@samsung.com \
    --cc=airlied@linux.ie \
    --cc=alsa-devel@alsa-project.org \
    --cc=architt@codeaurora.org \
    --cc=broonie@kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jsarha@ti.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=srinivas.kandagatla@linaro.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: 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

all inboxes | Powered by JetHome®