diff options
author | Takashi Iwai <tiwai@suse.de> | 2015-09-29 22:30:32 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2015-09-29 22:30:32 +0200 |
commit | 6b3a2350e7084acb6a1fd522c96a65020035ea81 (patch) | |
tree | d6b2150ec1e78a299a2d458e21747d60c615fced | |
parent | f6ef62aa43ea98dc956026c8c7c941d97fcc307b (diff) | |
download | alsa-driver-build-unstable-6b3a2350e7084acb6a1fd522c96a65020035ea81.tar.gz |
Patch pci/hda/patch_hdmi.c for i915 audio ops builds
... for builds with 4.3 or earlier kernels.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r-- | alsa/.gitignore | 1 | ||||
-rw-r--r-- | alsa/pci/hda/Makefile | 3 | ||||
-rw-r--r-- | alsa/pci/hda/patch_hdmi.c | 3 | ||||
-rw-r--r-- | alsa/pci/hda/patch_hdmi.patch | 76 |
4 files changed, 79 insertions, 4 deletions
diff --git a/alsa/.gitignore b/alsa/.gitignore index 1c15e5086..4625a7999 100644 --- a/alsa/.gitignore +++ b/alsa/.gitignore @@ -115,6 +115,7 @@ pci/emu10k1/emu10k1x.c pci/fm801.c pci/hda/hda_beep.c pci/hda/hda_intel.c +pci/hda/patch_hdmi.c pci/intel8x0.c pci/korg1212/korg1212.c pci/maestro3.c diff --git a/alsa/pci/hda/Makefile b/alsa/pci/hda/Makefile index 0be5bc577..7ec9fee4a 100644 --- a/alsa/pci/hda/Makefile +++ b/alsa/pci/hda/Makefile @@ -5,7 +5,7 @@ endif include $(SND_TOPDIR)/toplevel.config include $(SND_TOPDIR)/Makefile.conf -clean-files := hda_intel.c hda_beep.c +clean-files := hda_intel.c hda_beep.c patch_hdmi.c EXTRA_CFLAGS += -I$(SND_TOPDIR)/alsa-kernel/pci/hda @@ -24,3 +24,4 @@ include $(SND_TOPDIR)/Rules.make hda_intel.c: hda_intel.patch $(SND_TOPDIR)/alsa-kernel/pci/hda/hda_intel.c hda_beep.c: hda_beep.patch $(SND_TOPDIR)/alsa-kernel/pci/hda/hda_beep.c +patch_hdmi.c: patch_hdmi.patch $(SND_TOPDIR)/alsa-kernel/pci/hda/patch_hdmi.c diff --git a/alsa/pci/hda/patch_hdmi.c b/alsa/pci/hda/patch_hdmi.c deleted file mode 100644 index 68d42a7b0..000000000 --- a/alsa/pci/hda/patch_hdmi.c +++ /dev/null @@ -1,3 +0,0 @@ -#define __NO_VERSION__ -#include "adriver.h" -#include "../../alsa-kernel/pci/hda/patch_hdmi.c" diff --git a/alsa/pci/hda/patch_hdmi.patch b/alsa/pci/hda/patch_hdmi.patch new file mode 100644 index 000000000..3fd9f5632 --- /dev/null +++ b/alsa/pci/hda/patch_hdmi.patch @@ -0,0 +1,76 @@ +--- ../../alsa-kernel/pci/hda/patch_hdmi.c 2015-09-25 10:08:21.842439055 +0200 ++++ patch_hdmi.c 2015-09-29 22:28:08.851217112 +0200 +@@ -1,3 +1,4 @@ ++#include "adriver.h" + /* + * + * patch_hdmi.c - routines for HDMI/DisplayPort codecs +@@ -38,7 +39,9 @@ + #include <sound/asoundef.h> + #include <sound/tlv.h> + #include <sound/hdaudio.h> ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 3, 0) + #include <sound/hda_i915.h> ++#endif + #include "hda_codec.h" + #include "hda_local.h" + #include "hda_jack.h" +@@ -147,8 +150,10 @@ + struct hda_multi_out multiout; + struct hda_pcm_stream pcm_playback; + ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 3, 0) + /* i915/powerwell (Haswell+/Valleyview+) specific */ + struct i915_audio_component_audio_ops i915_audio_ops; ++#endif + }; + + +@@ -1802,7 +1807,9 @@ + struct hdmi_spec_per_pin *per_pin = get_pin(spec, pin_idx); + hda_nid_t pin_nid = per_pin->pin_nid; + struct snd_pcm_runtime *runtime = substream->runtime; ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 4, 0) + struct i915_audio_component *acomp = codec->bus->core.audio_component; ++#endif + bool non_pcm; + int pinctl; + +@@ -1819,12 +1826,14 @@ + intel_not_share_assigned_cvt(codec, pin_nid, per_pin->mux_idx); + } + ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 4, 0) + /* Call sync_audio_rate to set the N/CTS/M manually if necessary */ + /* Todo: add DP1.2 MST audio support later */ + if (acomp && acomp->ops && acomp->ops->sync_audio_rate) + acomp->ops->sync_audio_rate(acomp->dev, + intel_pin2port(pin_nid), + runtime->rate); ++#endif + + non_pcm = check_non_pcm_per_cvt(codec, cvt_nid); + mutex_lock(&per_pin->lock); +@@ -2215,8 +2224,10 @@ + struct hdmi_spec *spec = codec->spec; + int pin_idx; + ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 3, 0) + if (is_haswell_plus(codec) || is_valleyview_plus(codec)) + snd_hdac_i915_register_notifier(NULL); ++#endif + + for (pin_idx = 0; pin_idx < spec->num_pins; pin_idx++) { + struct hdmi_spec_per_pin *per_pin = get_pin(spec, pin_idx); +@@ -2379,9 +2390,11 @@ + + if (is_haswell_plus(codec) || is_valleyview_plus(codec)) { + codec->depop_delay = 0; ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 3, 0) + spec->i915_audio_ops.audio_ptr = codec; + spec->i915_audio_ops.pin_eld_notify = intel_pin_eld_notify; + snd_hdac_i915_register_notifier(&spec->i915_audio_ops); ++#endif + } + + if (hdmi_parse_codec(codec) < 0) { |