aboutsummaryrefslogtreecommitdiff
path: root/sound/soc
diff options
context:
space:
mode:
authorTakashi Iwai2018-07-19 20:48:06 +0200
committerTakashi Iwai2018-07-19 20:48:14 +0200
commit7abeb64da6deeffa52f74e3b1e19d2c9e2c3ae6b (patch)
treea642c137668c6b4a9e24f42798abe15c16d0ef0f /sound/soc
parent58cabe8715f20b7fb33431bb1f2c5bd7a438b11b (diff)
parenta57942bfdd61b46df94021c9c33b8faaae5b65e1 (diff)
Merge branch 'topic/drm_audio_component' into for-next
Pull the generic drm_audio_component support, which will be used later for AMD/ATI and other HD-audio HDMI codec drivers. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/soc')
-rw-r--r--sound/soc/codecs/hdac_hdmi.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/sound/soc/codecs/hdac_hdmi.c b/sound/soc/codecs/hdac_hdmi.c
index 3e3a2a9ef310..4748a9d5de3b 100644
--- a/sound/soc/codecs/hdac_hdmi.c
+++ b/sound/soc/codecs/hdac_hdmi.c
@@ -1530,6 +1530,11 @@ free_widgets:
return ret;
}
+static int hdac_hdmi_pin2port(void *aptr, int pin)
+{
+ return pin - 4; /* map NID 0x05 -> port #1 */
+}
+
static void hdac_hdmi_eld_notify_cb(void *aptr, int port, int pipe)
{
struct hdac_device *hdev = aptr;
@@ -1583,7 +1588,8 @@ static void hdac_hdmi_eld_notify_cb(void *aptr, int port, int pipe)
}
-static struct i915_audio_component_audio_ops aops = {
+static struct drm_audio_component_audio_ops aops = {
+ .pin2port = hdac_hdmi_pin2port,
.pin_eld_notify = hdac_hdmi_eld_notify_cb,
};
@@ -1812,7 +1818,7 @@ static int hdmi_codec_probe(struct snd_soc_component *component)
return ret;
aops.audio_ptr = hdev;
- ret = snd_hdac_i915_register_notifier(&aops);
+ ret = snd_hdac_acomp_register_notifier(hdev->bus, &aops);
if (ret < 0) {
dev_err(&hdev->dev, "notifier register failed: err: %d\n", ret);
return ret;