Basically, I did the same thing as "amixer -c 0 set 'Headphone Mic
Boost',0 1", and make the mic pin hidden as well. Otherwise, user space
tools will change the value.

According to Kailang, the "Audio hiss" also happens on Windows - but
windows has Noise Suppression filter, so it's not as noticeable as other
OS.

So there are two ways to workaround the issue - use something like diff
below, or use noise cancellation filter in PA.

diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 1aa21d7e7245..23373d6dc5a4 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -4553,6 +4553,16 @@ static void alc271_hp_gate_mic_jack(struct hda_codec 
*codec,
        }
 }
 
+static void alc_fixup_dell_xps_9350(struct hda_codec *codec,
+                                   const struct hda_fixup *fix,
+                                   int action)
+{
+       if (action != HDA_FIXUP_ACT_PROBE)
+               return;
+
+       snd_hda_codec_amp_stereo(codec, 0x1a, HDA_INPUT, 0, HDA_AMP_VOLMASK, 1);
+}
+
 static void alc269_fixup_limit_int_mic_boost(struct hda_codec *codec,
                                             const struct hda_fixup *fix,
                                             int action)
@@ -4861,6 +4871,7 @@ enum {
        ALC298_FIXUP_DELL_AIO_MIC_NO_PRESENCE,
        ALC275_FIXUP_DELL_XPS,
        ALC256_FIXUP_DELL_XPS_13_HEADPHONE_NOISE,
+       ALC256_FIXUP_DELL_XPS_9350,
        ALC293_FIXUP_LENOVO_SPK_NOISE,
        ALC233_FIXUP_LENOVO_LINE2_MIC_HOTKEY,
        ALC255_FIXUP_DELL_SPK_NOISE,
@@ -5500,7 +5511,13 @@ static const struct hda_fixup alc269_fixups[] = {
                        {}
                },
                .chained = true,
-               .chain_id = ALC255_FIXUP_DELL1_MIC_NO_PRESENCE
+               .chain_id = ALC255_FIXUP_DELL2_MIC_NO_PRESENCE
+       },
+       [ALC256_FIXUP_DELL_XPS_9350] = {
+               .type = HDA_FIXUP_FUNC,
+               .v.func = alc_fixup_dell_xps_9350,
+               .chained = true,
+               .chain_id = ALC256_FIXUP_DELL_XPS_13_HEADPHONE_NOISE
        },
        [ALC293_FIXUP_LENOVO_SPK_NOISE] = {
                .type = HDA_FIXUP_FUNC,
@@ -5622,10 +5639,10 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
        SND_PCI_QUIRK(0x1028, 0x06de, "Dell", 
ALC293_FIXUP_DISABLE_AAMIX_MULTIJACK),
        SND_PCI_QUIRK(0x1028, 0x06df, "Dell", 
ALC293_FIXUP_DISABLE_AAMIX_MULTIJACK),
        SND_PCI_QUIRK(0x1028, 0x06e0, "Dell", 
ALC293_FIXUP_DISABLE_AAMIX_MULTIJACK),
-       SND_PCI_QUIRK(0x1028, 0x0704, "Dell XPS 13 9350", 
ALC256_FIXUP_DELL_XPS_13_HEADPHONE_NOISE),
+       SND_PCI_QUIRK(0x1028, 0x0704, "Dell XPS 13 9350", 
ALC256_FIXUP_DELL_XPS_9350),
        SND_PCI_QUIRK(0x1028, 0x0706, "Dell Inspiron 7559", 
ALC256_FIXUP_DELL_INSPIRON_7559_SUBWOOFER),
        SND_PCI_QUIRK(0x1028, 0x0725, "Dell Inspiron 3162", 
ALC255_FIXUP_DELL_SPK_NOISE),
-       SND_PCI_QUIRK(0x1028, 0x075b, "Dell XPS 13 9360", 
ALC256_FIXUP_DELL_XPS_13_HEADPHONE_NOISE),
+       SND_PCI_QUIRK(0x1028, 0x075b, "Dell XPS 13 9360", 
ALC256_FIXUP_DELL_XPS_9350),
        SND_PCI_QUIRK(0x1028, 0x075d, "Dell AIO", ALC298_FIXUP_SPK_VOLUME),
        SND_PCI_QUIRK(0x1028, 0x0798, "Dell Inspiron 17 7000 Gaming", 
ALC256_FIXUP_DELL_INSPIRON_7559_SUBWOOFER),
        SND_PCI_QUIRK(0x1028, 0x164a, "Dell", 
ALC293_FIXUP_DELL1_MIC_NO_PRESENCE),

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1654448

Title:
  XPS 13 9360 and 9350, Realtek ALC3246, Headphone audio hiss

Status in Dell Sputnik:
  Confirmed
Status in alsa-driver package in Ubuntu:
  Confirmed
Status in linux package in Ubuntu:
  In Progress
Status in pulseaudio package in Ubuntu:
  Confirmed

Bug description:
  Pertaining to 16.04 on a dell XPS 13 9360

  ii  alsa-base                                     1.0.25+dfsg-0ubuntu5

  Advanced Linux Sound Architecture Driver Version k4.4.0-57-generic.

  
  When headphones are plugged in, there is a clearly audible hiss (white 
noise). This is present as soon as the headphones are plugged in, whether 
'headphones' or 'headset' are selected from the pop-up box. 

  Using alsamixer to debug the issue reveals that it is related to
  "Headphone Mic Boost" - the default setting is: dB gain 0.00, 0.00. If
  this is changed to:

  10.00, 10.00 (one notch up) the hiss disappears. 
  20.00, 20.00 cause a louder hiss and 
  30.00, 30.00 causes an even louder hiss with high frequency audio artifacts. 

  When the headphones are removed and plugged back in the Headphone Mic
  Boost setting returns to dB gain 0 and the problem also returns.

  This (problem and workaround) has been reported in the wild:
  https://news.ycombinator.com/item?id=13050843 and
  
https://www.reddit.com/r/Dell/comments/4j1zz4/headphones_have_static_noise_with_ubuntu_1604_on/
  for example

To manage notifications about this bug go to:
https://bugs.launchpad.net/dell-sputnik/+bug/1654448/+subscriptions

-- 
Mailing list: https://launchpad.net/~kernel-packages
Post to     : kernel-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kernel-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to