File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33#define DW_HDMI_AUDIO_H
44
55struct dw_hdmi ;
6+ extern bool hdmi_i2s_audio_disable ;
67
78struct dw_hdmi_audio_data {
89 phys_addr_t phys ;
Original file line number Diff line number Diff line change @@ -223,6 +223,7 @@ static struct hdmi_codec_ops dw_hdmi_i2s_ops = {
223223static int snd_dw_hdmi_probe (struct platform_device * pdev )
224224{
225225 struct dw_hdmi_i2s_audio_data * audio = pdev -> dev .platform_data ;
226+ struct dw_hdmi * hdmi = audio -> hdmi ;
226227 struct platform_device_info pdevinfo ;
227228 struct hdmi_codec_pdata pdata ;
228229
@@ -240,6 +241,13 @@ static int snd_dw_hdmi_probe(struct platform_device *pdev)
240241 pdevinfo .dma_mask = DMA_BIT_MASK (32 );
241242
242243 audio -> pdev = platform_device_register_full (& pdevinfo );
244+
245+ if (hdmi_i2s_audio_disable ) {
246+ dw_hdmi_audio_disable (hdmi );
247+ hdmi_write (audio , HDMI_AUD_CONF0_SW_RESET , HDMI_AUD_CONF0 );
248+ dev_info (& pdev -> dev , "disable hdmi i2s audio\n" );
249+ }
250+
243251 return IS_ERR_OR_NULL (audio -> pdev );
244252}
245253
Original file line number Diff line number Diff line change 5858#define RK_HDMI_COLORIMETRY_BT2020 (HDMI_COLORIMETRY_EXTENDED + \
5959 HDMI_EXTENDED_COLORIMETRY_BT2020)
6060
61+ bool hdmi_i2s_audio_disable = false;
62+ EXPORT_SYMBOL (hdmi_i2s_audio_disable );
63+
6164/* HDMI output pixel format */
6265enum drm_hdmi_output_type {
6366 DRM_HDMI_OUTPUT_DEFAULT_RGB , /* default RGB */
@@ -386,6 +389,9 @@ static int rockchip_hdmi_parse_dt(struct rockchip_hdmi *hdmi)
386389 int ret , val , phy_table_size ;
387390 u32 * phy_config ;
388391
392+ hdmi_i2s_audio_disable = of_property_read_bool (np , "hdmi-i2s-audio-disable" );
393+ dev_info (hdmi -> dev , "hdmi_i2s_audio_disable=%s\n" , (hdmi_i2s_audio_disable ? "true" : "false" ));
394+
389395 hdmi -> regmap = syscon_regmap_lookup_by_phandle (np , "rockchip,grf" );
390396 if (IS_ERR (hdmi -> regmap )) {
391397 dev_err (hdmi -> dev , "Unable to get rockchip,grf\n" );
You can’t perform that action at this time.
0 commit comments