[Intel-gfx] [PATCH] drm/i915/hdmi: Add HDMI 2.0 audio clock recovery N values

Clint Taylor clinton.a.taylor at intel.com
Thu Oct 25 18:56:53 UTC 2018



On 10/15/2018 04:31 AM, Jani Nikula wrote:
> On Mon, 15 Oct 2018, Jani Nikula <jani.nikula at linux.intel.com> wrote:
>> On Fri, 05 Oct 2018, clinton.a.taylor at intel.com wrote:
>>> From: Clint Taylor <clinton.a.taylor at intel.com>
>>>
>>> HDMI 2.0 594Mhz modes were incorrectly selecting 25.200Mhz Automatic N
>>> value mode instead of HDMI specification values.
>>>
>>> Signed-off-by: Clint Taylor <clinton.a.taylor at intel.com>
>>> ---
>>>   drivers/gpu/drm/i915/intel_audio.c | 16 ++++++++++++++++
>>>   1 file changed, 16 insertions(+)
>>>
>>> diff --git a/drivers/gpu/drm/i915/intel_audio.c b/drivers/gpu/drm/i915/intel_audio.c
>>> index 769f3f5..4b8f6f6 100644
>>> --- a/drivers/gpu/drm/i915/intel_audio.c
>>> +++ b/drivers/gpu/drm/i915/intel_audio.c
>>> @@ -144,6 +144,8 @@ struct dp_aud_n_m {
>>>   /* HDMI N/CTS table */
>>>   #define TMDS_297M 297000
>>>   #define TMDS_296M 296703
>>> +#define TMDS_594M 594000
>>> +#define TMDS_593M 593407
>>>   static const struct {
>>>   	int sample_rate;
>>>   	int clock;
>>> @@ -164,6 +166,20 @@ struct dp_aud_n_m {
>>>   	{ 176400, TMDS_297M, 18816, 247500 },
>>>   	{ 192000, TMDS_296M, 23296, 281250 },
>>>   	{ 192000, TMDS_297M, 20480, 247500 },
>>> +	{ 44100, TMDS_593M, 8918, 937500 },
>>> +	{ 44100, TMDS_594M, 9408, 990000 },
>>> +	{ 48000, TMDS_593M, 5824, 562500 },
>>> +	{ 48000, TMDS_594M, 6144, 594000 },
>>> +	{ 32000, TMDS_593M, 5824, 843750 },
>>> +	{ 32000, TMDS_594M, 3072, 445500 },
>>> +	{ 88200, TMDS_593M, 17836, 937500 },
>>> +	{ 88200, TMDS_594M, 9408, 990000 },
>> The N here should be 18816. The rest looks good.
Good catch. I'll make the change in v2.
> PS. This should probably have Cc: stable.
Done
>
> Could I persuade you to write a cleanup patch on top to re-arrange the
> array in groups:
>
> 	/* multiples of 32 kHz */
> 	/* multiples of 44.1 kHz */
> 	/* multiples of 48 kHz */
>
> with each group in increasing audio sample frequency, I'll review it in
> same go. Otherwise, I'll write the patch myself. The current ordering is
> a PITA to review against the spec...
patch 2/2 send with structure reorganized by Sample Frequency.

TODO: add N/CTS values for 30 and 36 bit 297Mhz modes.

-Clint

>
> BR,
> Jani.
>
>> BR,
>> Jani.
>>
>>> +	{ 96000, TMDS_593M, 11648, 562500 },
>>> +	{ 96000, TMDS_594M, 12288, 594000 },
>>> +	{ 176400, TMDS_593M, 35672, 937500 },
>>> +	{ 176400, TMDS_594M, 37632, 990000 },
>>> +	{ 192000, TMDS_593M, 23296, 562500 },
>>> +	{ 192000, TMDS_594M, 24576, 594000 },
>>>   };
>>>   
>>>   /* get AUD_CONFIG_PIXEL_CLOCK_HDMI_* value for mode */



More information about the Intel-gfx mailing list