Re: [alsa-devel] [Intel-gfx] [PATCH 15/19] drm/i915: HSW cdclk support
On Thu, Apr 09, 2015 at 04:41:26PM +0300, Mika Kahola wrote:
On Thu, 2015-04-09 at 11:32 +0200, Daniel Vetter wrote:
On Thu, Apr 09, 2015 at 10:24:24AM +0300, Mika Kahola wrote:
I did some testing on audio part with HDMI-HDMI and DP-HDMI cables connected to my Haswell box. Before applying the patch I tested as a reference with the latest -nightly (04-08-2015), 4.0-rc7. Unfortunately, I failed to get any audio over HDMI cable. For a reference I tested with the very same setup the vanillla kernel from Linus tree 4.0-rc7 and with that kernel the audio worked ok. Then I did some GIT bisecting and it turned out that the first commit that I failed to get audio working was aa2fee4286e43b4784982b17669b02cc99c1ae55.
I rerun the bisecting and this time the result was
commit 0a599838737a2527c35e4d94f794aefe59df1781 Merge: 2d846c7 a59d719 Author: Takashi Iwai tiwai@suse.de Date: Wed Apr 8 11:29:56 2015 +0200
Merge branch 'for-linus' into for-next Back merge HD-audio quirks to for-next branch, so that we can apply a couple of more quirks. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Adding Takashi and intel audio folks. -Daniel
I don't have this sha1 anywhere. Can you please double-check?
Also to avoid such issues please always add at least the commit subject and author, so that I can find it if it's somehow rebased. -Daniel
To test this patch audio functionality I checkout the -nightly version that works for me and apply the patch and test it. I'll come back with the results later on.
I had the module option i915.disable_power_well=0
The test routine that I used for audio testing was speaker-test -c 2 -r 48000 -f S16_LE -t pink --device=plughw:0,3
On Tue, 2015-04-07 at 15:52 +0200, Daniel Vetter wrote:
On Tue, Apr 07, 2015 at 12:29:25PM +0300, Mika Kahola wrote:
Definitely a good idea to check the audio part as well if there is a doubt that by changing CD clock the audio would fail. I can check this and I'll get back once I have the results.
We force a full modeset, which should result in an interrupt on the audio side, which should result in the audio driver re-reading the current cdclk. If that's no the case it's buggy already. -Daniel
-- Mika Kahola, Intel OTC
-- Mika Kahola, Intel OTC
At Thu, 9 Apr 2015 15:51:27 +0200, Daniel Vetter wrote:
On Thu, Apr 09, 2015 at 04:41:26PM +0300, Mika Kahola wrote:
On Thu, 2015-04-09 at 11:32 +0200, Daniel Vetter wrote:
On Thu, Apr 09, 2015 at 10:24:24AM +0300, Mika Kahola wrote:
I did some testing on audio part with HDMI-HDMI and DP-HDMI cables connected to my Haswell box. Before applying the patch I tested as a reference with the latest -nightly (04-08-2015), 4.0-rc7. Unfortunately, I failed to get any audio over HDMI cable. For a reference I tested with the very same setup the vanillla kernel from Linus tree 4.0-rc7 and with that kernel the audio worked ok. Then I did some GIT bisecting and it turned out that the first commit that I failed to get audio working was aa2fee4286e43b4784982b17669b02cc99c1ae55.
I rerun the bisecting and this time the result was
commit 0a599838737a2527c35e4d94f794aefe59df1781 Merge: 2d846c7 a59d719 Author: Takashi Iwai tiwai@suse.de Date: Wed Apr 8 11:29:56 2015 +0200
Merge branch 'for-linus' into for-next Back merge HD-audio quirks to for-next branch, so that we can apply a couple of more quirks. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Adding Takashi and intel audio folks.
The bisecting looks odd. The commit you pointed is a back-merge from 4.0-rc to next branch, so this merge itself shouldn't bring so many stuff -- at least about the sound part.
The diff in sound/* is found below. As you can see, the only change relevant with HDMI is the chunk in sound/pci/hda/hda_intel.c for HD-audio controller, but it's specific to Skylake, thus this must be irrelevant with your hardware.
Please double-check.
thanks,
Takashi
=== % git diff 0a599838737a2527c35e4d94f794aefe59df1781^..0a599838737a2527c35e4d94f794aefe59df1781 sound diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index 9bcc5457a83e..e1c210515581 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c @@ -1967,7 +1967,7 @@ static const struct pci_device_id azx_ids[] = { .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_PCH }, /* Sunrise Point */ { PCI_DEVICE(0x8086, 0xa170), - .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_PCH }, + .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_SKYLAKE }, /* Sunrise Point-LP */ { PCI_DEVICE(0x8086, 0x9d70), .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_SKYLAKE }, diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index e0c06f9a0e80..7f46d063af57 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -396,7 +396,7 @@ static void alc_auto_setup_eapd(struct hda_codec *codec, bool on) { /* We currently only handle front, HP */ static hda_nid_t pins[] = { - 0x0f, 0x10, 0x14, 0x15, 0 + 0x0f, 0x10, 0x14, 0x15, 0x17, 0 }; hda_nid_t *p; for (p = pins; *p; p++) @@ -2870,6 +2870,8 @@ static void alc283_init(struct hda_codec *codec)
if (!hp_pin) return; + + msleep(30); hp_pin_sense = snd_hda_jack_detect(codec, hp_pin);
/* Index 0x43 Direct Drive HP AMP LPM Control 1 */ @@ -3564,6 +3566,7 @@ static void alc_headset_mode_unplugged(struct hda_codec *codec)
switch (codec->core.vendor_id) { case 0x10ec0255: + case 0x10ec0256: alc_process_coef_fw(codec, coef0255); break; case 0x10ec0233: @@ -3619,6 +3622,7 @@ static void alc_headset_mode_mic_in(struct hda_codec *codec, hda_nid_t hp_pin,
switch (codec->core.vendor_id) { case 0x10ec0255: + case 0x10ec0256: alc_write_coef_idx(codec, 0x45, 0xc489); snd_hda_set_pin_ctl_cache(codec, hp_pin, 0); alc_process_coef_fw(codec, coef0255); @@ -3688,6 +3692,7 @@ static void alc_headset_mode_default(struct hda_codec *codec)
switch (codec->core.vendor_id) { case 0x10ec0255: + case 0x10ec0256: alc_process_coef_fw(codec, coef0255); break; case 0x10ec0233: @@ -3742,6 +3747,7 @@ static void alc_headset_mode_ctia(struct hda_codec *codec)
switch (codec->core.vendor_id) { case 0x10ec0255: + case 0x10ec0256: alc_process_coef_fw(codec, coef0255); break; case 0x10ec0233: @@ -3796,6 +3802,7 @@ static void alc_headset_mode_omtp(struct hda_codec *codec)
switch (codec->core.vendor_id) { case 0x10ec0255: + case 0x10ec0256: alc_process_coef_fw(codec, coef0255); break; case 0x10ec0233: @@ -3841,6 +3848,7 @@ static void alc_determine_headset_type(struct hda_codec *codec)
switch (codec->core.vendor_id) { case 0x10ec0255: + case 0x10ec0256: alc_process_coef_fw(codec, coef0255); msleep(300); val = alc_read_coef_idx(codec, 0x46); @@ -4993,6 +5001,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = { SND_PCI_QUIRK(0x17aa, 0x501a, "Thinkpad", ALC283_FIXUP_INT_MIC), SND_PCI_QUIRK(0x17aa, 0x501e, "Thinkpad L440", ALC292_FIXUP_TPT440_DOCK), SND_PCI_QUIRK(0x17aa, 0x5026, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), + SND_PCI_QUIRK(0x17aa, 0x5036, "Thinkpad T450s", ALC292_FIXUP_TPT440_DOCK), SND_PCI_QUIRK(0x17aa, 0x5109, "Thinkpad", ALC269_FIXUP_LIMIT_INT_MIC_BOOST), SND_PCI_QUIRK(0x17aa, 0x3bf8, "Quanta FL1", ALC269_FIXUP_PCM_44K), SND_PCI_QUIRK(0x17aa, 0x9e54, "LENOVO NB", ALC269_FIXUP_LENOVO_EAPD), @@ -5173,6 +5182,16 @@ static const struct snd_hda_pin_quirk alc269_pin_fixup_tbl[] = { {0x17, 0x40000000}, {0x1d, 0x40700001}, {0x21, 0x02211050}), + SND_HDA_PIN_QUIRK(0x10ec0256, 0x1028, "Dell", ALC255_FIXUP_DELL1_MIC_NO_PRESENCE, + {0x12, 0x90a60140}, + {0x13, 0x40000000}, + {0x14, 0x90170110}, + {0x19, 0x411111f0}, + {0x1a, 0x411111f0}, + {0x1b, 0x411111f0}, + {0x1d, 0x40700001}, + {0x1e, 0x411111f0}, + {0x21, 0x02211020}), SND_HDA_PIN_QUIRK(0x10ec0280, 0x103c, "HP", ALC280_FIXUP_HP_GPIO4, {0x12, 0x90a60130}, {0x13, 0x40000000}, diff --git a/sound/usb/quirks.c b/sound/usb/quirks.c index 353532b8aee4..8f63e8c8b46c 100644 --- a/sound/usb/quirks.c +++ b/sound/usb/quirks.c @@ -1113,8 +1113,13 @@ void snd_usb_set_format_quirk(struct snd_usb_substream *subs,
bool snd_usb_get_sample_rate_quirk(struct snd_usb_audio *chip) { - /* MS Lifecam HD-5000 doesn't support reading the sample rate. */ - return chip->usb_id == USB_ID(0x045E, 0x076D); + /* devices which do not support reading the sample rate. */ + switch (chip->usb_id) { + case USB_ID(0x045E, 0x076D): /* MS Lifecam HD-5000 */ + case USB_ID(0x04D8, 0xFEEA): /* Benchmark DAC1 Pre */ + return true; + } + return false; }
/* Marantz/Denon USB DACs need a vendor cmd to switch
participants (2)
-
Daniel Vetter
-
Takashi Iwai