Skip to content

Commit eabe29d

Browse files
committed
drm: apple: disable HDMI audio by default
Can be still enabled by adding `apple_dcp.hdmi_audio` the kernel command line. Signed-off-by: Janne Grunau <j@jannau.net>
1 parent 93e905f commit eabe29d

2 files changed

Lines changed: 9 additions & 4 deletions

File tree

drivers/gpu/drm/apple/audio.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -494,11 +494,16 @@ static void dcpaud_set_card_names(struct dcp_audio *dcpaud)
494494
strscpy(card->shortname, "Apple DisplayPort", sizeof(card->shortname));
495495
}
496496

497+
extern bool hdmi_audio;
498+
497499
static int dcpaud_init_snd_card(struct dcp_audio *dcpaud)
498500
{
499501
int ret;
500502
struct dma_chan *chan;
501503

504+
if (!hdmi_audio)
505+
return -ENODEV;
506+
502507
chan = of_dma_request_slave_channel(dcpaud->dev->of_node, "tx");
503508
/* squelch dma channel request errors, the driver will try again alter */
504509
if (!chan) {

drivers/gpu/drm/apple/dcp.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ static bool show_notch;
4646
module_param(show_notch, bool, 0644);
4747
MODULE_PARM_DESC(show_notch, "Use the full display height and shows the notch");
4848

49-
static bool noaudio;
50-
module_param(noaudio, bool, 0644);
51-
MODULE_PARM_DESC(noaudio, "Skip audio support");
49+
bool hdmi_audio;
50+
module_param(hdmi_audio, bool, 0644);
51+
MODULE_PARM_DESC(hdmi_audio, "Enable unstable HDMI audio support");
5252

5353
/* HACK: moved here to avoid circular dependency between apple_drv and dcp */
5454
void dcp_drm_crtc_vblank(struct apple_crtc *crtc)
@@ -413,7 +413,7 @@ int dcp_start(struct platform_device *pdev)
413413
dev_err(dcp->dev, "Failed to start IOMFB endpoint: %d\n", ret);
414414

415415
#if IS_ENABLED(CONFIG_DRM_APPLE_AUDIO)
416-
if (!noaudio) {
416+
if (hdmi_audio) {
417417
ret = avep_init(dcp);
418418
if (ret)
419419
dev_warn(dcp->dev, "Failed to start AV endpoint: %d", ret);

0 commit comments

Comments
 (0)