20 Aug, 2012

5 commits

  • Initialize err before returning on failure, as done elsewhere in the
    function.

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

    //
    (
    if@p1 (\(ret < 0\|ret != 0\))
    { ... return ret; }
    |
    ret@p1 = 0
    )
    ... when != ret = e1
    when != &ret
    *if(...)
    {
    ... when != ret = e2
    when forall
    return ret;
    }

    //

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

    Julia Lawall
     
  • In the first case, the second test of whether retval is negative is
    redundant. It is dropped and the previous and subsequent tests are
    combined.

    In the second case, add an initialization of retval on failure of ioremap.

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

    //
    (
    if@p1 (\(ret < 0\|ret != 0\))
    { ... return ret; }
    |
    ret@p1 = 0
    )
    ... when != ret = e1
    when != &ret
    *if(...)
    {
    ... when != ret = e2
    when forall
    return ret;
    }

    //

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

    Julia Lawall
     
  • Initialize retval before returning from a failed call to ioremap.

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

    //
    (
    if@p1 (\(ret < 0\|ret != 0\))
    { ... return ret; }
    |
    ret@p1 = 0
    )
    ... when != ret = e1
    when != &ret
    *if(...)
    {
    ... when != ret = e2
    when forall
    return ret;
    }

    //

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

    Julia Lawall
     
  • Fix kernel-doc warning in and add function name to make
    the kernel-doc notation complete.

    Warning(include/sound/pcm.h:1081): No description found for parameter 'substream'

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

    Randy Dunlap
     
  • Speed comes from get_user() in audio_ioctl(). We use it to set the "s"
    variable before clamping it to valid values so it could lead to a divide
    by zero bug.

    Signed-off-by: Dan Carpenter
    Signed-off-by: Takashi Iwai

    Dan Carpenter
     

16 Aug, 2012

2 commits

  • Instead of blindly initializing a volume knob widget, first check
    that there actually is a volume knob widget.

    Signed-off-by: David Henningsson
    Signed-off-by: Takashi Iwai

    David Henningsson
     
  • A PCM capture stream on usb-audio causes a scheduling-while-atomic
    BUG, as reported in the bugzilla entry below. It's because
    snd_usb_endpoint_start() is called at first at trigger START for a
    capture stream, and this function contains the left-over EP
    deactivation codes. The problem doesn't happen for a playback stream
    because the function is called at PCM prepare time, which can sleep.

    This patch fixes the BUG by moving the EP deactivation code into the
    PCM prepare callback.

    Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=46011
    Cc: [v3.5+]
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

14 Aug, 2012

2 commits


13 Aug, 2012

1 commit


10 Aug, 2012

4 commits


09 Aug, 2012

2 commits


08 Aug, 2012

2 commits


07 Aug, 2012

3 commits


06 Aug, 2012

2 commits


03 Aug, 2012

3 commits


02 Aug, 2012

2 commits


01 Aug, 2012

2 commits

  • uac_clock_source_is_valid() uses the control selector value to access
    the bmControls bitmap of the clock source unit. This is wrong, as
    control selector values start from 1, while the bitmap uses all
    available bits.

    In other words, "Clock Validity Control" is stored in D3..2, not D5..4
    of the clock selector unit's bmControls.

    Signed-off-by: Daniel Mack
    Reported-by: Andreas Koch
    Cc: stable@kernel.org
    Signed-off-by: Takashi Iwai

    Daniel Mack
     
  • Required for reliable power up from cold.

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

    Mark Brown
     

31 Jul, 2012

6 commits

  • Since commit 38cbf9598feba97de9f9b43efa9153fd7c1a2ec9
    ("ASoC: core: Try to use regmap if the driver doesn't set up any I/O")
    any ASoC codec which doesn't set codec::control_data is assumed
    to use regmap. That doesn't work with AC97 so this workaround
    sets the codec::control_data member to a random value to restore
    proper behaviour.

    Tested with WM9712.

    Signed-off-by: Manuel Lauss
    Signed-off-by: Mark Brown

    Manuel Lauss
     
  • LINE_IN also needs VAG_POWER on or we may hear noise when directly
    route LINE_IN to Headphone Mux.
    Tested on imx28evk.

    Signed-off-by: Dong Aisheng
    Signed-off-by: Mark Brown

    Dong Aisheng
     
  • If codec->control_data is not populated SoC Core assumes we want to
    use regmap, which fails catastrophically, as we don't have one:

    Unable to handle kernel NULL pointer dereference at virtual address 00000080
    pgd = c0004000
    [00000080] *pgd=00000000
    Internal error: Oops: 17 [#1] PREEMPT SMP ARM
    Modules linked in:
    CPU: 1 Not tainted (3.5.0-rc6-00884-g0b2419e-dirty #130)
    PC is at regmap_read+0x10/0x5c
    LR is at hw_read+0x80/0x90
    pc : [] lr : [] psr: 60000013

    Signed-off-by: Lee Jones
    Signed-off-by: Mark Brown

    Lee Jones
     
  • The IDT codecs initializes the GPIO setup for mute LEDs via
    snd_hda_sync_vmaster_hook(). This works in most cases except for the
    very first call, which is called before PCM and control creations.
    Thus before Master switch is set manually via alsactl, the mute LED
    may show the wrong state, depending on the polarity.

    Now it's fixed by calling the LED-status update function manually when
    no vmaster is set yet.

    Cc: [v3.4+]
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     
  • Signed-off-by: Takashi Iwai

    Takashi Iwai
     
  • The commit a3e199732b made the LED working again on HP Mini 210 but
    with a wrong polarity. This patch fixes the polarity for this
    machine, and also introduce a new model string "hp-inv-led".

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

    Cc: [v3.3+]
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

30 Jul, 2012

1 commit

  • This will fix the following oops:

    [ 6.169981] genirq: Flags mismatch irq 5. 00000000 (ES1688) vs. 00000000 (ES1688)
    [ 6.170851] Pid: 1, comm: swapper Not tainted 3.5.0-00004-gceee0e9 #14
    [ 6.170851] Call Trace:
    [ 6.170851] [] ? __setup_irq+0x3c7/0x420
    [ 6.170851] [] ? request_threaded_irq+0x76/0x140
    [ 6.170851] [] ? snd_es1688_ioctl+0x10/0x10
    [ 6.170851] [] ? request_threaded_irq+0xb2/0x140
    [ 6.170851] [] ? snd_es1688_create+0x96/0x330
    [ 6.170851] [] ? snd_gusextreme_probe+0x18d/0x5a2
    [ 6.170851] [] ? __driver_attach+0x80/0x80
    [ 6.170851] [] ? sysfs_create_link+0xf/0x20
    [ 6.170851] [] ? __driver_attach+0x80/0x80
    [ 6.170851] [] ? isa_bus_probe+0x12/0x20
    [ 6.170851] [] ? driver_probe_device+0x55/0x1c0
    [ 6.170851] [] ? _raw_spin_unlock+0xf/0x30
    [ 6.170851] [] ? klist_next+0x6a/0xe0
    [ 6.170851] [] ? isa_bus_match+0x21/0x40
    [ 6.170851] [] ? bus_for_each_drv+0x34/0x70
    [ 6.170851] [] ? device_attach+0x7b/0x90
    [ 6.170851] [] ? __driver_attach+0x80/0x80
    [ 6.170851] [] ? bus_probe_device+0x5f/0x80
    [ 6.170851] [] ? device_add+0x573/0x620
    [ 6.170851] [] ? complete_all+0x40/0x60
    [ 6.170851] [] ? _raw_spin_unlock_irqrestore+0x1a/0x30
    [ 6.170851] [] ? isa_register_driver+0xb6/0x150
    [ 6.170851] [] ? alsa_card_gusmax_init+0xf/0xf
    [ 6.170851] [] ? do_one_initcall+0x7f/0x12b
    [ 6.170851] [] ? kernel_init+0x112/0x1a9
    [ 6.170851] [] ? do_early_param+0x77/0x77
    [ 6.170851] [] ? do_one_initcall+0x12b/0x12b
    [ 6.170851] [] ? kernel_thread_helper+0x6/0xd
    [ 6.190170] es1688: can't grab IRQ 5
    [ 6.190613] genirq: Flags mismatch irq 5. 00000000 (ES1688) vs. 00000000 (ES1688)
    [ 6.191566] Pid: 1, comm: swapper Not tainted 3.5.0-00004-gceee0e9 #14
    [ 6.192394] Call Trace:
    [ 6.192685] [] ? __setup_irq+0x3c7/0x420
    [ 6.193342] [] ? request_threaded_irq+0x76/0x140
    [ 6.194081] [] ? snd_es1688_ioctl+0x10/0x10
    [ 6.194607] [] ? request_threaded_irq+0xb2/0x140
    [ 6.194607] [] ? snd_es1688_create+0x96/0x330
    [ 6.194607] [] ? snd_gusextreme_probe+0x18d/0x5a2
    [ 6.194607] [] ? __driver_attach+0x80/0x80
    [ 6.194607] [] ? sysfs_create_link+0xf/0x20
    [ 6.194607] [] ? __driver_attach+0x80/0x80
    [ 6.194607] [] ? isa_bus_probe+0x12/0x20
    [ 6.194607] [] ? driver_probe_device+0x55/0x1c0
    [ 6.194607] [] ? _raw_spin_unlock+0xf/0x30
    [ 6.194607] [] ? klist_next+0x6a/0xe0
    [ 6.194607] [] ? isa_bus_match+0x21/0x40
    [ 6.194607] [] ? bus_for_each_drv+0x34/0x70
    [ 6.194607] [] ? device_attach+0x7b/0x90
    [ 6.194607] [] ? __driver_attach+0x80/0x80
    [ 6.194607] [] ? bus_probe_device+0x5f/0x80
    [ 6.194607] [] ? device_add+0x573/0x620
    [ 6.194607] [] ? complete_all+0x40/0x60
    [ 6.194607] [] ? _raw_spin_unlock_irqrestore+0x1a/0x30
    [ 6.194607] [] ? isa_register_driver+0xb6/0x150
    [ 6.194607] [] ? alsa_card_gusmax_init+0xf/0xf
    [ 6.194607] [] ? do_one_initcall+0x7f/0x12b
    [ 6.194607] [] ? kernel_init+0x112/0x1a9
    [ 6.194607] [] ? do_early_param+0x77/0x77
    [ 6.194607] [] ? do_one_initcall+0x12b/0x12b
    [ 6.194607] [] ? kernel_thread_helper+0x6/0xd
    [ 6.210779] es1688: can't grab IRQ 5
    [ 6.211305] gusextreme: probe of gusextreme.0 failed with error -16

    Signed-off-by: Daniel Mack
    Signed-off-by: Fengguang Wu
    Signed-off-by: Takashi Iwai

    Fengguang Wu
     

29 Jul, 2012

1 commit

  • On recent kernels, Realtek codec parser tries to optimize the routing
    aggressively and take the headphone output as primary at first. This
    caused a regression on VAIO Z with ALC889, the silent output from the
    speaker.

    The problem seems that the speaker pin must be connected to the first
    DAC (0x02) on this machine by some reason although the codec itself
    advertises the flexible routing with any DACs.

    This patch adds a fix-up for choosing the speaker pin as the primary
    so that the right DAC is assigned on this device.

    Reported-and-tested-by: Adam Williamson
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

28 Jul, 2012

1 commit


27 Jul, 2012

1 commit

  • This patch add missing modules aliases to get sound working on omap devices.

    Tested on Beagleboard xM rev. B.

    This patch is against 3.5-rc6 vanilla.

    Signed-off-by: Guillaume GARDET
    Signed-off-by: Mans Rullgard

    From 18b1ba8becc3dd256bdaad2d825f46b551debda3 Mon Sep 17 00:00:00 2001
    From: Guillaume GARDET
    Date: Tue, 10 Jul 2012 13:47:16 +0200
    Subject: [PATCH] Add missing modules aliases to fix audio on omap devices
    Signed-off-by: Mark Brown

    Guillaume Gardet