drm/radeon: add a connector property for audio
This provides a connector property to enable/disable hdmi audio on the fly. The default is disabled, but you can select auto (let the driver detect an audio capable monitor and enable it) or enabled (force audio enabled). This also enables audio by default so you no longer need a module parameter to enable audio. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
@@ -1172,6 +1172,12 @@ static struct drm_prop_enum_list radeon_underscan_enum_list[] =
|
||||
{ UNDERSCAN_AUTO, "auto" },
|
||||
};
|
||||
|
||||
static struct drm_prop_enum_list radeon_audio_enum_list[] =
|
||||
{ { RADEON_AUDIO_DISABLE, "off" },
|
||||
{ RADEON_AUDIO_ENABLE, "on" },
|
||||
{ RADEON_AUDIO_AUTO, "auto" },
|
||||
};
|
||||
|
||||
static int radeon_modeset_create_props(struct radeon_device *rdev)
|
||||
{
|
||||
int sz;
|
||||
@@ -1222,6 +1228,12 @@ static int radeon_modeset_create_props(struct radeon_device *rdev)
|
||||
if (!rdev->mode_info.underscan_vborder_property)
|
||||
return -ENOMEM;
|
||||
|
||||
sz = ARRAY_SIZE(radeon_audio_enum_list);
|
||||
rdev->mode_info.audio_property =
|
||||
drm_property_create_enum(rdev->ddev, 0,
|
||||
"audio",
|
||||
radeon_audio_enum_list, sz);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user