All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnaud Pouliquen <arnaud.pouliquen@st.com>
To: Philipp Zabel <p.zabel@pengutronix.de>
Cc: Jean-Francois Moine <moinejf@free.fr>,
	"alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Russell King - ARM Linux <linux@arm.linux.org.uk>,
	David Airlie <airlied@linux.ie>,
	Liam Girdwood <lgirdwood@gmail.com>, Jyri Sarha <jsarha@ti.com>,
	Takashi Iwai <tiwai@suse.de>, Mark Brown <broonie@kernel.org>,
	Benjamin Gaignard <benjamin.gaignard@linaro.org>
Subject: Re: [RFC v2 1/6] video: hdmi: add helper function for N and CTS
Date: Fri, 19 Feb 2016 09:20:43 +0100	[thread overview]
Message-ID: <56C6D05B.8080107@st.com> (raw)
In-Reply-To: <1455805250.3937.19.camel@pengutronix.de>



On 02/18/2016 03:20 PM, Philipp Zabel wrote:
> Hi Arnaud,
> 
> Am Freitag, den 22.01.2016, 18:48 +0100 schrieb Arnaud Pouliquen:
>> From: Moise Gergaud <moise.gergaud@st.com>
>>
>> Add helper function to compute HDMI CTS and N parameters.
>> Implementation is based on HDMI 1.4b specification.
>>
>> Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@st.com>
> 
> Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
> Tested-by: Philipp Zabel <p.zabel@pengutronix.de>
> 
>> ---
>>  drivers/video/hdmi.c | 222 +++++++++++++++++++++++++++++++++++++++++++++++++++
>>  include/linux/hdmi.h |  22 +++++
>>  2 files changed, 244 insertions(+)
>>
>> diff --git a/drivers/video/hdmi.c b/drivers/video/hdmi.c
>> index 1626892..be8b8ed 100644
>> --- a/drivers/video/hdmi.c
>> +++ b/drivers/video/hdmi.c
>> @@ -1242,3 +1242,225 @@ int hdmi_infoframe_unpack(union hdmi_infoframe *frame, void *buffer)
>>  	return ret;
>>  }
>>  EXPORT_SYMBOL(hdmi_infoframe_unpack);
>> +
>> +/**
>> + * audio clock regeneration (acr) parameters
>> + * N and CTS computation are based on HDMI specification 1.4b
>> + */
>> +enum audio_rate {
>> +	HDMI_AUDIO_N_CTS_32KHZ,
>> +	HDMI_AUDIO_N_CTS_44_1KHZ,
>> +	HDMI_AUDIO_N_CTS_48KHZ,
>> +};
>> +
>> +struct hdmi_audio_acr {
>> +	unsigned int tmds_clk;
>> +	struct hdmi_audio_n_cts n_cts;
>> +};
>> +
>> +static const struct hdmi_audio_acr hdmi_audio_standard_acr[3][12] = {
>> +	{ /*32 kHz*/
>> +		{  25174825, {  4576,  28125, 0 } }, /* 25,20/1.001  MHz */
>> +		{  25200000, {  4096,  25200, 0 } }, /* 25.20        MHz */
>> +		{  27000000, {  4096,  27000, 0 } }, /* 27.00        MHz */
>> +		{  27027000, {  4096,  27027, 0 } }, /* 27.00*1.001  MHz */
>> +		{  54000000, {  4096,  54000, 0 } }, /* 54.00        MHz */
>> +		{  54054000, {  4096,  54054, 0 } }, /* 54.00*1.001  MHz */
>> +		{  74175824, { 11648, 210937, 50 } }, /* 74.25/1.001  MHz */
>> +		{  74250000, {  4096,  74250, 0 } }, /* 74.25        MHz */
>> +		{ 148351648, { 11648, 421875, 0 } }, /* 148.50/1.001 MHz */
>> +		{ 148500000, {  4096, 148500, 0 } }, /* 148.50       MHz */
>> +		{ 296703296, {  5824, 421875, 0 } }, /* 297/1.001    MHz */
> 
> 297/1.001 is about 296703296.7. Should this be rounded to 296703297 ?
For this value, the rounded and truncate values are different. I will
add both value in table.

Thanks and Regards
Arnaud

  reply	other threads:[~2016-02-19  8:20 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-22 17:48 [RFC v2 0/6] sti: add audio interface to the hdmi driver Arnaud Pouliquen
2016-01-22 17:48 ` [RFC v2 1/6] video: hdmi: add helper function for N and CTS Arnaud Pouliquen
2016-02-18 14:20   ` Philipp Zabel
2016-02-19  8:20     ` Arnaud Pouliquen [this message]
2016-01-22 17:48 ` [RFC v2 2/6] ALSA: pcm: add IEC958 channel status control helper Arnaud Pouliquen
2016-02-16 20:17   ` Jyri Sarha
2016-02-17  8:37     ` Arnaud Pouliquen
2016-02-17  0:31   ` Russell King - ARM Linux
2016-02-17  9:07     ` Arnaud Pouliquen
2016-01-22 17:48 ` [RFC v2 3/6] ASoC: core: add code to complete dai init after pcm creation Arnaud Pouliquen
2016-02-05  9:58   ` Jyri Sarha
2016-02-15 10:39     ` Arnaud Pouliquen
2016-01-22 17:48 ` [RFC v2 4/6] drm: sti: Add ASoC generic hdmi codec support Arnaud Pouliquen
2016-01-22 17:48 ` [RFC v2 5/6] ASoc: hdmi-codec: add IEC control Arnaud Pouliquen
2016-02-06 19:29   ` Jyri Sarha
2016-02-15 10:51     ` Arnaud Pouliquen
2016-02-16 20:16       ` Jyri Sarha
2016-01-22 17:48 ` [RFC v2 6/6] ARM: DT: b2120: add audio HDMI dai link in audio card 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=56C6D05B.8080107@st.com \
    --to=arnaud.pouliquen@st.com \
    --cc=airlied@linux.ie \
    --cc=alsa-devel@alsa-project.org \
    --cc=benjamin.gaignard@linaro.org \
    --cc=broonie@kernel.org \
    --cc=jsarha@ti.com \
    --cc=lars@metafoo.de \
    --cc=lgirdwood@gmail.com \
    --cc=linux@arm.linux.org.uk \
    --cc=moinejf@free.fr \
    --cc=p.zabel@pengutronix.de \
    --cc=tiwai@suse.de \
    /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.