From: Jean-Francois Moine <moinejf@free.fr>
To: Jyri Sarha <jsarha@ti.com>
Cc: devicetree@vger.kernel.org, alsa-devel@alsa-project.org,
Russell King - ARM Linux <linux@arm.linux.org.uk>,
Andrew Jackson <Andrew.Jackson@arm.com>,
linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
Mark Brown <broonie@kernel.org>
Subject: Re: [PATCH v6 2/2] drm/i2c:tda998x: Use the HDMI audio CODEC
Date: Thu, 2 Oct 2014 20:37:10 +0200 [thread overview]
Message-ID: <20141002203710.03e035f1@armhf> (raw)
In-Reply-To: <542C0A2C.6010802@ti.com>
On Wed, 1 Oct 2014 17:05:32 +0300
Jyri Sarha <jsarha@ti.com> wrote:
> > case AFMT_I2S:
> > reg_write(priv, REG_MUX_AP, MUX_AP_SELECT_I2S);
> > clksel_aip = AIP_CLKSEL_AIP_I2S;
> > clksel_fs = AIP_CLKSEL_FS_ACLK;
> > - cts_n = CTS_N_M(3) | CTS_N_K(3);
> > +
> > + /* with I2S input, the CTS_N predivider depends on
> > + * the sample width */
> > + switch (priv->audio_sample_format) {
> > + case SNDRV_PCM_FORMAT_S16_LE:
> > + cts_n = CTS_N_M(3) | CTS_N_K(1);
> > + break;
> > + case SNDRV_PCM_FORMAT_S24_LE:
> > + cts_n = CTS_N_M(3) | CTS_N_K(2);
> > + break;
> > + default:
>
> Setting the default here does not really help, because
> priv->audio_sample_format is initialized to SNDRV_PCM_FORMAT_S24_LE in
> tda998x_encoder_set_config(). But I am Ok with the default being
> changed for 24 bit samples on i2s interface.
>
> > + case SNDRV_PCM_FORMAT_S32_LE:
> > + cts_n = CTS_N_M(3) | CTS_N_K(3);
> > + break;
> > + }
I looked again at the original driver and they set K = 1 for 16 bits
and K = 3 for 24 or 32 bits.
Anyway, letting K = 3 for 16 bits works for me, so, I will not change
this code in the next version.
Thanks.
--
Ken ar c'hentañ | ** Breizh ha Linux atav! **
Jef | http://moinejf.free.fr/
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
WARNING: multiple messages have this Message-ID (diff)
From: Jean-Francois Moine <moinejf@free.fr>
To: Jyri Sarha <jsarha@ti.com>
Cc: Mark Brown <broonie@kernel.org>,
Russell King - ARM Linux <linux@arm.linux.org.uk>,
Dave Airlie <airlied@gmail.com>,
Andrew Jackson <Andrew.Jackson@arm.com>,
<alsa-devel@alsa-project.org>, <devicetree@vger.kernel.org>,
<dri-devel@lists.freedesktop.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v6 2/2] drm/i2c:tda998x: Use the HDMI audio CODEC
Date: Thu, 2 Oct 2014 20:37:10 +0200 [thread overview]
Message-ID: <20141002203710.03e035f1@armhf> (raw)
In-Reply-To: <542C0A2C.6010802@ti.com>
On Wed, 1 Oct 2014 17:05:32 +0300
Jyri Sarha <jsarha@ti.com> wrote:
> > case AFMT_I2S:
> > reg_write(priv, REG_MUX_AP, MUX_AP_SELECT_I2S);
> > clksel_aip = AIP_CLKSEL_AIP_I2S;
> > clksel_fs = AIP_CLKSEL_FS_ACLK;
> > - cts_n = CTS_N_M(3) | CTS_N_K(3);
> > +
> > + /* with I2S input, the CTS_N predivider depends on
> > + * the sample width */
> > + switch (priv->audio_sample_format) {
> > + case SNDRV_PCM_FORMAT_S16_LE:
> > + cts_n = CTS_N_M(3) | CTS_N_K(1);
> > + break;
> > + case SNDRV_PCM_FORMAT_S24_LE:
> > + cts_n = CTS_N_M(3) | CTS_N_K(2);
> > + break;
> > + default:
>
> Setting the default here does not really help, because
> priv->audio_sample_format is initialized to SNDRV_PCM_FORMAT_S24_LE in
> tda998x_encoder_set_config(). But I am Ok with the default being
> changed for 24 bit samples on i2s interface.
>
> > + case SNDRV_PCM_FORMAT_S32_LE:
> > + cts_n = CTS_N_M(3) | CTS_N_K(3);
> > + break;
> > + }
I looked again at the original driver and they set K = 1 for 16 bits
and K = 3 for 24 or 32 bits.
Anyway, letting K = 3 for 16 bits works for me, so, I will not change
this code in the next version.
Thanks.
--
Ken ar c'hentañ | ** Breizh ha Linux atav! **
Jef | http://moinejf.free.fr/
next prev parent reply other threads:[~2014-10-02 18:37 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-24 8:23 [PATCH v6 0/2] ASoC: tda998x: add a codec to the HDMI transmitter Jean-Francois Moine
2014-09-24 8:23 ` Jean-Francois Moine
2014-09-24 7:49 ` [PATCH v6 1/2] ASoC:codecs: Add a transmitter interface to the HDMI CODEC CODEC Jean-Francois Moine
2014-09-24 7:49 ` Jean-Francois Moine
2014-09-29 7:26 ` Andrew Jackson
2014-09-29 7:26 ` Andrew Jackson
2014-10-01 14:04 ` Jyri Sarha
2014-10-01 14:04 ` Jyri Sarha
[not found] ` <542C09DC.3030404-l0cyMroinI0@public.gmane.org>
2014-10-01 16:45 ` Jean-Francois Moine
2014-10-01 16:45 ` Jean-Francois Moine
2014-09-24 8:11 ` [PATCH v6 2/2] drm/i2c:tda998x: Use the HDMI audio CODEC Jean-Francois Moine
2014-09-24 8:11 ` Jean-Francois Moine
[not found] ` <4b3d35a14461ed164956b7f5aa77b29170bc393d.1411547014.git.moinejf-GANU6spQydw@public.gmane.org>
2014-09-30 19:25 ` Mark Brown
2014-09-30 19:25 ` Mark Brown
2014-10-01 9:28 ` Jean-Francois Moine
2014-10-01 12:37 ` Mark Brown
2014-10-01 12:37 ` Mark Brown
2014-10-01 13:47 ` Russell King - ARM Linux
2014-10-01 13:47 ` Russell King - ARM Linux
2014-10-01 14:05 ` Jyri Sarha
2014-10-01 14:05 ` Jyri Sarha
2014-10-02 18:37 ` Jean-Francois Moine [this message]
2014-10-02 18:37 ` Jean-Francois Moine
2014-10-01 14:23 ` Russell King - ARM Linux
2014-10-01 14:23 ` Russell King - ARM Linux
2014-10-02 17:59 ` Jean-Francois Moine
2014-10-02 17:59 ` Jean-Francois Moine
2014-09-30 19:10 ` [PATCH v6 0/2] ASoC: tda998x: add a codec to the HDMI transmitter Mark Brown
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=20141002203710.03e035f1@armhf \
--to=moinejf@free.fr \
--cc=Andrew.Jackson@arm.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=jsarha@ti.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
/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 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.