alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Jyri Sarha <jsarha@ti.com>
To: Anssi Hannula <anssi.hannula@iki.fi>
Cc: devicetree@vger.kernel.org, alsa-devel@alsa-project.org,
	dri-devel@lists.freedesktop.org, "Ujfalusi,
	Peter" <peter.ujfalusi@ti.com>, Mark Brown <broonie@kernel.org>,
	bcousson@baylibre.com, linux-omap@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH RFC v2 REPOST 3/8] ASoC: davinci-evm: HDMI audio support for TDA998x trough McASP I2S bus
Date: Wed, 15 Jan 2014 18:28:14 +0200	[thread overview]
Message-ID: <52D6B71E.5000702@ti.com> (raw)
In-Reply-To: <52D691AD.3010206@iki.fi>

On 01/15/2014 03:48 PM, Anssi Hannula wrote:
> 15.01.2014 13:27, Jyri Sarha kirjoitti:
>> On 12/31/2013 03:25 PM, Mark Brown wrote:
>>> On Fri, Dec 20, 2013 at 12:39:38PM +0200, Jyri Sarha wrote:
>>>> support. The only supported sample format is SNDRV_PCM_FORMAT_S32_LE.
>>>> The 8 least significant bits are ignored.
>>>
>>> Where does this constraint come from?
>>>
>>
>>   From driver/gpu/drm/i2c/tda998x_drv.c. The driver configures CTS_N
>> register statically to a value that works only with 4 byte samples.
>> According to my tests it is possible to support 3 and 2 byte samples too
>> by changing the CTS_N register value, but I am not sure if the
>> configuration can be changed on the fly. My data sheet of the nxp chip
>> is very vague about the register definitions, but I suppose the register
>> configures some clock divider on the chip. HDMI supports only upto 24bit
>> audio and the data sheet states that any extraneous least significant
>> bits are ignored.
>
> That sounds strange, CTS/N values only depend on audio sample rate and
> TMDS/video clock, not on the audio format or the size of samples (HDMI
> spec sec 7.2 - Audio Sample Clock Capture and Regeneration).
>
> Sure there isn't anything more going on (like the used HDMI sink being
> more tolerant to wrong CTS/N with 4-byte samples, or more likely
> something else I can't immediately think of)?
>

On theoretical level I am not really sure about anything, because have 
not been able to get my hands on proper NXP TDA19988 documentation.

However, while playing around with my Beaglebone-Black I have have found 
out in practice that by changing CTS_N register's (page 0x11 reg 0x0c) 
K_SEL bits (bit 2 to 0)[1] I can get 2, 3 and 4 byte samples to work 
consistently by setting:

K_SEL = 1 for SNDRV_PCM_FORMAT_S16_LE
K_SEL = 2 for SNDRV_PCM_FORMAT_S24_3LE
K_SEL = 3 for SNDRV_PCM_FORMAT_S32_LE

Because I do not really know what is going on, I did not want to suggest 
any changes to the driver and just use the format that works with the 
current driver version.

The HDMI sinks I have been using are a Toshiba 22B2LF1G and Thomson 
42E90NF32 televisions. About those I just know that they both behave the 
same way.

Best regards,
Jyri

[1] The closest data sheet that has any description about the chip 
registers I have found is this: 
http://media.digikey.com/pdf/Data%20Sheets/NXP%20PDFs/TDA9983B.pdf

  reply	other threads:[~2014-01-15 16:28 UTC|newest]

Thread overview: 59+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-19 12:12 [PATCH RFC 0/9] Beaglebone-Black HDMI audio Jyri Sarha
2013-11-19 12:12 ` [PATCH RFC 1/9] clk: add gpio controlled clock Jyri Sarha
2013-11-19 12:12 ` [PATCH RFC 2/9] ASoC: davinci-evm: Add named clock reference to DT bindings Jyri Sarha
2013-11-19 18:18   ` Mark Brown
2013-11-19 12:12 ` [PATCH RFC 3/9] ASoC: davinci-evm: HDMI audio support for TDA998x trough McASP I2S bus Jyri Sarha
2013-11-19 15:07   ` Thomas Petazzoni
2013-11-19 12:12 ` [PATCH RFC 4/9] ASoC: hdmi-codec: Add devicetree binding with documentation Jyri Sarha
2013-11-19 17:50   ` Mark Brown
2013-11-20  9:23   ` Jean-Francois Moine
2013-11-20 10:09     ` Mark Brown
2013-11-20 12:34       ` Jean-Francois Moine
2013-11-20 13:33         ` Mark Brown
2013-11-19 12:12 ` [PATCH RFC 5/9] ASoC: hdmi-codec: Add SNDRV_PCM_FMTBIT_32_LE playback format Jyri Sarha
2013-11-19 18:21   ` Mark Brown
2013-11-19 12:12 ` [PATCH RFC 6/9] ASoC: davinci: HDMI audio build for AM33XX and TDA998x Jyri Sarha
2013-11-19 12:12 ` [PATCH RFC 7/9] drm/tilcdc: Add I2C HDMI audio config for tda998x Jyri Sarha
2013-11-19 12:12 ` [PATCH RFC 8/9] ARM: OMAP2+: omap2plus_defconfig: Enable tilcdc and TDA998X HDMI support Jyri Sarha
2013-11-19 12:12 ` [PATCH RFC 9/9] ARM: OMAP2+: omap2plus_defconfig: Enable BeagleBone Black HDMI audio support Jyri Sarha
2013-11-19 12:21 ` [PATCH RFC] DTS Changes for Beaglebone-Black HDMI audio Jyri Sarha
2013-11-19 12:21   ` [PATCH RFC] ARM/dts: am335x-boneblack: Add HDMI audio support Jyri Sarha
2013-11-19 13:02     ` Benoit Cousson
2013-11-19 13:29       ` Jyri Sarha
2013-12-08 12:16 ` [RFC v2 0/8] Beaglebone-Black HDMI audio Jyri Sarha
2013-12-08 12:16   ` [RFC v2 1/8] clk: add gpio controlled clock Jyri Sarha
2013-12-08 12:16   ` [RFC v2 2/8] ASoC: davinci-evm: Add named clock reference to DT bindings Jyri Sarha
2013-12-08 12:16   ` [RFC v2 3/8] ASoC: davinci-evm: HDMI audio support for TDA998x trough McASP I2S bus Jyri Sarha
2013-12-08 12:16   ` [RFC v2 4/8] ASoC: hdmi-codec: Add devicetree binding with documentation Jyri Sarha
2013-12-08 12:16   ` [RFC v2 5/8] ASoC: davinci: HDMI audio build for AM33XX and TDA998x Jyri Sarha
2013-12-08 12:16   ` [RFC v2 6/8] drm/tilcdc: Add I2C HDMI audio config for tda998x Jyri Sarha
2013-12-08 12:16   ` [RFC v2 7/8] ARM: OMAP2+: omap2plus_defconfig: Enable tilcdc and TDA998X HDMI support Jyri Sarha
2013-12-08 12:16   ` [RFC v2 8/8] ARM: OMAP2+: omap2plus_defconfig: Enable BeagleBone Black HDMI audio support Jyri Sarha
2013-12-08 12:20 ` [RFC v2] Beaglebone-Black HDMI audio Jyri Sarha
2013-12-08 12:20   ` [RFC v2] ARM/dts: am335x-boneblack: Add HDMI audio support Jyri Sarha
2013-12-20 10:36 ` [PATCH RFC v2 REPOST 0/8] Beaglebone-Black HDMI audio Jyri Sarha
2013-12-20 10:37   ` [PATCH RFC v2 REPOST 1/8] clk: add gpio controlled clock Jyri Sarha
2013-12-20 10:38   ` [PATCH RFC v2 REPOST 2/8] ASoC: davinci-evm: Add named clock reference to DT bindings Jyri Sarha
2013-12-31 13:16     ` Mark Brown
2014-01-15 11:12       ` Jyri Sarha
2013-12-20 10:39   ` [PATCH RFC v2 REPOST 3/8] ASoC: davinci-evm: HDMI audio support for TDA998x trough McASP I2S bus Jyri Sarha
2013-12-31 13:25     ` Mark Brown
2014-01-15 11:27       ` Jyri Sarha
2014-01-15 13:48         ` Anssi Hannula
2014-01-15 16:28           ` Jyri Sarha [this message]
2014-01-15 15:51         ` [alsa-devel] " Jean-Francois Moine
2014-01-22  9:20           ` Jyri Sarha
2014-01-22 10:19             ` [alsa-devel] " Jean-Francois Moine
2014-01-22 10:46               ` Jean-Francois Moine
2014-01-24 12:57                 ` Jyri Sarha
2014-01-24 16:54                   ` [alsa-devel] " Jean-Francois Moine
2014-01-21 19:15         ` Mark Brown
2014-01-24 13:01           ` Jyri Sarha
2013-12-20 10:40   ` [PATCH RFC v2 REPOST 4/8] ASoC: hdmi-codec: Add devicetree binding with documentation Jyri Sarha
2013-12-31 13:26     ` Mark Brown
2013-12-20 10:40   ` [PATCH RFC v2 REPOST 5/8] ASoC: davinci: HDMI audio build for AM33XX and TDA998x Jyri Sarha
2013-12-20 10:41   ` [PATCH RFC v2 REPOST 6/8] drm/tilcdc: Add I2C HDMI audio config for tda998x Jyri Sarha
2013-12-20 10:42   ` [PATCH RFC v2 REPOST 7/8] ARM: OMAP2+: omap2plus_defconfig: Enable tilcdc and TDA998X HDMI support Jyri Sarha
2013-12-20 10:43   ` [PATCH RFC v2 REPOST 8/8] ARM: OMAP2+: omap2plus_defconfig: Enable BeagleBone Black HDMI audio support Jyri Sarha
2013-12-20 11:30   ` [alsa-devel] [PATCH RFC v2 REPOST 0/8] Beaglebone-Black HDMI audio Mark Brown
2013-12-20 11:51     ` Jyri Sarha

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=52D6B71E.5000702@ti.com \
    --to=jsarha@ti.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=anssi.hannula@iki.fi \
    --cc=bcousson@baylibre.com \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=peter.ujfalusi@ti.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;
as well as URLs for NNTP newsgroup(s).