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
     

05 Mar, 2013

1 commit

  • 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
     

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
     

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
     

23 Feb, 2013

1 commit


14 Feb, 2013

1 commit

  • this add new API for sound compress to support gapless playback.
    As noted in Documentation change, we add API to send metadata of encoder and
    padding delay to DSP. Also add API for indicating EOF and switching to
    subsequent track

    Also bump the compress API version

    Signed-off-by: Jeeja KP
    Signed-off-by: Vinod Koul
    Signed-off-by: Takashi Iwai

    Jeeja KP
     

11 Feb, 2013

1 commit

  • The snd_compr_update_tstamp() can only fill in the snd_compr_tstamp
    if the codec implements the pointer() function. If that happened
    the code was previously returning uninitialized garbage in the
    tstamp because it wasn't initialized anywhere.

    This change zero-fills the tstamp in the two places it is used
    before calling snd_compr_update_tstamp(), and also has
    snd_compr_update_tstamp() return an error indication if it
    can't provide a tstamp. For the case of snd_compr_calc_avail()
    it ignores this error because we still need to return info on
    the available buffer space even if we can't provide tstamp
    info - when the tstamp is not valid all fields are now
    guaranteed to be zero.

    Signed-off-by: Richard Fitzgerald
    Signed-off-by: Mark Brown
    Acked-by: Vinod Koul
    Signed-off-by: Takashi Iwai

    Richard Fitzgerald
     

14 Dec, 2012

1 commit

  • Pull trivial branch from Jiri Kosina:
    "Usual stuff -- comment/printk typo fixes, documentation updates, dead
    code elimination."

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (39 commits)
    HOWTO: fix double words typo
    x86 mtrr: fix comment typo in mtrr_bp_init
    propagate name change to comments in kernel source
    doc: Update the name of profiling based on sysfs
    treewide: Fix typos in various drivers
    treewide: Fix typos in various Kconfig
    wireless: mwifiex: Fix typo in wireless/mwifiex driver
    messages: i2o: Fix typo in messages/i2o
    scripts/kernel-doc: check that non-void fcts describe their return value
    Kernel-doc: Convention: Use a "Return" section to describe return values
    radeon: Fix typo and copy/paste error in comments
    doc: Remove unnecessary declarations from Documentation/accounting/getdelays.c
    various: Fix spelling of "asynchronous" in comments.
    Fix misspellings of "whether" in comments.
    eisa: Fix spelling of "asynchronous".
    various: Fix spelling of "registered" in comments.
    doc: fix quite a few typos within Documentation
    target: iscsi: fix comment typos in target/iscsi drivers
    treewide: fix typo of "suport" in various comments and Kconfig
    treewide: fix typo of "suppport" in various comments
    ...

    Linus Torvalds
     

21 Nov, 2012

2 commits


19 Nov, 2012

1 commit


14 Nov, 2012

2 commits


08 Nov, 2012

2 commits


30 Oct, 2012

4 commits


28 Oct, 2012

1 commit

  • Commit 4eeaaeaea (ALSA: core: add hooks for audio timestamps) added the
    new audio_tstamp field to struct snd_pcm_status. However, struct
    timespec requires 64-bit alignment, so the 64-bit compiler would insert
    32 bits of padding before this field, which broke SNDRV_PCM_IOCTL_STATUS
    with error messages like this:

    kernel: unknown ioctl = 0x80984120

    To solve this, insert the padding explicitly so that it can be taken
    into account when calculating the ABI structure size.

    Signed-off-by: Clemens Ladisch
    Signed-off-by: Takashi Iwai

    Clemens Ladisch
     

23 Oct, 2012

2 commits

  • ALSA did not provide any direct means to infer the audio time for A/V
    sync and system/audio time correlations (eg. PulseAudio).
    Applications had to track the number of samples read/written and
    add/subtract the number of samples queued in the ring buffer. This
    accounting led to small errors, typically several samples, due to the
    two-step process. Computing the audio time in the kernel is more
    direct, as all the information is available in the same routines.

    Also add new .audio_wallclock routine to enable fine-grain synchronization
    between monotonic system time and audio hardware time.
    Using the wallclock, if supported in hardware, allows for a
    much better sub-microsecond precision and a common drift tracking for
    all devices sharing the same wall clock (master clock).

    Signed-off-by: Pierre-Louis Bossart
    Signed-off-by: Takashi Iwai

    Pierre-Louis Bossart
     
  • Keep track of boundary crossing when hw_ptr
    exceeds boundary limit and wraps-around. This
    will help keep track of total number
    of frames played/received at the kernel level

    Signed-off-by: Pierre-Louis Bossart
    Signed-off-by: Takashi Iwai

    Pierre-Louis Bossart
     

09 Oct, 2012

2 commits

  • A long time ago, in v2.4, VM_RESERVED kept swapout process off VMA,
    currently it lost original meaning but still has some effects:

    | effect | alternative flags
    -+------------------------+---------------------------------------------
    1| account as reserved_vm | VM_IO
    2| skip in core dump | VM_IO, VM_DONTDUMP
    3| do not merge or expand | VM_IO, VM_DONTEXPAND, VM_HUGETLB, VM_PFNMAP
    4| do not mlock | VM_IO, VM_DONTEXPAND, VM_HUGETLB, VM_PFNMAP

    This patch removes reserved_vm counter from mm_struct. Seems like nobody
    cares about it, it does not exported into userspace directly, it only
    reduces total_vm showed in proc.

    Thus VM_RESERVED can be replaced with VM_IO or pair VM_DONTEXPAND | VM_DONTDUMP.

    remap_pfn_range() and io_remap_pfn_range() set VM_IO|VM_DONTEXPAND|VM_DONTDUMP.
    remap_vmalloc_range() set VM_DONTEXPAND | VM_DONTDUMP.

    [akpm@linux-foundation.org: drivers/vfio/pci/vfio_pci.c fixup]
    Signed-off-by: Konstantin Khlebnikov
    Cc: Alexander Viro
    Cc: Carsten Otte
    Cc: Chris Metcalf
    Cc: Cyrill Gorcunov
    Cc: Eric Paris
    Cc: H. Peter Anvin
    Cc: Hugh Dickins
    Cc: Ingo Molnar
    Cc: James Morris
    Cc: Jason Baron
    Cc: Kentaro Takeda
    Cc: Matt Helsley
    Cc: Nick Piggin
    Cc: Oleg Nesterov
    Cc: Peter Zijlstra
    Cc: Robert Richter
    Cc: Suresh Siddha
    Cc: Tetsuo Handa
    Cc: Venkatesh Pallipadi
    Acked-by: Linus Torvalds
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Konstantin Khlebnikov
     
  • Pull sound updates from Takashi Iwai:
    "This contains pretty many small commits covering fairly large range of
    files in sound/ directory. Partly because of additional API support
    and partly because of constantly developed ASoC and ARM stuff.

    Some highlights:

    - Introduced the helper function and documentation for exposing the
    channel map via control API, as discussed in Plumbers; most of PCI
    drivers are covered, will follow more drivers later

    - Most of drivers have been replaced with the new PM callbacks (if
    the bus is supported)

    - HD-audio controller got the support of runtime PM and the support
    of D3 clock-stop. Also changing the power_save option in sysfs
    kicks off immediately to enable / disable the power-save mode.

    - Another significant code change in HD-audio is the rewrite of
    firmware loading code. Other than that, most of changes in
    HD-audio are continued cleanups and standardization for the generic
    auto parser and bug fixes (HBR, device-specific fixups), in
    addition to the support of channel-map API.

    - Addition of ASoC bindings for the compressed API, used by the
    mid-x86 drivers.

    - Lots of cleanups and API refreshes for ASoC codec drivers and
    DaVinci.

    - Conversion of OMAP to dmaengine.

    - New machine driver for Wolfson Microelectronics Bells.

    - New CODEC driver for Wolfson Microelectronics WM0010.

    - Enhancements to the ux500 and wm2000 drivers

    - A new driver for DA9055 and the support for regulator bypass mode."

    Fix up various arm soc header file reorg conflicts.

    * tag 'sound-3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (339 commits)
    ALSA: hda - Add new codec ALC283 ALC290 support
    ALSA: hda - avoid unneccesary indices on "Headphone Jack" controls
    ALSA: hda - fix indices on boost volume on Conexant
    ALSA: aloop - add locking to timer access
    ALSA: hda - Fix hang caused by race during suspend.
    sound: Remove unnecessary semicolon
    ALSA: hda/realtek - Fix detection of ALC271X codec
    ALSA: hda - Add inverted internal mic quirk for Lenovo IdeaPad U310
    ALSA: hda - make Realtek/Sigmatel/Conexant use the generic unsol event
    ALSA: hda - make a generic unsol event handler
    ASoC: codecs: Add DA9055 codec driver
    ASoC: eukrea-tlv320: Convert it to platform driver
    ALSA: ASoC: add DT bindings for CS4271
    ASoC: wm_hubs: Ensure volume updates are handled during class W startup
    ASoC: wm5110: Adding missing volume update bits
    ASoC: wm5110: Add OUT3R support
    ASoC: wm5110: Add AEC loopback support
    ASoC: wm5110: Rename EPOUT to HPOUT3
    ASoC: arizona: Add more clock rates
    ASoC: arizona: Add more DSP options for mixer input muxes
    ...

    Linus Torvalds
     

27 Sep, 2012

1 commit


23 Sep, 2012

1 commit


17 Sep, 2012

2 commits


15 Sep, 2012

1 commit


14 Sep, 2012

1 commit


13 Sep, 2012

1 commit


11 Sep, 2012

3 commits


07 Sep, 2012

3 commits

  • The VOLATILE flag was added to control elements by
    snd_pcm_add_chmap_ctls() just because I didn't want to have a
    side-effect of "alsactl restore". But now the set operation doesn't
    allow to change the value unless the PCM stream is in PREAPRED state,
    there is no reason to keep this flag. Let's rip it off.

    Signed-off-by: Takashi Iwai

    Takashi Iwai
     
  • The SNDRV_CTL_ELEM_ACCESS_VOLATILE bit flag wasn't properly inherited
    at creating control elements via snd_ctl_new1().

    Signed-off-by: Takashi Iwai

    Takashi Iwai
     
  • This patch implements the basic data types for the standard channel
    mapping API handling.

    - The definitions of the channel positions and the new TLV types are
    added in sound/asound.h and sound/tlv.h, so that they can be
    referred from user-space.

    - Introduced a new helper function snd_pcm_add_chmap_ctls() to create
    control elements representing the channel maps for each PCM
    (sub)stream.

    - Some standard pre-defined channel maps are provided for
    convenience.

    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

05 Sep, 2012

1 commit


04 Sep, 2012

1 commit

  • Remove the main ALSA version number from the kernel ALSA driver.
    The ALSA driver package release diverges from the upstream. This may
    confuse users to see the same ALSA version for many kernel releases
    and this version lost it's original purpose and connection.

    The "ioctl" APIs have own version numbers, so the user space may check
    for specific API changes only.

    Signed-off-by: Jaroslav Kysela

    Jaroslav Kysela
     

03 Sep, 2012

1 commit