Commit 5e68d8e2 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab

media: au0828: use signals instead of hardcoding a pad number

When creating the audio link, use pad signals, instead of
hardcoding using the pad index number.
Acked-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
parent f3efe15a
......@@ -266,11 +266,13 @@ static void au0828_media_graph_notify(struct media_entity *new,
create_link:
if (decoder && mixer) {
ret = media_create_pad_link(decoder,
DEMOD_PAD_AUDIO_OUT,
mixer, 0,
MEDIA_LNK_FL_ENABLED);
if (ret)
ret = media_get_pad_index(decoder, false,
PAD_SIGNAL_AUDIO);
if (ret >= 0)
ret = media_create_pad_link(decoder, ret,
mixer, 0,
MEDIA_LNK_FL_ENABLED);
if (ret < 0)
dev_err(&dev->usbdev->dev,
"Mixer Pad Link Create Error: %d\n", ret);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment