Lines Matching full:audio
46 static void dp_audio_stream_sdp(struct dp_audio_private *audio) in dp_audio_stream_sdp() argument
48 struct dp_catalog *catalog = audio->catalog; in dp_audio_stream_sdp()
60 drm_dbg_dp(audio->drm_dev, in dp_audio_stream_sdp()
73 drm_dbg_dp(audio->drm_dev, in dp_audio_stream_sdp()
84 new_value = audio->channels - 1; in dp_audio_stream_sdp()
88 drm_dbg_dp(audio->drm_dev, in dp_audio_stream_sdp()
96 static void dp_audio_timestamp_sdp(struct dp_audio_private *audio) in dp_audio_timestamp_sdp() argument
98 struct dp_catalog *catalog = audio->catalog; in dp_audio_timestamp_sdp()
110 drm_dbg_dp(audio->drm_dev, in dp_audio_timestamp_sdp()
124 drm_dbg_dp(audio->drm_dev, in dp_audio_timestamp_sdp()
138 drm_dbg_dp(audio->drm_dev, in dp_audio_timestamp_sdp()
145 static void dp_audio_infoframe_sdp(struct dp_audio_private *audio) in dp_audio_infoframe_sdp() argument
147 struct dp_catalog *catalog = audio->catalog; in dp_audio_infoframe_sdp()
159 drm_dbg_dp(audio->drm_dev, in dp_audio_infoframe_sdp()
173 drm_dbg_dp(audio->drm_dev, in dp_audio_infoframe_sdp()
187 drm_dbg_dp(audio->drm_dev, in dp_audio_infoframe_sdp()
194 static void dp_audio_copy_management_sdp(struct dp_audio_private *audio) in dp_audio_copy_management_sdp() argument
196 struct dp_catalog *catalog = audio->catalog; in dp_audio_copy_management_sdp()
208 drm_dbg_dp(audio->drm_dev, in dp_audio_copy_management_sdp()
222 drm_dbg_dp(audio->drm_dev, in dp_audio_copy_management_sdp()
236 drm_dbg_dp(audio->drm_dev, in dp_audio_copy_management_sdp()
243 static void dp_audio_isrc_sdp(struct dp_audio_private *audio) in dp_audio_isrc_sdp() argument
245 struct dp_catalog *catalog = audio->catalog; in dp_audio_isrc_sdp()
257 drm_dbg_dp(audio->drm_dev, in dp_audio_isrc_sdp()
271 drm_dbg_dp(audio->drm_dev, in dp_audio_isrc_sdp()
278 static void dp_audio_setup_sdp(struct dp_audio_private *audio) in dp_audio_setup_sdp() argument
280 dp_catalog_audio_config_sdp(audio->catalog); in dp_audio_setup_sdp()
282 dp_audio_stream_sdp(audio); in dp_audio_setup_sdp()
283 dp_audio_timestamp_sdp(audio); in dp_audio_setup_sdp()
284 dp_audio_infoframe_sdp(audio); in dp_audio_setup_sdp()
285 dp_audio_copy_management_sdp(audio); in dp_audio_setup_sdp()
286 dp_audio_isrc_sdp(audio); in dp_audio_setup_sdp()
289 static void dp_audio_setup_acr(struct dp_audio_private *audio) in dp_audio_setup_acr() argument
292 struct dp_catalog *catalog = audio->catalog; in dp_audio_setup_acr()
294 switch (audio->dp_audio.bw_code) { in dp_audio_setup_acr()
308 drm_dbg_dp(audio->drm_dev, "Unknown link rate\n"); in dp_audio_setup_acr()
316 static void dp_audio_safe_to_exit_level(struct dp_audio_private *audio) in dp_audio_safe_to_exit_level() argument
318 struct dp_catalog *catalog = audio->catalog; in dp_audio_safe_to_exit_level()
321 switch (audio->dp_audio.lane_count) { in dp_audio_safe_to_exit_level()
332 drm_dbg_dp(audio->drm_dev, in dp_audio_safe_to_exit_level()
342 static void dp_audio_enable(struct dp_audio_private *audio, bool enable) in dp_audio_enable() argument
344 struct dp_catalog *catalog = audio->catalog; in dp_audio_enable()
429 struct dp_audio_private *audio; in dp_audio_hw_params() local
439 * unclocked access as the audio subsystem relies on the DP in dp_audio_hw_params()
449 audio = dp_audio_get_data(pdev); in dp_audio_hw_params()
450 if (IS_ERR(audio)) { in dp_audio_hw_params()
451 rc = PTR_ERR(audio); in dp_audio_hw_params()
455 audio->channels = params->channels; in dp_audio_hw_params()
457 dp_audio_setup_sdp(audio); in dp_audio_hw_params()
458 dp_audio_setup_acr(audio); in dp_audio_hw_params()
459 dp_audio_safe_to_exit_level(audio); in dp_audio_hw_params()
460 dp_audio_enable(audio, true); in dp_audio_hw_params()
470 struct dp_audio_private *audio; in dp_audio_shutdown() local
476 audio = dp_audio_get_data(pdev); in dp_audio_shutdown()
477 if (IS_ERR(audio)) { in dp_audio_shutdown()
478 DRM_ERROR("failed to get audio data\n"); in dp_audio_shutdown()
483 * if audio was not enabled there is no need in dp_audio_shutdown()
486 * access when audio subsystem calls this without DP being in dp_audio_shutdown()
493 dp_audio_enable(audio, false); in dp_audio_shutdown()
544 struct dp_audio_private *audio; in dp_audio_get() local
553 audio = devm_kzalloc(&pdev->dev, sizeof(*audio), GFP_KERNEL); in dp_audio_get()
554 if (!audio) { in dp_audio_get()
559 audio->pdev = pdev; in dp_audio_get()
560 audio->catalog = catalog; in dp_audio_get()
562 dp_audio = &audio->dp_audio; in dp_audio_get()
573 struct dp_audio_private *audio; in dp_audio_put() local
578 audio = container_of(dp_audio, struct dp_audio_private, dp_audio); in dp_audio_put()
580 devm_kfree(&audio->pdev->dev, audio); in dp_audio_put()