23 Sep, 2011

1 commit

  • The Terratec Aureon 5.1 USB sound card support is broken since kernel
    2.6.39.
    2.6.39 introduced power management support for USB sound cards that added
    a probing flag in struct snd_usb_audio.

    During the probe of the card it gives following error message :

    usb 7-2: new full speed USB device number 2 using uhci_hcd
    cannot find UAC_HEADER
    snd-usb-audio: probe of 7-2:1.3 failed with error -5
    input: USB Audio as
    /devices/pci0000:00/0000:00:1d.1/usb7/7-2/7-2:1.3/input/input6
    generic-usb 0003:0CCD:0028.0001: input: USB HID v1.00 Device [USB Audio]
    on usb-0000:00:1d.1-2/input3

    I can not comment about that "cannot find UAC_HEADER" error, but until
    2.6.38 the card worked anyway.
    With 2.6.39 chip->probing remains 1 on error exit, and any later ioctl
    stops in snd_usb_autoresume with -ENODEV.

    Signed-off-by: Thomas Pfaff
    Cc: [2.6.39+]
    Signed-off-by: Takashi Iwai

    Thomas Pfaff
     

22 Sep, 2011

2 commits

  • Commit 9676001559fce06e37c7dc230ab275f605556176
    ("ALSA: fm801: add error handling if auto-detect fails") seems to
    break systems that were previously working without a tuner.

    As a bonus, this should fix init and cleanup for the case where the
    tuner is explicitly disabled.

    Reported-and-tested-by: Hor Jiun Shyong
    References: http://bugs.debian.org/641946
    Signed-off-by: Ben Hutchings
    Cc: stable@kernel.org [v3.0+]
    Signed-off-by: Takashi Iwai

    Ben Hutchings
     
  • Commit 9676001559fce06e37c7dc230ab275f605556176
    ("ALSA: fm801: add error handling if auto-detect fails") added
    incorrect error handling.

    Once we have successfully called snd_device_new(), the cleanup
    function fm801_free() will automatically be called by snd_card_free()
    and we must *not* also call fm801_free() directly.

    Reported-by: Hor Jiun Shyong
    References: http://bugs.debian.org/641946
    Signed-off-by: Ben Hutchings
    Cc: stable@kernel.org [v3.0+]
    Signed-off-by: Takashi Iwai

    Ben Hutchings
     

20 Sep, 2011

1 commit


19 Sep, 2011

1 commit

  • When the system has only the headphone and the line-out jacks without
    speakers, the current auto-mute code doesn't work. It's because the
    spec->automute_lines flag is wrongly referred in update_speakers().
    This flag must be meaningless when spec->automute_hp_lo isn't set, thus
    they should be always coupled.

    The patch fixes the problem and add a comment to indicate the
    relationship briefly.

    BugLink: http://bugs.launchpad.net/bugs/851697

    Reported-by: David Henningsson
    Tested-By: Jayne Han
    Cc: stable@kernel.org (3.0)
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

15 Sep, 2011

2 commits

  • wait_for_avail() in pcm_lib.c has a race in it (observed in practice by an
    Intel validation group).

    The function is supposed to return once space in the buffer has become
    available, or if some timeout happens. The entity that creates space (irq
    handler of sound driver and some such) will do a wake up on a waitqueue
    that this function registers for.

    However there are two races in the existing code

    1) If space became available between the caller noticing there was no
    space and this function actually sleeping, the wakeup is missed and the
    timeout condition will happen instead

    2) If a wakeup happened but not sufficient space became available, the
    code will loop again and wait for more space. However, if the second
    wake comes in prior to hitting the schedule_timeout_interruptible(), it
    will be missed, and potentially you'll wait out until the timeout
    happens.

    The fix consists of using more careful setting of the current state (so
    that if a wakeup happens in the main loop window, the schedule_timeout()
    falls through) and by checking for available space prior to going into the
    schedule_timeout() loop, but after being on the waitqueue and having the
    state set to interruptible.

    [tiwai: the following changes have been added to Arjan's original patch:
    - merged akpm's fix for waitqueue adding order into a single patch
    - reduction of duplicated code of avail check
    ]

    Signed-off-by: Arjan van de Ven
    Signed-off-by: Andrew Morton
    Cc:
    Signed-off-by: Takashi Iwai

    Arjan van de Ven
     
  • Takashi Iwai
     

14 Sep, 2011

1 commit


13 Sep, 2011

1 commit


12 Sep, 2011

1 commit


06 Sep, 2011

2 commits


31 Aug, 2011

4 commits


29 Aug, 2011

1 commit


26 Aug, 2011

1 commit


25 Aug, 2011

3 commits


24 Aug, 2011

4 commits

  • Board file support for Ventana is not yet mainlined, and probably won't
    ever be given the move to Device-Tree. Consequently, the Ventana entry
    is being removed from arch/arm/tools/mach-types in the next merge window,
    since it was registered over a year ago.

    This will also remove function machine_is_ventana(), which is used by
    the ASoC Tegra WM8903 machine driver. This will cause compilation
    failures. Drop Ventana support to resolve this.

    Hopefully, in the not-too-distant future, tegra_wm8903.c will be able to
    configure itself from Device-Tree, and hence we'll be able to re-instate
    Ventana support just by creating a .dts file for the board.

    Also note that Aebl support is in a similar boat. However, that board
    isn't scheduled for deprecation for at least another 5 months, and
    perhaps we will have completely removed non-Device-Tree support from
    tegra_wm8903.c by then and/or adjusted mach-types policy.

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

    Stephen Warren
     
  • Signed-off-by: Sangbeom Kim
    Acked-by: Jassi Brar
    Acked-by: Liam Girdwood
    Signed-off-by: Mark Brown

    Sangbeom Kim
     
  • Signed-off-by: Joseph Pentland
    Acked-by: Liam Girdwood
    Signed-off-by: Mark Brown

    Joseph Pentland
     
  • The ADC-switching can work also in the auto-mic mode, too.

    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

23 Aug, 2011

9 commits

  • When multiple headphones or speakers are assigned but no individual
    DACs are available, the driver should take the first HP/SPK DAC instead
    of another primary output. The patch adds a bit-flag to dac field of
    struct pin_dac_pair indicating that it's a slave DAC.

    Signed-off-by: Takashi Iwai

    Takashi Iwai
     
  • The internal states, jack_present and line_jack_present should be
    updated upon unsolicited events even if no automute is set.
    Otherwise the wrong state is referred when the automute behavior is
    changed by the mixer control.

    Signed-off-by: Takashi Iwai

    Takashi Iwai
     
  • When the headphone or speaker output has no own DAC, initialize the path
    using the primary DAC. Otherwise the path won't be set properly and
    can result in the silence.

    Signed-off-by: Takashi Iwai

    Takashi Iwai
     
  • The first change is to add an of_node_put, since codec_np has previously
    been allocated. The rest of the patch reorganizes the error handling code
    so the only code executed is that which is needed.

    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 != of_node_put(x)
    when != x = E3
    when != E3 = x
    * return ...;
    }
    ... when != x = E2
    when != I(...,x,...) S
    if (...) { ... when != x = E4
    of_node_put(x); ... return ...; }
    )
    //

    Signed-off-by: Julia Lawall
    Acked-by: Timur Tabi
    Acked-by: Liam Girdwood
    Signed-off-by: Mark Brown

    Julia Lawall
     
  • dma_channel_np has been accessed at this point, so decrease its reference
    count before leaving the function.

    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 != of_node_put(x)
    when != x = E3
    when != E3 = x
    * return ...;
    }
    ... when != x = E2
    when != I(...,x,...) S
    if (...) { ... when != x = E4
    of_node_put(x); ... return ...; }
    )
    //

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

    Julia Lawall
     
  • Introduce a new label that includes kfree and jump to that one.

    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
    Acked-by: Alexander Sverdlin
    Reviewed-by: H Hartley Sweeten
    Acked-by: Liam Girdwood
    Signed-off-by: Mark Brown

    Julia Lawall
     
  • Adjust the goto to jump to the error handling code that includes kfree.

    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
    Acked-by: Liam Girdwood
    Signed-off-by: Mark Brown

    Julia Lawall
     
  • GFP_ATOMIC is not needed here, use GFP_KERNEL instead.

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

    Axel Lin
     
  • of_parse_phandle increments the reference count of np, so this should be
    decremented before trying the next possibility.

    Since we don't actually use np, we can decrement the reference count
    immediately.

    Reported-by: Julia Lawall
    Signed-off-by: Timur Tabi
    Acked-by: Liam Girdwood
    Signed-off-by: Mark Brown

    Timur Tabi
     

22 Aug, 2011

5 commits


20 Aug, 2011

1 commit

  • 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