Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/bridge: dw-hdmi: Add API dw_hdmi_set_sample_iec958() for iec958 format

Add API dw_hdmi_set_sample_iec958() for IEC958 format because audio device
driver needs IEC958 information to configure this specific setting.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Acked-by: Liu Ying <victor.liu@nxp.com>
Tested-by: Alexander Stein <alexander.stein@ew.tq-group.com>
Signed-off-by: Liu Ying <victor.liu@nxp.com>
Link: https://lore.kernel.org/r/20250923053001.2678596-5-shengjiu.wang@nxp.com

authored by

Shengjiu Wang and committed by
Liu Ying
80c5d144 21d4c95e

+18 -2
+5
drivers/gpu/drm/bridge/synopsys/dw-hdmi-gp-audio.c
··· 90 90 params->iec.status[0] & IEC958_AES0_NONAUDIO); 91 91 dw_hdmi_set_sample_width(dw->data.hdmi, params->sample_width); 92 92 93 + if (daifmt->bit_fmt == SNDRV_PCM_FORMAT_IEC958_SUBFRAME_LE) 94 + dw_hdmi_set_sample_iec958(dw->data.hdmi, 1); 95 + else 96 + dw_hdmi_set_sample_iec958(dw->data.hdmi, 0); 97 + 93 98 return 0; 94 99 } 95 100
+11 -1
drivers/gpu/drm/bridge/synopsys/dw-hdmi.c
··· 177 177 178 178 spinlock_t audio_lock; 179 179 struct mutex audio_mutex; 180 + unsigned int sample_iec958; 180 181 unsigned int sample_non_pcm; 181 182 unsigned int sample_width; 182 183 unsigned int sample_rate; ··· 719 718 } 720 719 EXPORT_SYMBOL_GPL(dw_hdmi_set_sample_non_pcm); 721 720 721 + void dw_hdmi_set_sample_iec958(struct dw_hdmi *hdmi, unsigned int iec958) 722 + { 723 + mutex_lock(&hdmi->audio_mutex); 724 + hdmi->sample_iec958 = iec958; 725 + mutex_unlock(&hdmi->audio_mutex); 726 + } 727 + EXPORT_SYMBOL_GPL(dw_hdmi_set_sample_iec958); 728 + 722 729 void dw_hdmi_set_sample_rate(struct dw_hdmi *hdmi, unsigned int rate) 723 730 { 724 731 mutex_lock(&hdmi->audio_mutex); ··· 858 849 hdmi->channels, 859 850 hdmi->sample_width, 860 851 hdmi->sample_rate, 861 - hdmi->sample_non_pcm); 852 + hdmi->sample_non_pcm, 853 + hdmi->sample_iec958); 862 854 } 863 855 864 856 static void dw_hdmi_gp_audio_disable(struct dw_hdmi *hdmi)
+2 -1
include/drm/bridge/dw_hdmi.h
··· 145 145 146 146 /* Platform-specific audio enable/disable (optional) */ 147 147 void (*enable_audio)(struct dw_hdmi *hdmi, int channel, 148 - int width, int rate, int non_pcm); 148 + int width, int rate, int non_pcm, int iec958); 149 149 void (*disable_audio)(struct dw_hdmi *hdmi); 150 150 151 151 /* Vendor PHY support */ ··· 179 179 int dw_hdmi_set_plugged_cb(struct dw_hdmi *hdmi, hdmi_codec_plugged_cb fn, 180 180 struct device *codec_dev); 181 181 void dw_hdmi_set_sample_non_pcm(struct dw_hdmi *hdmi, unsigned int non_pcm); 182 + void dw_hdmi_set_sample_iec958(struct dw_hdmi *hdmi, unsigned int iec958); 182 183 void dw_hdmi_set_sample_width(struct dw_hdmi *hdmi, unsigned int width); 183 184 void dw_hdmi_set_sample_rate(struct dw_hdmi *hdmi, unsigned int rate); 184 185 void dw_hdmi_set_channel_count(struct dw_hdmi *hdmi, unsigned int cnt);