diff mbox series

[2/3] drm: bridge: adv7511: remove s32 format from i2s capabilities

Message ID 20241210134254.2967524-3-olivier.moysan@foss.st.com (mailing list archive)
State New, archived
Headers show
Series drm: bridge: adv7511: refine actual capabilities | expand

Commit Message

Olivier MOYSAN Dec. 10, 2024, 1:42 p.m. UTC
The ADV7511 chip allows 24 bits samples max in I2S mode, excepted for
direct AES3 mode (SNDRV_PCM_FORMAT_IEC958_SUBFRAME_LE format).
However the HDMI codec exposes S32_LE format as supported.
Adapt ADV7511 HDMI I2S format list to expose formats actually supported.

Signed-off-by: Olivier Moysan <olivier.moysan@foss.st.com>
---
 drivers/gpu/drm/bridge/adv7511/adv7511_audio.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Dmitry Baryshkov Dec. 11, 2024, 10:54 p.m. UTC | #1
On Tue, Dec 10, 2024 at 02:42:53PM +0100, Olivier Moysan wrote:
> The ADV7511 chip allows 24 bits samples max in I2S mode, excepted for
> direct AES3 mode (SNDRV_PCM_FORMAT_IEC958_SUBFRAME_LE format).
> However the HDMI codec exposes S32_LE format as supported.
> Adapt ADV7511 HDMI I2S format list to expose formats actually supported.
> 
> Signed-off-by: Olivier Moysan <olivier.moysan@foss.st.com>
> ---
>  drivers/gpu/drm/bridge/adv7511/adv7511_audio.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/gpu/drm/bridge/adv7511/adv7511_audio.c b/drivers/gpu/drm/bridge/adv7511/adv7511_audio.c
> index 28ae81ca3651..ce6eda87bfe0 100644
> --- a/drivers/gpu/drm/bridge/adv7511/adv7511_audio.c
> +++ b/drivers/gpu/drm/bridge/adv7511/adv7511_audio.c
> @@ -232,6 +232,9 @@ static const struct hdmi_codec_ops adv7511_codec_ops = {
>  
>  static const struct hdmi_codec_pdata codec_data = {
>  	.ops = &adv7511_codec_ops,
> +	.i2s_formats = (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE |
> +			SNDRV_PCM_FMTBIT_S24_3LE | SNDRV_PCM_FMTBIT_S24_LE |
> +			SNDRV_PCM_FMTBIT_IEC958_SUBFRAME_LE),

This will break w/o patch 3. Please change the order of the patches so
that after each commit the kernel can still be built and work correctly.

>  	.max_i2s_channels = 2,
>  	.i2s = 1,
>  	.no_i2s_capture = 1,
> -- 
> 2.25.1
>
Olivier MOYSAN Dec. 19, 2024, 2:51 p.m. UTC | #2
Hi Dmitry,

On 12/11/24 23:54, Dmitry Baryshkov wrote:
> On Tue, Dec 10, 2024 at 02:42:53PM +0100, Olivier Moysan wrote:
>> The ADV7511 chip allows 24 bits samples max in I2S mode, excepted for
>> direct AES3 mode (SNDRV_PCM_FORMAT_IEC958_SUBFRAME_LE format).
>> However the HDMI codec exposes S32_LE format as supported.
>> Adapt ADV7511 HDMI I2S format list to expose formats actually supported.
>>
>> Signed-off-by: Olivier Moysan <olivier.moysan@foss.st.com>
>> ---
>>   drivers/gpu/drm/bridge/adv7511/adv7511_audio.c | 3 +++
>>   1 file changed, 3 insertions(+)
>>
>> diff --git a/drivers/gpu/drm/bridge/adv7511/adv7511_audio.c b/drivers/gpu/drm/bridge/adv7511/adv7511_audio.c
>> index 28ae81ca3651..ce6eda87bfe0 100644
>> --- a/drivers/gpu/drm/bridge/adv7511/adv7511_audio.c
>> +++ b/drivers/gpu/drm/bridge/adv7511/adv7511_audio.c
>> @@ -232,6 +232,9 @@ static const struct hdmi_codec_ops adv7511_codec_ops = {
>>   
>>   static const struct hdmi_codec_pdata codec_data = {
>>   	.ops = &adv7511_codec_ops,
>> +	.i2s_formats = (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE |
>> +			SNDRV_PCM_FMTBIT_S24_3LE | SNDRV_PCM_FMTBIT_S24_LE |
>> +			SNDRV_PCM_FMTBIT_IEC958_SUBFRAME_LE),
> 
> This will break w/o patch 3. Please change the order of the patches so
> that after each commit the kernel can still be built and work correctly.
> 

Right. I will re-order in v2.

>>   	.max_i2s_channels = 2,
>>   	.i2s = 1,
>>   	.no_i2s_capture = 1,
>> -- 
>> 2.25.1
>>
>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/bridge/adv7511/adv7511_audio.c b/drivers/gpu/drm/bridge/adv7511/adv7511_audio.c
index 28ae81ca3651..ce6eda87bfe0 100644
--- a/drivers/gpu/drm/bridge/adv7511/adv7511_audio.c
+++ b/drivers/gpu/drm/bridge/adv7511/adv7511_audio.c
@@ -232,6 +232,9 @@  static const struct hdmi_codec_ops adv7511_codec_ops = {
 
 static const struct hdmi_codec_pdata codec_data = {
 	.ops = &adv7511_codec_ops,
+	.i2s_formats = (SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S20_3LE |
+			SNDRV_PCM_FMTBIT_S24_3LE | SNDRV_PCM_FMTBIT_S24_LE |
+			SNDRV_PCM_FMTBIT_IEC958_SUBFRAME_LE),
 	.max_i2s_channels = 2,
 	.i2s = 1,
 	.no_i2s_capture = 1,