15 Feb, 2017

1 commit

  • commit af677166cf63c179dc2485053166e02c4aea01eb upstream.

    Without this change, the HDMI/DP codec will be recognised as a
    generic codec, and there is no sound when playing through this codec.

    As suggested by NVidia side, after adding the new ID in the driver,
    the sound playing works well.

    Signed-off-by: Hui Wang
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Hui Wang
     

12 Jan, 2017

2 commits

  • commit c7efff9284dfde95a11aaa811c9d8ec8167f0f6e upstream.

    Although the old quirk table showed ASUS X71SL with ALC663 codec being
    compatible with asus-mode3 fixup, the bugzilla reporter explained that
    asus-model8 fits better for the dual headphone controls. So be it.

    Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=191781
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Takashi Iwai
     
  • commit 85bcf96caba8b4a7c0805555638629ba3c67ea0c upstream.

    ASUS ROG Ranger VIII with ALC1150 codec requires the extra GPIO pin to
    up for the front panel. Just use the existing fixup for setting up
    the GPIO pins.

    Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=189411
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Takashi Iwai
     

06 Jan, 2017

5 commits

  • commit 5e0ad0d8747f3e4803a9c3d96d64dd7332506d3c upstream.

    Commit [64047d7f4912 ALSA: hda - ignore the assoc and seq when comparing
    pin configurations] intented to ignore both seq and assoc at pin
    comparing, but it only ignored seq. So that commit may still fail to
    match pins on some machines.
    Change the bitmask to also ignore assoc.

    v2: Use macro to do bit masking.

    Thanks to Hui Wang for the analysis.

    Fixes: 64047d7f4912 ("ALSA: hda - ignore the assoc and seq when comparing...")
    Signed-off-by: Kai-Heng Feng
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Kai-Heng Feng
     
  • commit f73cd43ac3b41c0f09a126387f302bbc0d9c726d upstream.

    HP Z1 Gen3 AiO with Conexant codec doesn't give an unsolicited event
    to the headset mic pin upon the jack plugging, it reports only to the
    headphone pin. It results in the missing mic switching. Let's fix up
    by simply gating the jack event.

    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Takashi Iwai
     
  • commit 989dbe4a30728c047316ab87e5fa8b609951ce7c upstream.

    This group of new pins is not in the pin quirk table yet, adding
    them to the pin quirk table to fix the headset-mic problem.

    Signed-off-by: Hui Wang
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Hui Wang
     
  • commit 64047d7f4912de1769d1bf0d34c6322494b13779 upstream.

    More and more pin configurations have been adding to the pin quirk
    table, lots of them are only different from assoc and seq, but they
    all apply to the same QUIRK_FIXUP, if we don't compare assoc and seq
    when matching pin configurations, it will greatly reduce the pin
    quirk table size.

    We have tested this change on a couple of Dell laptops, it worked
    well.

    Signed-off-by: Hui Wang
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Hui Wang
     
  • commit b5337cfe067e96b8a98699da90c7dcd2bec21133 upstream.

    I'm using an Alienware 15 R2 and had to use the alienware quirks to
    get my headphone output working.

    I fixed it by adding, SND_PCI_QUIRK(0x1028, 0x0708, "Alienware 15 R2
    2016", QUIRK_ALIENWARE) to the patch.

    Signed-off-by: Sven Hahne
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Sven Hahne
     

11 Nov, 2016

1 commit

  • The commit [1a3f099101b8: ALSA: hda - Fix surround output pins for
    ASRock B150M mobo] introduced a fixup of pin configs for ASRock
    mobos to fix the surround outputs. However, this overrides the pin
    configs of the mic pins as if they are outputs-only, effectively
    disabling the mic inputs. Of course, it's a regression wrt mic
    functionality.

    Actually the pins 0x18 and 0x1a don't need to be changed; we just need
    to disable the bogus pins 0x14 and 0x15. Then the auto-parser will
    pick up mic pins as switchable and assign the surround outputs there.

    This patch removes the incorrect pin overrides of NID 0x18 and 0x1a
    from the ASRock fixup.

    Fixes: 1a3f099101b8 ('ALSA: hda - Fix surround output pins for ASRock...')
    Reported-and-tested-by: Vitor Antunes
    Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=187431
    Cc:
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

10 Nov, 2016

1 commit


25 Oct, 2016

1 commit


20 Oct, 2016

1 commit


18 Oct, 2016

3 commits

  • Some elements in hr are not cleared before being copied to user space,
    leaking kernel heap memory to user space. For example, this happens in
    the error handling code for the HPI_ADAPTER_DELETE case. Zero the memory
    before it's copied.

    Signed-off-by: Vlad Tsyrklevich
    Signed-off-by: Takashi Iwai

    Vlad Tsyrklevich
     
  • We have a new Dell laptop model which uses ALC295, the pin definition
    is different from the existing ones in the pin quirk table, to fix the
    headset mic detection and mic mute led's problem, we need to add the
    new pin defintion into the pin quirk table.

    Cc: stable@vger.kernel.org
    Signed-off-by: Hui Wang
    Signed-off-by: Takashi Iwai

    Hui Wang
     
  • Commit 49d9e77e72cf ("ALSA: hda - Fix system panic when DMA > 40 bits
    for Nvidia audio controllers") simply disabled any DMA exceeding 32
    bits for NVidia devices, even though they are capable of performing
    DMA up to 40 bits. On some architectures (such as arm64), system memory
    is not guaranteed to be 32-bit addressable by PCI devices, and so this
    change prevents NVidia devices from working on platforms such as AMD
    Seattle.

    Since the original commit already mentioned that up to 40 bits of DMA
    is supported, and given that the code has been updated in the meantime
    to support a 40 bit DMA mask on other devices, revert commit 49d9e77e72cf
    and explicitly set the DMA mask to 40 bits for NVidia devices.

    Fixes: 49d9e77e72cf ('ALSA: hda - Fix system panic when DMA > 40 bits...')
    Signed-off-by: Ard Biesheuvel
    Cc:
    Signed-off-by: Takashi Iwai

    Ard Biesheuvel
     

13 Oct, 2016

1 commit

  • On a Dell laptop, there is no global adcs for all input devices, so
    the input devices use the different adc, as a result, dyn_adc_switch
    is set to true.

    In this situation, it is safe to control the micmute led according to
    user's choice of muting/unmuting the current input device, since only
    current input device path is active, while other input device paths
    are inactive and powered down.

    Fixes: 00ef99408b6c ('ALSA: hda - add mic mute led hook for dell machines')
    Cc:
    Signed-off-by: Hui Wang
    Signed-off-by: Takashi Iwai

    Hui Wang
     

30 Sep, 2016

1 commit


27 Sep, 2016

1 commit

  • HP Spectre x360 with CX20724 codec has two speaker outputs while the
    BIOS sets up only the bottom one (NID 0x17) and disables the top one
    (NID 0x1d).

    This patch adds a fixup simply defining the proper pincfg for NID 0x1d
    so that the top speaker works as is.

    Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=169071
    Cc:
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

26 Sep, 2016

1 commit


21 Sep, 2016

1 commit

  • The pointer callbacks of ali5451 driver may return the value at the
    boundary occasionally, and it results in the kernel warning like
    snd_ali5451 0000:00:06.0: BUG: , pos = 16384, buffer size = 16384, period size = 1024

    It seems that folding the position offset is enough for fixing the
    warning and no ill-effect has been seen by that.

    Reported-by: Enrico Mioso
    Tested-by: Enrico Mioso
    Cc:
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

16 Sep, 2016

1 commit


12 Sep, 2016

1 commit

  • For structure types defined in the same file or local header files, find
    top-level static structure declarations that have the following
    properties:
    1. Never reassigned.
    2. Address never taken
    3. Not passed to a top-level macro call
    4. No pointer or array-typed field passed to a function or stored in a
    variable.
    Declare structures having all of these properties as const.

    Done using Coccinelle.
    Based on a suggestion by Joe Perches .

    Signed-off-by: Julia Lawall
    Signed-off-by: Takashi Iwai

    Julia Lawall
     

11 Sep, 2016

2 commits


10 Sep, 2016

1 commit

  • Realtek codec driver expects an implicit rule where either the codec
    SSID or the pincfg NID 0x1d contains the some information encoded in
    some bits. One of the expected information is there is the
    availability of PC beep, and the driver doesn't build up the PC beep
    control if this is *supposed* to be disabled there.

    Meanwhile, Lenovo doesn't seem to follow this requirement (yes it's
    non-standard after all), and the BIOS sets just the normal SSID and
    the pincfg values. This resulted in the lack of PC beep on a few
    machines, purely with a lucky or unlucky number. It didn't bother
    most people, but some people still demand the PC beep, as found in bug
    reports.

    This patch just adds the fixup chain to Lenovo machines to skip the
    SKU checks. Then the beep control will show up in the mixer, and user
    can still decide to enable / disable it via the standard mixer
    interface.

    Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=156311
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

08 Sep, 2016

1 commit


02 Sep, 2016

5 commits

  • Check for snd_pcm_ops structures that are only stored in the ops field of a
    snd_soc_platform_driver structure or passed as the third argument to
    snd_pcm_set_ops. The corresponding field or parameter is declared const,
    so snd_pcm_ops structures that have this property can be declared as const
    also.

    The semantic patch that makes this change is as follows:
    (http://coccinelle.lip6.fr/)

    //
    @r disable optional_qualifier@
    identifier i;
    position p;
    @@
    static struct snd_pcm_ops i@p = { ... };

    @ok1@
    identifier r.i;
    struct snd_soc_platform_driver e;
    position p;
    @@
    e.ops = &i@p;

    @ok2@
    identifier r.i;
    expression e1, e2;
    position p;
    @@
    snd_pcm_set_ops(e1, e2, &i@p)

    @bad@
    position p != {r.p,ok1.p,ok2.p};
    identifier r.i;
    struct snd_pcm_ops e;
    @@
    e@i@p

    @depends on !bad disable optional_qualifier@
    identifier r.i;
    @@
    static
    +const
    struct snd_pcm_ops i = { ... };
    //

    Signed-off-by: Julia Lawall
    Acked-by: Clemens Ladisch
    Signed-off-by: Takashi Iwai

    Julia Lawall
     
  • Check for snd_pcm_ops structures that are only stored in the ops field of a
    snd_soc_platform_driver structure or passed as the third argument to
    snd_pcm_set_ops. The corresponding field or parameter is declared const,
    so snd_pcm_ops structures that have this property can be declared as const
    also.

    The semantic patch that makes this change is as follows:
    (http://coccinelle.lip6.fr/)

    //
    @r disable optional_qualifier@
    identifier i;
    position p;
    @@
    static struct snd_pcm_ops i@p = { ... };

    @ok1@
    identifier r.i;
    struct snd_soc_platform_driver e;
    position p;
    @@
    e.ops = &i@p;

    @ok2@
    identifier r.i;
    expression e1, e2;
    position p;
    @@
    snd_pcm_set_ops(e1, e2, &i@p)

    @bad@
    position p != {r.p,ok1.p,ok2.p};
    identifier r.i;
    struct snd_pcm_ops e;
    @@
    e@i@p

    @depends on !bad disable optional_qualifier@
    identifier r.i;
    @@
    static
    +const
    struct snd_pcm_ops i = { ... };
    //

    Signed-off-by: Julia Lawall
    Acked-by: Clemens Ladisch
    Signed-off-by: Takashi Iwai

    Julia Lawall
     
  • Check for snd_pcm_ops structures that are only stored in the ops field of a
    snd_soc_platform_driver structure or passed as the third argument to
    snd_pcm_set_ops. The corresponding field or parameter is declared const,
    so snd_pcm_ops structures that have this property can be declared as const
    also.

    The semantic patch that makes this change is as follows:
    (http://coccinelle.lip6.fr/)

    //
    @r disable optional_qualifier@
    identifier i;
    position p;
    @@
    static struct snd_pcm_ops i@p = { ... };

    @ok1@
    identifier r.i;
    struct snd_soc_platform_driver e;
    position p;
    @@
    e.ops = &i@p;

    @ok2@
    identifier r.i;
    expression e1, e2;
    position p;
    @@
    snd_pcm_set_ops(e1, e2, &i@p)

    @bad@
    position p != {r.p,ok1.p,ok2.p};
    identifier r.i;
    struct snd_pcm_ops e;
    @@
    e@i@p

    @depends on !bad disable optional_qualifier@
    identifier r.i;
    @@
    static
    +const
    struct snd_pcm_ops i = { ... };
    //

    Signed-off-by: Julia Lawall
    Signed-off-by: Takashi Iwai

    Julia Lawall
     
  • Check for snd_pcm_ops structures that are only stored in the ops field of a
    snd_soc_platform_driver structure or passed as the third argument to
    snd_pcm_set_ops. The corresponding field or parameter is declared const,
    so snd_pcm_ops structures that have this property can be declared as const
    also.

    The semantic patch that makes this change is as follows:
    (http://coccinelle.lip6.fr/)

    //
    @r disable optional_qualifier@
    identifier i;
    position p;
    @@
    static struct snd_pcm_ops i@p = { ... };

    @ok1@
    identifier r.i;
    struct snd_soc_platform_driver e;
    position p;
    @@
    e.ops = &i@p;

    @ok2@
    identifier r.i;
    expression e1, e2;
    position p;
    @@
    snd_pcm_set_ops(e1, e2, &i@p)

    @bad@
    position p != {r.p,ok1.p,ok2.p};
    identifier r.i;
    struct snd_pcm_ops e;
    @@
    e@i@p

    @depends on !bad disable optional_qualifier@
    identifier r.i;
    @@
    static
    +const
    struct snd_pcm_ops i = { ... };
    //

    Signed-off-by: Julia Lawall
    Signed-off-by: Takashi Iwai

    Julia Lawall
     
  • Check for snd_pcm_ops structures that are only stored in the ops field of a
    snd_soc_platform_driver structure or passed as the third argument to
    snd_pcm_set_ops. The corresponding field or parameter is declared const,
    so snd_pcm_ops structures that have this property can be declared as const
    also.

    The semantic patch that makes this change is as follows:
    (http://coccinelle.lip6.fr/)

    //
    @r disable optional_qualifier@
    identifier i;
    position p;
    @@
    static struct snd_pcm_ops i@p = { ... };

    @ok1@
    identifier r.i;
    struct snd_soc_platform_driver e;
    position p;
    @@
    e.ops = &i@p;

    @ok2@
    identifier r.i;
    expression e1, e2;
    position p;
    @@
    snd_pcm_set_ops(e1, e2, &i@p)

    @bad@
    position p != {r.p,ok1.p,ok2.p};
    identifier r.i;
    struct snd_pcm_ops e;
    @@
    e@i@p

    @depends on !bad disable optional_qualifier@
    identifier r.i;
    @@
    static
    +const
    struct snd_pcm_ops i = { ... };
    //

    Signed-off-by: Julia Lawall
    Signed-off-by: Takashi Iwai

    Julia Lawall
     

01 Sep, 2016

1 commit


30 Aug, 2016

2 commits


24 Aug, 2016

1 commit


22 Aug, 2016

1 commit


10 Aug, 2016

1 commit

  • For SKL and later Intel chips, we control the power well per codec
    basis via link_power callback since the commit [03b135cebc47: ALSA:
    hda - remove dependency on i915 power well for SKL].
    However, there are a few exceptional cases where the gfx registers are
    accessed from the audio driver: namely the wakeup override bit
    toggling at (both system and runtime) resume. This seems causing a
    kernel warning when accessed during the power well down (and likely
    resulting in the bogus register accesses).

    This patch puts the proper power up / down sequence around the resume
    code so that the wakeup bit is fiddled properly while the power is
    up. (The other callback, sync_audio_rate, is used only in the PCM
    callback, so it's guaranteed in the power-on.)

    Also, by this proper power up/down, the instantaneous flip of wakeup
    bit in the resume callback that was introduced by the commit
    [033ea349a7cd: ALSA: hda - Fix Skylake codec timeout] becomes
    superfluous, as snd_hdac_display_power() already does it. So we can
    clean it up together.

    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96214
    Fixes: 03b135cebc47 ('ALSA: hda - remove dependency on i915 power well for SKL')
    Cc: # v4.2+
    Tested-by: Hans de Goede
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

09 Aug, 2016

2 commits


04 Aug, 2016

1 commit

  • One of the machines has ALC255 on it, another one has ALC298 on it.

    On the machine with the codec ALC298, it also has the speaker volume
    problem, so we add the fixup chained to ALC298_FIXUP_SPK_VOLUME rather
    than adding a group of pin definition in the pin quirk table, since
    the speak volume problem does not happen on other machines yet.

    Cc:
    Signed-off-by: Hui Wang
    Signed-off-by: Takashi Iwai

    Hui Wang