05 Jan, 2015

1 commit


16 Sep, 2014

2 commits

  • Now we can register multiple callbacks to each jack, most of hooks
    used in STAC/IDT codecs can be removed by enabling the powermap update
    callback for all relevant pins. Along with this, the call of
    stac_init_power_map() can be moved back to stac_parse_auto_config()
    and the own build_controls callback can be removed, too.

    Signed-off-by: Takashi Iwai

    Takashi Iwai
     
  • So far, hda_jack infrastructure allows only one callback per jack, and
    this makes things slightly complicated when a driver wants to assign
    multiple tasks to a jack, e.g. the standard auto-mute with a power
    up/down sequence. This can be simplified if the hda_jack accepts
    multiple callbacks.

    This patch is such an extension: the callback-specific part (the
    function and private_data) is split to another struct from
    hda_jack_tbl, and multiple such objects can be assigned to a single
    hda_jack_tbl entry.

    The new struct hda_jack_callback is passed to each callback function
    now, thus the patch became bigger than expected. But these changes
    are mostly trivial.

    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

15 Sep, 2014

1 commit


11 Sep, 2014

3 commits

  • The action value assigned to each hda_jack_tbl entry is mostly
    superfluous. The actually used values are either the widget NID or a
    value specific to the callback.

    The former case can be simply replaced by a reference to widget NID
    itself. The only place doing the latter is STAC/IDT codec driver for
    the powermap handling. But, the code doesn't need to check the action
    field at all -- the function jack_update_power() is called either with
    a specific pin or with NULL. So the check of jack->action can be
    removed completely there, too.

    Signed-off-by: Takashi Iwai

    Takashi Iwai
     
  • Merging for-linus branch for syncing the latest STAC/IDT codec
    changes to be affected by the upcoming hda-jack rewrites.

    Takashi Iwai
     
  • When a driver is set up without the jack detection explicitly (either
    by passing a model option or via a specific fixup), the pin powermap
    of IDT/STAC codecs is set up wrongly, resulting in the silence
    output. It's because of a logic failure in stac_init_power_map().
    It tries to avoid creating a callback for the pins that have other
    auto-hp and auto-mic callbacks, but the check is done in a wrong way
    at a wrong time. The stac_init_power_map() should be called after
    creating other jack detection ctls, and the jack callback should be
    created only for jack-detectable widgets.

    This patch fixes the check in stac_init_power_map() and its callee
    at the right place, after snd_hda_gen_build_controls().

    Reported-by: Adam Richter
    Cc:
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

03 Sep, 2014

1 commit

  • The DACs on Sigmatel/IDT codecs do mute at the lowest volume level,
    and in the earlier drivers, we passed TLV_DB_SCALE_MUTE bit for each
    volume control element like Speaker and Headphone as well as Master.
    Along with the translation to the generic parser, however, the TLV bit
    was lost for the slave controls (e.g. Speaker) but set only to
    Master. In theory this should have sufficed, but apps, particularly
    PA, do care the slave volume bits, so we seem to see a regression in
    the volume controls.

    This patch adds a flag to hda_gen_spec to specify the DAC mute
    feature, and adds the TLV bit properly for all relevant volume
    controls. Also, the TLV bit for vmaster is set in hda_generic.c, so
    that we can get rid of all tricks from the codec driver side.

    As the similar hack is applied to Conexant 5051 stuff, we can get rid
    of it as well.

    BugLink: https://bugs.launchpad.net/bugs/1357928
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

04 Aug, 2014

1 commit


30 Jul, 2014

1 commit

  • ON the machine, two pin complex (0xb and 0xe) are both routed to
    the same external right-side mic jack, this makes the jack can't work.

    To fix this problem, set the 0xe to "not connected".

    BugLink: https://bugs.launchpad.net/bugs/1350148
    Tested-by: Franz Hsieh
    Cc: stable@vger.kernel.org
    Signed-off-by: Hui Wang
    Signed-off-by: Takashi Iwai

    Hui Wang
     

22 Jul, 2014

1 commit


15 Jul, 2014

1 commit


26 Jun, 2014

1 commit


25 Jun, 2014

2 commits

  • HP Spectre 13 has the IDT 92HD95 codec, and BIOS seems to set the
    default high-pass filter in some "safer" range, which results in the
    very soft tone from the built-in speakers in contrast to Windows.
    Also, the mute LED control is missing, since 92HD95 codec still has no
    HP-specific fixups for GPIO setups.

    This patch adds these missing features: the HPF is adjusted by the
    vendor-specific verb, and the LED is set up from a DMI string (but
    with the default polarity = 0 assumption due to the incomplete BIOS on
    the given machine).

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

    Takashi Iwai
     
  • Pass the codec object so that we can replace all the rest of
    snd_print*() usages with the proper device-specific print helpers.

    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

21 May, 2014

1 commit


27 Feb, 2014

1 commit

  • Many HP laptops with STAC codecs have a docking station port and BIOS
    sets the pins for the input on the dock as a line in. Because the
    generic parser doesn't handle a line in pin as auto-switchable, this
    resulted in the manual capture source selection on these laptops.

    However, from the usability POV, the automatic switching is easier.
    This patch adds the line_in_auto_switch hint in the fixup function for
    these laptops. Even if no dock port is present, this should be
    harmless as the generic parser allows the auto-switching only in a
    limited situation (all three pins are located in different
    positions).

    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

25 Feb, 2014

2 commits

  • Use dev_err() and co for messages from HD-audio controller and codec
    drivers. The codec drivers are mostly bound with codec objects, so
    some helper macros, codec_err(), codec_info(), etc, are provided.
    They merely wrap the corresponding dev_xxx().

    There are a few places still calling snd_printk() and its variants
    as they are called without the codec or device context.

    Signed-off-by: Takashi Iwai

    Takashi Iwai
     
  • HP Folio 13 may have a broken BIOS that doesn't set up the mute LED
    GPIO properly, and the driver guesses it wrongly, too. Add a new
    fixup entry for setting the GPIO pin statically for this laptop.

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

    Takashi Iwai
     

20 Feb, 2014

1 commit

  • The front headphone and mic jackes on a HP desktop model (Vendor Id:
    0x111d76c7 Subsystem Id: 0x103c2b17) can not work, the codec on this
    machine has 8 physical ports, 6 of them are routed to rear jackes
    and all of them work very well, while the remaining 2 ports are
    routed to front headphone and mic jackes, but the corresponding
    pin complex node are not defined correctly.

    After apply this fix, the front audio jackes can work very well.

    [trivial fix of enum definition by tiwai]

    BugLink: https://bugs.launchpad.net/bugs/1282369
    Cc: David Henningsson
    Tested-by: Gerald Yang
    Cc: stable@vger.kernel.org
    Signed-off-by: Hui Wang
    Signed-off-by: Takashi Iwai

    Hui Wang
     

07 Feb, 2014

1 commit

  • The current code for controlling mic mute LED in patch_sigmatel.c
    blindly assumes that there is a single capture switch. But, there can
    be multiple multiple ones, and each of them flips the state, ended up
    in an inconsistent state.

    For fixing this problem, this patch adds kcontrol to be passed to the
    hook function so that the callee can check which switch is being
    accessed. In stac_capture_led_hook(), the state is checked as a
    bitmask, and turns on the LED when all capture switches are off.

    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

13 Jan, 2014

1 commit


26 Nov, 2013

1 commit


15 Nov, 2013

1 commit


24 Oct, 2013

1 commit

  • When HP laptops with mute and mic-record LEDs go to runtime suspend,
    these LEDs are turned on forcibly no matter whether GPIO pis are on or
    off. This strange behavior seems triggered by resetting the HD-audio
    bus link at azx_rutime_suspend(). So, just add a new hda_bus flag to
    avoid the link reset at runtime suspend and set it for these HP
    machines.

    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

23 Aug, 2013

1 commit

  • ASoC: Updates for v3.12

    - DAPM is now mandatory for CODEC drivers in order to avoid the repeated
    regressions in the special cases for non-DAPM CODECs and make it
    easier to integrate with other components on boards. All existing
    drivers have had some level of DAPM support added.
    - A lot of cleanups in DAPM plus support for maintaining controls in a
    specific state while a DAPM widget all contributed by Lars-Peter Clausen.
    - Core helpers for bitbanged AC'97 reset from Markus Pargmann.
    - New drivers and support for Analog Devices ADAU1702 and ADAU1401(a),
    Asahi Kasei Microdevices AK4554, Atmel AT91ASM9x5 and WM8904 based
    machines, Freescale S/PDIF and SSI AC'97, Renesas R-Car SoCs, Samsung
    Exynos5420 SoCs, Texas Instruments PCM1681 and PCM1792A and Wolfson
    Microelectronics WM8997.
    - Support for building drivers that can support it cross-platform for
    compile test.

    Takashi Iwai
     

02 Aug, 2013

1 commit

  • A fixup for Apple Mac Mini was lost during the adaption to the generic
    parser because the fallback for the generic ID 8384:7680 was dropped,
    and it resulted in the silence output (and maybe other problems).

    Unfortunately, just adding the missing subsystem ID wasn't enough, in
    this case. The subsystem ID of this machine is 0000:0100 (what Apple
    thought...?), and since snd_hda_pick_fixup() doesn't take the vendor
    id zero into account, the driver ignored this entry. Now it's fixed
    to regard the vendor id zero as a valid value.

    Reported-and-tested-by: Linus Torvalds
    Cc: [v3.9+]
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

29 Jul, 2013

1 commit

  • The current fixup for dell-bios model with STAC9228 codec contains the
    override of pin 0x0c for analog mic. But this is actually just adding
    a bogus pin and confuses the parser. Better to remove it for the
    auto-mic switching.

    Meanwhile, for a possible regression, keep the old configuration as
    model=dell-bios-amic, so that people can test it again quickly.

    Tested on Dell 1420n laptop.

    Reported-and-tested-by: Eric Shattow
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

19 Jul, 2013

2 commits

  • The quirk for Dell laptops with STAC9228 overrides the pin default
    config of NID 0x0f to the value with AC_DEFCFG_MISC_NO_PRESENCE bit
    on. I'm not quite sure why this was done so, but can guess that this
    was introduced for avoiding this to be muted by another headphone
    plug. Now, after transition to the generic parser, this workaround
    rather causes a problem (notably as unexpected speaker mutes) because
    the pin is seen as if it's always plugged in.

    Since the generic parser can handle multiple headphone plugging
    gracefully, we can get rid of this override now.

    Reported-and-tested-by: Eric Shattow
    Cc: [v3.9+]
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     
  • The EAPD GPIO is dynamically turned on/off for some machines with
    Sigmatel codecs, but this didn't work as expected, and it resulted in
    spontaneous lost of speaker outputs per HP plugging or power-saving.

    This patch fixes the bug by simply including spec->eapd_mask into
    spec->gpio_mask and spec->gpio_data bits.

    Reported-and-tested-by: Eric Shattow
    Cc: [v3.9+]
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

25 Jun, 2013

1 commit


28 May, 2013

1 commit


22 Mar, 2013

1 commit


18 Mar, 2013

2 commits


14 Mar, 2013

2 commits

  • If there are no internal speakers, we should not turn the eapd switch
    off, because it might be necessary to keep high for Headphone.

    BugLink: https://bugs.launchpad.net/bugs/1155016
    Signed-off-by: David Henningsson
    Signed-off-by: Takashi Iwai

    David Henningsson
     
  • So far, the driver doesn't power down the widget at going down to D3
    when the widget node has an EAPD capability and EAPD is actually set
    on all codecs unless codec->power_filter is set explicitly.
    This caused a problem on some Conexant codecs, leading to click
    noises, and we set it as NULL there. But it is very unlikely that the
    problem hits only these codecs.

    Looking back at the development history, this workaround for EAPD was
    introduced just for some laptops with STAC9200 codec, then we applied
    it blindly for all. Now, since it's revealed to have an ill effect,
    we should disable this workaround per default and apply only for the
    known requiring systems.

    The EAPD workaround is implemented now as snd_hda_codec_eapd_power_filter(),
    and this has to be set explicitly by the codec driver when needed.
    As of now, only patch_stac9200() sets this one.

    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

06 Feb, 2013

1 commit


01 Feb, 2013

1 commit


28 Jan, 2013

1 commit