20 Aug, 2011

3 commits

  • The label outnodev is only used when kzalloc has not yet taken place or has
    failed, so there is no need for the call for kfree under this label.

    A simplified version of the semantic match that finds this problem is as
    follows: (http://coccinelle.lip6.fr/)

    //
    @@
    identifier x;
    expression E1!=0,E2,E3,E4;
    statement S;
    iterator I;
    @@

    (
    if (...) { ... when != kfree(x)
    when != x = E3
    when != E3 = x
    * return ...;
    }
    ... when != x = E2
    when != I(...,x,...) S
    if (...) { ... when != x = E4
    kfree(x); ... return ...; }
    )
    //

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

    Julia Lawall
     
  • snd_hda_get_conn_index() returns a negative value while the current code
    stores it in an unsigned int. It must be stored in a signed integer.

    Reported-by: Jesper Juhl
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     
  • Currently HD-audio driver shows the all error ELD byte as an error
    in the kernel message. This is annoying when the video driver doesn't
    set the correct ELD from the beginning. e.g. radeon sends a zero-byte
    data, but we still check ELD with the fixed 128 byte as a workaround
    for some broken devices, it spews 128-times errors.

    For avoiding this, the driver aborts reading when the first byte is
    invalid. In such a case, the whole data is certainly invalid.

    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

19 Aug, 2011

1 commit

  • The recent fix for testing dB range at the mixer creation time seems
    to cause regressions in some devices. In such devices, reading the dB
    info at probing time gives an error, thus both dBmin and dBmax are still
    zero, and TLV flag isn't set although the later read of dB info succeeds.

    This patch adds a workaround for such a case by assuming that the later
    read will succeed. In future, a similar test should be performed in a
    case where a wrong dB range is seen even in the later read.

    Signed-off-by: Takashi Iwai
    Cc:

    Takashi Iwai
     

18 Aug, 2011

1 commit


16 Aug, 2011

1 commit


15 Aug, 2011

2 commits

  • BugLink: https://bugs.launchpad.net/bugs/826081

    The original reporter needs 'Headphone Jack Sense' enabled to have
    audible audio, so add his PCI SSID to the whitelist.

    Reported-and-tested-by: Muhammad Khurram Khan
    Cc:
    Signed-off-by: Daniel T Chen
    Signed-off-by: Takashi Iwai

    Daniel T Chen
     
  • The snd_usb_caiaq driver currently assumes that output urbs are serviced
    in time and doesn't track when and whether they are given back by the
    USB core. That usually works fine, but due to temporary limitations of
    the XHCI stack, we faced that urbs were submitted more than once with
    this approach.

    As it's no good practice to fire and forget urbs anyway, this patch
    introduces a proper bit mask to track which requests have been submitted
    and given back.

    That alone however doesn't make the driver work in case the host
    controller is broken and doesn't give back urbs at all, and the output
    stream will stop once all pre-allocated output urbs are consumed. But
    it does prevent crashes of the controller stack in such cases.

    See http://bugzilla.kernel.org/show_bug.cgi?id=40702 for more details.

    Signed-off-by: Daniel Mack
    Reported-and-tested-by: Matej Laitl
    Cc: Sarah Sharp
    Cc: stable@kernel.org
    Signed-off-by: Takashi Iwai

    Daniel Mack
     

13 Aug, 2011

2 commits


12 Aug, 2011

2 commits


11 Aug, 2011

3 commits


10 Aug, 2011

4 commits


09 Aug, 2011

6 commits

  • Signed-off-by: Mark Brown
    Acked-by: Liam Girdwood

    Mark Brown
     
  • As we had no id_table only the driver name would be matched against
    meaning that WM8987 devices wouldn't be bound.

    Signed-off-by: Mark Brown
    Acked-by: Liam Girdwood

    Mark Brown
     
  • The I2C address is misformatted and would never match.

    Signed-off-by: Mark Brown
    Acked-by: Liam Girdwood
    Cc: stable@kernel.org

    Mark Brown
     
  • Without this, request_irq on subsequent device initialization fails, and
    the codec cannot be used.

    Signed-off-by: Stephen Warren
    Acked-by: Liam Girdwood
    Signed-off-by: Mark Brown

    Stephen Warren
     
  • Two issues were preventing module snd-soc-tegra-wm8903.ko from being
    removed and re-inserted:

    a) The speaker-enable GPIO is hosted by the WM8903 chip. This GPIO must
    be freed before snd_soc_unregister_card() is called, because that
    triggers wm8903.c:wm8903_remove(), which calls gpiochip_remove(), which
    then fails if any of the GPIOs are in use. To solve this, free all GPIOs
    first, so the code doesn't care where they come from.

    b) We need to call snd_soc_jack_free_gpios() to match the call to
    snd_soc_jack_add_gpios() during initialization. Without this, the
    call to snd_soc_jack_add_gpios() fails during any subsequent modprobe
    and initialization, since the GPIO and IRQ are already registered. In
    turn, this causes the headphone state not to be monitored, so the
    headphone is assumed not to be plugged in, and the audio path to it is
    never enabled.

    Signed-off-by: Stephen Warren
    Cc: stable@kernel.org
    Signed-off-by: Mark Brown

    Stephen Warren
     
  • Not all PCM devices have all sub-streams. Specifically, the SPDIF driver
    only supports playback and hence has no capture substream. Check whether
    a substream exists before dereferencing it, when de-allocating DMA
    buffers in tegra_pcm_deallocate_dma_buffer.

    Signed-off-by: Stephen Warren
    Acked-by: Liam Girdwood
    Signed-off-by: Mark Brown
    Cc: stable@kernel.org

    Stephen Warren
     

08 Aug, 2011

8 commits


07 Aug, 2011

2 commits

  • CONFIG_SND_TEA575X is enabled by RADIO_SF16FMR2, but the latter one is
    no PCI device. Since tea575x-tuner itself is independent from the board
    bus type, the config should be moved out of SND_PCI dependency.

    Reported-by: Randy Dunlap
    Acked-by: Randy Dunlap
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     
  • Use kzalloc rather than kmalloc followed by memset with 0

    This considers some simple cases that are common and easy to validate
    Note in particular that there are no ...s in the rule, so all of the
    matched code has to be contiguous

    The semantic patch that makes this output is available
    in scripts/coccinelle/api/alloc/kzalloc-simple.cocci.

    More information about semantic patching is available at
    http://coccinelle.lip6.fr/

    Signed-off-by: Thomas Meyer
    Signed-off-by: Takashi Iwai

    Thomas Meyer
     

06 Aug, 2011

2 commits


05 Aug, 2011

3 commits