19 Dec, 2012

2 commits

  • This patch is the result of a lot of trial and error, since there are no specs
    available for the device.

    Full duplex support is provided, i.e. playback and recording in stereo.
    The format is hardcoded at 48000Hz @ 24 bit, which is the maximum that the
    device supports. Also, MIDI in and MIDI out both work.

    Users will notice that the S/PDIF light also flashes when playback or recording
    is active. I believe this means that S/PDIF input/output is simultaneously
    activated with the analogue i/o during use.
    But this particular functionality remains untested.

    Note that this particular version of the patch is so far untested on the
    physical hardware because I have not compiled a full kernel with the changes.
    However, extensive testing has been done by many users of the hardware
    who believe other versions of my patch have worked since circa 2009.

    [Modified to make a function static by tiwai]

    Signed-off-by: Damien Zammit
    Signed-off-by: Takashi Iwai

    Damien Zammit
     
  • Resuming a switcheroo'd HDA controller hangs since the completion
    is one-shot (thus works the first time). Fix by using completions
    that explictly need rearming, so remain fired before.

    Signed-off-by: Daniel J Blueman
    Signed-off-by: Takashi Iwai

    Daniel J Blueman
     

18 Dec, 2012

3 commits


17 Dec, 2012

1 commit


15 Dec, 2012

9 commits


14 Dec, 2012

1 commit

  • We've seen the broken HDMI *video* output on some machines with GM965,
    and the debugging session pointed that the culprit is the disabled
    audio output pins. Toggling these pins dynamically on demand caused
    flickering of HDMI TV.

    This patch changes the behavior to keep the pin ON constantly.

    Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=51421

    Cc:
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

13 Dec, 2012

1 commit


12 Dec, 2012

6 commits

  • The runtime_idle callback is the right place to check the suspend
    capability, but currently we do it wrongly in the runtime_suspend
    callback. This leads to a kernel error message like:
    pci_pm_runtime_suspend(): azx_runtime_suspend+0x0/0x50 [snd_hda_intel] returns -11
    and the runtime PM core would even repeat the attempts.

    Reported-and-tested-by: Borislav Petkov
    Cc: [v3.7]
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     
  • Acer Aspire One 522 has the infamous digital mic unit that needs the
    phase inversion fixup for stereo.

    Bugzilla: https://bugzilla.novell.com/show_bug.cgi?id=715737

    Cc:
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     
  • The HD-audio driver artificially calls the suspend and the resume code
    path in the VGA switcheroo state changes. When a machine goes to
    suspend, it tries to suspend the device again, and it stalls at
    snd_power_wait().

    This patch adds checks whether the devices were already in (forced)
    suspend in PM callbacks for avoiding the doubly suspend.

    Reported-by: Daniel J Blueman
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     
  • The only required change is to extend the existing Xonar U1
    mixer quirks to the U3, which seems to be controlled the same
    way.

    Signed-off-by: Denis Washington
    Signed-off-by: Takashi Iwai

    Denis Washington
     
  • When the HD-audio controller is disabled (e.g. via vga switcheroo) but
    the driver is still accessing it, it spews floods of "spurious
    response" kernel messages. It's because CORB/RIRB WP reads 0xff, and
    the driver tries to fill up until this number.

    This patch changes the CORB/RIRB WP reads to word instead of byte, and
    add the check of the read value. If it's 0xffff, the controller is
    supposed to be disabled, so the further action will be skipped.

    Signed-off-by: Takashi Iwai

    Takashi Iwai
     
  • Reducing the time on HDA link reset can help to reduce the driver loading
    time. So we replace msleep with usleep_range to get more accurate time
    control and change the value to a smaller one. And a 100ms timeout is set
    for both entering and exiting the link reset.

    Signed-off-by: Xingchao Wang
    Signed-off-by: Mengdong Lin
    Signed-off-by: Takashi Iwai

    Mengdong Lin
     

11 Dec, 2012

6 commits

  • Linus Torvalds
     
  • The matrix-keymap module is currently lacking a proper module license,
    add one so we don't have this module tainting the entire kernel. This
    issue has been present since commit 1932811f426f ("Input: matrix-keymap
    - uninline and prepare for device tree support")

    Signed-off-by: Florian Fainelli
    CC: stable@vger.kernel.org # v3.5+
    Signed-off-by: Dmitry Torokhov
    Signed-off-by: Linus Torvalds

    Florian Fainelli
     
  • Pull networking fixes from David Miller:

    1) Netlink socket dumping had several missing verifications and checks.

    In particular, address comparisons in the request byte code
    interpreter could access past the end of the address in the
    inet_request_sock.

    Also, address family and address prefix lengths were not validated
    properly at all.

    This means arbitrary applications can read past the end of certain
    kernel data structures.

    Fixes from Neal Cardwell.

    2) ip_check_defrag() operates in contexts where we're in the process
    of, or about to, input the packet into the real protocols
    (specifically macvlan and AF_PACKET snooping).

    Unfortunately, it does a pskb_may_pull() which can modify the
    backing packet data which is not legal if the SKB is shared. It
    very much can be shared in this context.

    Deal with the possibility that the SKB is segmented by using
    skb_copy_bits().

    Fix from Johannes Berg based upon a report by Eric Leblond.

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net:
    ipv4: ip_check_defrag must not modify skb before unsharing
    inet_diag: validate port comparison byte code to prevent unsafe reads
    inet_diag: avoid unsafe and nonsensical prefix matches in inet_diag_bc_run()
    inet_diag: validate byte code to prevent oops in inet_diag_bc_run()
    inet_diag: fix oops for IPv4 AF_INET6 TCP SYN-RECV state

    Linus Torvalds
     
  • This reverts commits a50915394f1fc02c2861d3b7ce7014788aa5066e and
    d7c3b937bdf45f0b844400b7bf6fd3ed50bac604.

    This is a revert of a revert of a revert. In addition, it reverts the
    even older i915 change to stop using the __GFP_NO_KSWAPD flag due to the
    original commits in linux-next.

    It turns out that the original patch really was bogus, and that the
    original revert was the correct thing to do after all. We thought we
    had fixed the problem, and then reverted the revert, but the problem
    really is fundamental: waking up kswapd simply isn't the right thing to
    do, and direct reclaim sometimes simply _is_ the right thing to do.

    When certain allocations fail, we simply should try some direct reclaim,
    and if that fails, fail the allocation. That's the right thing to do
    for THP allocations, which can easily fail, and the GPU allocations want
    to do that too.

    So starting kswapd is sometimes simply wrong, and removing the flag that
    said "don't start kswapd" was a mistake. Let's hope we never revisit
    this mistake again - and certainly not this many times ;)

    Acked-by: Mel Gorman
    Acked-by: Johannes Weiner
    Cc: Rik van Riel
    Cc: Andrew Morton
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     
  • ip_check_defrag() might be called from af_packet within the
    RX path where shared SKBs are used, so it must not modify
    the input SKB before it has unshared it for defragmentation.
    Use skb_copy_bits() to get the IP header and only pull in
    everything later.

    The same is true for the other caller in macvlan as it is
    called from dev->rx_handler which can also get a shared SKB.

    Reported-by: Eric Leblond
    Cc: stable@vger.kernel.org
    Signed-off-by: Johannes Berg
    Signed-off-by: David S. Miller

    Johannes Berg
     
  • This reverts commit 782fd30406ecb9d9b082816abe0c6008fc72a7b0.

    We are going to reinstate the __GFP_NO_KSWAPD flag that has been
    removed, the removal reverted, and then removed again. Making this
    commit a pointless fixup for a problem that was caused by the removal of
    __GFP_NO_KSWAPD flag.

    The thing is, we really don't want to wake up kswapd for THP allocations
    (because they fail quite commonly under any kind of memory pressure,
    including when there is tons of memory free), and these patches were
    just trying to fix up the underlying bug: the original removal of
    __GFP_NO_KSWAPD in commit c654345924f7 ("mm: remove __GFP_NO_KSWAPD")
    was simply bogus.

    Signed-off-by: Linus Torvalds

    Linus Torvalds
     

10 Dec, 2012

11 commits

  • Add support for new codec VT1808, which is similiar with VT1705CF.

    Signed-off-by: Lydia Wang
    Signed-off-by: Takashi Iwai

    Lydia Wang
     
  • Add support for new codec VT1705CF.
    When power on/off Audio output converter of VT1705CF, the stream tag
    will be cleared. But driver caches the value. So when power on Audio
    output converter, the update_conv_power_state() will restore the saved
    stream tag of it.

    Signed-off-by: Lydia Wang
    Signed-off-by: Takashi Iwai

    Lydia Wang
     
  • ASoC: Updates for v3.8

    Some incremental updates, nothing too exciting. The biggest block here
    is the __dev annotation removal stuff from Bill, everything else is the
    usual driver-specific stuff - a combination of fixes and development.

    There will be at least more more set of fixes to come but I wanted to
    get these out ready for the merge window to make sure Bill's stuff makes
    it in.

    Takashi Iwai
     
  • Don't wrap log messages over multiple lines, it makes them hard to grep
    for.

    Signed-off-by: Mark Brown

    Mark Brown
     
  • Since VSP only has one power bit, only provide one DAPM widget.

    Signed-off-by: Paul Handrigan
    Signed-off-by: Mark Brown

    Paul Handrigan
     
  • Add power down delays between setting PDN and MCLKDIS for spk amp, spklo amp, and ear amp.

    Signed-off-by: Paul Handrigan
    Signed-off-by: Mark Brown

    Paul Handrigan
     
  • Signed-off-by: Paul Handrigan
    Signed-off-by: Mark Brown

    Paul Handrigan
     
  • The 'addr' field of the sigma_action struct is stored as big endian in the
    firmware file.

    Signed-off-by: Lars-Peter Clausen
    Signed-off-by: Mark Brown
    Cc: stable@vger.kernel.org

    Lars-Peter Clausen
     
  • Add logic to verify that a port comparison byte code operation
    actually has the second inet_diag_bc_op from which we read the port
    for such operations.

    Previously the code blindly referenced op[1] without first checking
    whether a second inet_diag_bc_op struct could fit there. So a
    malicious user could make the kernel read 4 bytes beyond the end of
    the bytecode array by claiming to have a whole port comparison byte
    code (2 inet_diag_bc_op structs) when in fact the bytecode was not
    long enough to hold both.

    Signed-off-by: Neal Cardwell
    Signed-off-by: David S. Miller

    Neal Cardwell
     
  • Add logic to check the address family of the user-supplied conditional
    and the address family of the connection entry. We now do not do
    prefix matching of addresses from different address families (AF_INET
    vs AF_INET6), except for the previously existing support for having an
    IPv4 prefix match an IPv4-mapped IPv6 address (which this commit
    maintains as-is).

    This change is needed for two reasons:

    (1) The addresses are different lengths, so comparing a 128-bit IPv6
    prefix match condition to a 32-bit IPv4 connection address can cause
    us to unwittingly walk off the end of the IPv4 address and read
    garbage or oops.

    (2) The IPv4 and IPv6 address spaces are semantically distinct, so a
    simple bit-wise comparison of the prefixes is not meaningful, and
    would lead to bogus results (except for the IPv4-mapped IPv6 case,
    which this commit maintains).

    Signed-off-by: Neal Cardwell
    Signed-off-by: David S. Miller

    Neal Cardwell
     
  • Add logic to validate INET_DIAG_BC_S_COND and INET_DIAG_BC_D_COND
    operations.

    Previously we did not validate the inet_diag_hostcond, address family,
    address length, and prefix length. So a malicious user could make the
    kernel read beyond the end of the bytecode array by claiming to have a
    whole inet_diag_hostcond when the bytecode was not long enough to
    contain a whole inet_diag_hostcond of the given address family. Or
    they could make the kernel read up to about 27 bytes beyond the end of
    a connection address by passing a prefix length that exceeded the
    length of addresses of the given family.

    Signed-off-by: Neal Cardwell
    Signed-off-by: David S. Miller

    Neal Cardwell