summaryrefslogtreecommitdiff
path: root/sound/x86
diff options
context:
space:
mode:
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>2017-01-31 23:16:53 +0300
committerTakashi Iwai <tiwai@suse.de>2017-02-01 18:22:25 +0300
commit0843e043cf2e5d12a4041efd9c794a213a3ef93b (patch)
tree6e57bc91b323100d96d04a5f2145a5695ddd5c28 /sound/x86
parent964ca8083c0239b5a729ed08c9f50b6c31ab3a93 (diff)
downloadlinux-0843e043cf2e5d12a4041efd9c794a213a3ef93b.tar.xz
ALSA: x86: Use config base depending on the pipe
Now the pipe that is being used is passed over i915 notification, we can re-setup the relevant register offset depending on pipe assignments during hotplug. This allows playback on single port machines such Zotac Pi330 or dual-port machines such as Dell Wyse 3040 box Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/x86')
-rw-r--r--sound/x86/intel_hdmi_lpe_audio.c26
1 files changed, 21 insertions, 5 deletions
diff --git a/sound/x86/intel_hdmi_lpe_audio.c b/sound/x86/intel_hdmi_lpe_audio.c
index cea05dfc081a..6d630f20bca8 100644
--- a/sound/x86/intel_hdmi_lpe_audio.c
+++ b/sound/x86/intel_hdmi_lpe_audio.c
@@ -463,6 +463,22 @@ static void notify_audio_lpe(void *audio_ptr)
} else if (eld != NULL) {
+ switch (eld->pipe_id) {
+ case 0:
+ ctx->had_config_offset = AUDIO_HDMI_CONFIG_A;
+ break;
+ case 1:
+ ctx->had_config_offset = AUDIO_HDMI_CONFIG_B;
+ break;
+ case 2:
+ ctx->had_config_offset = AUDIO_HDMI_CONFIG_C;
+ break;
+ default:
+ dev_dbg(&hlpe_pdev->dev, "Invalid pipe %d\n",
+ eld->pipe_id);
+ break;
+ }
+
hdmi_set_eld(eld->eld_data);
mid_hdmi_audio_signal_event(HAD_EVENT_HOT_PLUG);
@@ -560,15 +576,15 @@ static int hdmi_lpe_audio_probe(struct platform_device *pdev)
ctx->mmio_start = mmio_start;
ctx->tmds_clock_speed = DIS_SAMPLE_RATE_148_5;
- if (pci_dev_present(cherryview_ids)) {
+ if (pci_dev_present(cherryview_ids))
dev_dbg(&hlpe_pdev->dev, "%s: Cherrytrail LPE - Detected\n",
__func__);
- ctx->had_config_offset = AUDIO_HDMI_CONFIG_C;
- } else {
+ else
dev_dbg(&hlpe_pdev->dev, "%s: Baytrail LPE - Assume\n",
__func__);
- ctx->had_config_offset = AUDIO_HDMI_CONFIG_A;
- }
+
+ /* assume pipe A as default */
+ ctx->had_config_offset = AUDIO_HDMI_CONFIG_A;
pdata = pdev->dev.platform_data;