22 Mar, 2013

1 commit

  • The generic parser should evaluate the availability of the independent
    HP when specified. Otherwise a DAC without the direct connection to
    the corresponding pin may be assigned for the HP, but the driver
    doesn't check it at all. The problem was actually seen on some
    machines with VT1708s or equivalent codec, where DAC0 is assigned to
    HP although it can be connected only via aamix.

    This patch adds the badness evaluation for the independent HP to make
    it working properly.

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

    Takashi Iwai
     

21 Mar, 2013

1 commit

  • The current DSP loader code abuses snd_hda_lock_devices() for ensuring
    the DSP loader not conflicting with the other normal operations. But
    this trick obviously doesn't work for the PM resume since the streams
    are kept opened there where snd_hda_lock_devices() returns -EBUSY.
    That means we need another lock mechanism instead of abuse.

    This patch provides the new lock state to azx_dev. Theoretically it's
    possible that the DSP loader conflicts with the stream that has been
    already assigned for another PCM. If it's running, the DSP loader
    should simply fail. If not -- it's the case for PM resume --, we
    should assign this stream temporarily to the DSP loader, and take it
    back to the PCM after finishing DSP loading. If the PCM is operated
    during the DSP loading, it should get an error, too.

    Reported-and-tested-by: Dylan Reid
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

20 Mar, 2013

4 commits

  • There is a typo in convert_to_spdif_status() about checking the
    emphasis IEC958 status bit. It should check the given value instead
    of the resultant value.

    Reported-by: Martin Weishart
    Cc:
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     
  • Creation of individual mixer controls may fail, but that shouldn't cause
    the entire mixer creation to fail. Even worse, if the mixer creation
    fails, that will error out the entire device probing.

    All the functions called by parse_audio_unit() should return -EINVAL if
    they find descriptors that are unsupported or believed to be malformed,
    so we can safely handle this error code as a non-fatal condition in
    snd_usb_mixer_controls().

    That fixes a long standing bug which is commonly worked around by
    adding quirks which make the driver ignore entire interfaces. Some of
    them might now be unnecessary.

    Signed-off-by: Daniel Mack
    Reported-and-tested-by: Rodolfo Thomazelli
    Cc:
    Signed-off-by: Takashi Iwai

    Daniel Mack
     
  • In check_input_term() and parse_audio_feature_unit(), propagate the
    error value that has been returned by a failing function instead of
    -EINVAL. That helps cleaning up the error pathes in the mixer.

    Signed-off-by: Daniel Mack
    Cc:
    Signed-off-by: Takashi Iwai

    Daniel Mack
     
  • UAC2_EXTENSION_UNIT_V2 differs from UAC1_EXTENSION_UNIT, but can be handled in
    the same way when parsing the unit. Otherwise parse_audio_unit() fails when it
    sees an extension unit on a UAC2 device.

    UAC2_EXTENSION_UNIT_V2 is outside the range allocated by UAC1.

    Signed-off-by: Torstein Hegge
    Acked-by: Daniel Mack
    Cc:
    Signed-off-by: Takashi Iwai

    Torstein Hegge
     

18 Mar, 2013

3 commits


15 Mar, 2013

5 commits


14 Mar, 2013

1 commit


12 Mar, 2013

3 commits

  • In the connection list expansion in hda_codec.c and hda_proc.c, the
    value returned from snd_hda_get_num_raw_conns() is used as the array
    size to store the connection list. However, the function returns
    simply a raw value of the AC_PAR_CONNLIST_LEN parameter, and the
    widget list with ranges isn't considered there. Thus it may return a
    smaller size than the actual list, which results in -ENOSPC in
    snd_hda_get_raw_conections().

    This patch fixes the bug by parsing the connection list correctly also
    for snd_hda_get_num_raw_conns().

    Reported-and-tested-by: David Henningsson
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     
  • The NuForce UDH-100 numbers its interfaces incorrectly, which makes the
    interface associations come out wrong, which results in the driver
    erroring out with the message "Audio class v2 interfaces need an
    interface association".

    Work around this by searching for the interface association descriptor
    also in some other place where it might have ended up.

    Reported-and-tested-by: Dave Helstroom
    Signed-off-by: Clemens Ladisch
    Signed-off-by: Takashi Iwai

    Clemens Ladisch
     
  • The dereference should be moved below the NULL test.

    Signed-off-by: Wei Yongjun
    Signed-off-by: Takashi Iwai

    Wei Yongjun
     

11 Mar, 2013

1 commit

  • snd_seq_timer_open() didn't catch the whole error path but let through
    if the timer id is a slave. This may lead to Oops by accessing the
    uninitialized pointer.

    BUG: unable to handle kernel NULL pointer dereference at 00000000000002ae
    IP: [] snd_seq_timer_open+0xe7/0x130
    PGD 785cd067 PUD 76964067 PMD 0
    Oops: 0002 [#4] SMP
    CPU 0
    Pid: 4288, comm: trinity-child7 Tainted: G D W 3.9.0-rc1+ #100 Bochs Bochs
    RIP: 0010:[] [] snd_seq_timer_open+0xe7/0x130
    RSP: 0018:ffff88006ece7d38 EFLAGS: 00010246
    RAX: 0000000000000286 RBX: ffff88007851b400 RCX: 0000000000000000
    RDX: 000000000000ffff RSI: ffff88006ece7d58 RDI: ffff88006ece7d38
    RBP: ffff88006ece7d98 R08: 000000000000000a R09: 000000000000fffe
    R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000
    R13: ffff8800792c5400 R14: 0000000000e8f000 R15: 0000000000000007
    FS: 00007f7aaa650700(0000) GS:ffff88007f800000(0000) GS:0000000000000000
    CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    CR2: 00000000000002ae CR3: 000000006efec000 CR4: 00000000000006f0
    DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
    DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
    Process trinity-child7 (pid: 4288, threadinfo ffff88006ece6000, task ffff880076a8a290)
    Stack:
    0000000000000286 ffffffff828f2be0 ffff88006ece7d58 ffffffff810f354d
    65636e6575716573 2065756575712072 ffff8800792c0030 0000000000000000
    ffff88006ece7d98 ffff8800792c5400 ffff88007851b400 ffff8800792c5520
    Call Trace:
    [] ? trace_hardirqs_on+0xd/0x10
    [] snd_seq_queue_timer_open+0x29/0x70
    [] snd_seq_ioctl_set_queue_timer+0xda/0x120
    [] snd_seq_do_ioctl+0x9b/0xd0
    [] snd_seq_ioctl+0x10/0x20
    [] do_vfs_ioctl+0x522/0x570
    [] ? file_has_perm+0x83/0xa0
    [] ? trace_hardirqs_on+0xd/0x10
    [] sys_ioctl+0x5d/0xa0
    [] ? trace_hardirqs_on_thunk+0x3a/0x3f
    [] system_call_fastpath+0x16/0x1b

    Reported-and-tested-by: Tommi Rantala
    Cc:
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

07 Mar, 2013

10 commits


06 Mar, 2013

1 commit


05 Mar, 2013

2 commits

  • When a value of a vmaster slave control is changed, the ctl change
    notification is sometimes ignored. This happens when the master
    control overrides, e.g. when the corresponding master control is
    muted. The reason is that slave_put() returns the value of the actual
    slave put callback, and it doesn't reflect the virtual slave value
    change.

    This patch fixes the function just to return 1 whenever a slave value
    is changed.

    Cc:
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     
  • This register field is 11 bits wide, not 15 bits wide. Given the way
    this value is currently, used, this patch has no practical effect.
    However, it's still best if the value is correct.

    Signed-off-by: Stephen Warren
    Signed-off-by: Mark Brown

    Stephen Warren
     

04 Mar, 2013

1 commit

  • The "dev" variable could be out of bounds. Calling
    snd_seq_oss_synth_is_valid() checks that it is is a valid device
    which has been opened. We check this inside set_note_event() so
    this function can't succeed without a valid "dev". But we need to
    do the check earlier to prevent invalid dereferences and memory
    corruption.

    One call tree where "dev" could be out of bounds is:
    -> snd_seq_oss_oob_user()
    -> snd_seq_oss_process_event()
    -> extended_event()
    -> note_on_event()

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

    Dan Carpenter
     

03 Mar, 2013

1 commit

  • The delay parameter of schedule_delayed_work() is number of jiffies to wait
    rather than miliseconds.

    Before commit 6d3c26bcb "ASoC: Use delayed work to debounce WM8350 jack IRQs",
    the debounce time is 200 miliseconds in wm8350_hp_jack_handler().
    So I think this is a bug when convert to use delayed work.

    Signed-off-by: Axel Lin
    Signed-off-by: Mark Brown

    Axel Lin
     

01 Mar, 2013

4 commits


28 Feb, 2013

1 commit

  • Pull sound fixes from Takashi Iwai:
    "Nothing serious but just a few regression fixes and quirk additions,
    such as emu1010 firmware loading fixes, M-Audio AP192 SPDIF fix, and
    HD-audio HDMI jack detection fix."

    * tag 'sound-3.9' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
    ALSA: emu10k1: Allow to switch hardware sampe rate on EMU
    ALSA: hda - Enable beep for ASUS EeeBox EBP1501P
    ALSA: emu10k1: Load firmware when it was already cached
    ALSA: ice1724: M-Audio Audiophile192: Fix SPDIF input
    ALSA: bt87x: Make load_all parameter working again
    ALSA: emu10k1: Fix regression in emu1010 firmware loading
    ALSA: hda - hdmi: Make jacks phantom, if they're not detectable

    Linus Torvalds
     

27 Feb, 2013

1 commit

  • Pull vfs pile (part one) from Al Viro:
    "Assorted stuff - cleaning namei.c up a bit, fixing ->d_name/->d_parent
    locking violations, etc.

    The most visible changes here are death of FS_REVAL_DOT (replaced with
    "has ->d_weak_revalidate()") and a new helper getting from struct file
    to inode. Some bits of preparation to xattr method interface changes.

    Misc patches by various people sent this cycle *and* ocfs2 fixes from
    several cycles ago that should've been upstream right then.

    PS: the next vfs pile will be xattr stuff."

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (46 commits)
    saner proc_get_inode() calling conventions
    proc: avoid extra pde_put() in proc_fill_super()
    fs: change return values from -EACCES to -EPERM
    fs/exec.c: make bprm_mm_init() static
    ocfs2/dlm: use GFP_ATOMIC inside a spin_lock
    ocfs2: fix possible use-after-free with AIO
    ocfs2: Fix oops in ocfs2_fast_symlink_readpage() code path
    get_empty_filp()/alloc_file() leave both ->f_pos and ->f_version zero
    target: writev() on single-element vector is pointless
    export kernel_write(), convert open-coded instances
    fs: encode_fh: return FILEID_INVALID if invalid fid_type
    kill f_vfsmnt
    vfs: kill FS_REVAL_DOT by adding a d_weak_revalidate dentry op
    nfsd: handle vfs_getattr errors in acl protocol
    switch vfs_getattr() to struct path
    default SET_PERSONALITY() in linux/elf.h
    ceph: prepopulate inodes only when request is aborted
    d_hash_and_lookup(): export, switch open-coded instances
    9p: switch v9fs_set_create_acl() to inode+fid, do it before d_instantiate()
    9p: split dropping the acls from v9fs_set_create_acl()
    ...

    Linus Torvalds