19 Mar, 2014

1 commit

  • The snd_compr_open function would always return 0 even if the compressed
    ops open function failed, obviously this is incorrect. Looks like this
    was introduced by a small typo in:

    commit a0830dbd4e42b38aefdf3fb61ba5019a1a99ea85
    ALSA: Add a reference counter to card instance

    This patch returns the value from the compressed op as it should.

    Signed-off-by: Charles Keepax
    Acked-by: Vinod Koul
    Cc:
    Signed-off-by: Takashi Iwai

    Charles Keepax
     

23 Jan, 2014

2 commits

  • There are two loops that are almost identical but only with different
    checks. Refactor them with a simple helper, and give a bit more
    comments what's doing there.

    Signed-off-by: Takashi Iwai

    Takashi Iwai
     
  • The test here is intended intended to prevent shift wrapping bugs when
    we do "1U << idx2". We should consider the number of bits in a u32
    instead of the number of bytes.

    [fix another chunk similarly by tiwai]

    Fixes: 7bb2491b35a2 ('ALSA: Add kconfig to specify the max card numbers')
    Signed-off-by: Dan Carpenter
    Cc:
    Signed-off-by: Takashi Iwai

    Dan Carpenter
     

16 Jan, 2014

1 commit


15 Jan, 2014

1 commit

  • A bit of special care is necessary when creating the intersection of two rate
    masks. This comes from the special meaning of the SNDRV_PCM_RATE_CONTINUOUS and
    SNDRV_PCM_RATE_KNOT bits, which needs special handling when intersecting two
    rate masks. SNDRV_PCM_RATE_CONTINUOUS means the hardware supports all rates in a
    specific interval. SNDRV_PCM_RATE_KNOT means the hardware supports a set of
    discrete rates specified by a list constraint. For all other cases the supported
    rates are specified directly in the rate mask.

    Signed-off-by: Lars-Peter Clausen
    Reviewed-by: Takashi Iwai
    Signed-off-by: Mark Brown

    Lars-Peter Clausen
     

11 Jan, 2014

1 commit

  • The failures of buffer preallocations at driver initializations aren't
    critical but it's still helpful to inform, so that user can know that
    something doesn't work as expected.

    For example, the recent page allocator change triggered regressions,
    but developers didn't notice until recently because the driver didn't
    complain.

    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

09 Jan, 2014

4 commits


05 Jan, 2014

1 commit


17 Dec, 2013

1 commit

  • When the process is sleeping at the SNDRV_PCM_STATE_PAUSED
    state from the wait_for_avail function, the sleep process will be woken by
    timeout(10 seconds). Even if the sleep process wake up by timeout, by this
    patch, the process will continue with sleep and wait for the other state.

    Signed-off-by: JongHo Kim
    Cc:
    Signed-off-by: Takashi Iwai

    JongHo Kim
     

17 Nov, 2013

1 commit

  • Pull sound fixes from Takashi Iwai:
    "Two peaks in diffstat are for the audio EQ init of IDT codecs and the
    EMU2004 usb mixer addition, both of which are pretty device-specific,
    so safe to apply. The rest are a bunch of small fixes, most of them
    are regression fixes"

    * tag 'sound-fix-3.13-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (26 commits)
    ALSA: hda - load EQ params into IDT codec on HP bNB13 systems
    ASoC: cs42l52: Correct MIC CTL mask
    ASoC: wm8962: Turn on regcache_cache_only before disabling regulator
    ALSA: jack: Unregister input device at disconnection
    ALSA: pcsp: Fix the order of input device unregistration
    ASoC: fsl: imx-pcm-fiq: omit fiq counter to avoid harm in unbalanced situations
    ASoC: blackfin: Fix missing break
    ALSA: usb-audio: add front jack channel selector for EMU0204
    ALSA: hda - Don't clear the power state at snd_hda_codec_reset()
    ASoC: arizona: Fix typo in name of EQ coefficient controls
    ALSA: hda - Control EAPD for Master volume on Lenovo N100
    ALSA: hda - Don't turn off EAPD for headphone on Lenovo N100
    ALSA: isa: not allocating enough space
    ALSA: snd-aoa: two copy and paste bugs
    ASoC: wm8997: Correct typo in ISRC mux routes
    ALSA: hda - Check keep_eapd_on before inv_eapd
    ALSA: hda - Fix Line Out automute on Realtek multifunction jacks
    ALSA: msnd: Avoid duplicated driver name
    ALSA: compress_core: don't return -EBADFD from poll if paused
    ALSA: hda - hdmi: Fix wrong baseline length in ATI/AMD generated ELD
    ...

    Linus Torvalds
     

15 Nov, 2013

2 commits

  • Since gen_pool_dma_alloc() is introduced, we implement it to simplify code.

    Signed-off-by: Nicolin Chen
    Acked-by: Takashi Iwai
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nicolin Chen
     
  • The recent change in sysfs triggered a kernel WARNING at unloading a
    sound driver like

    WARNING: CPU: 3 PID: 2247 at fs/sysfs/group.c:214 sysfs_remove_group+0xe8/0xf0()
    sysfs group ffffffff81ab7b20 not found for kobject 'event14'

    for each jack instance. It's because the unregistration of jack input
    device is done in dev_free callback, which is called after
    snd_card_disconnect(). Since device_unregister(card->card_dev) is
    called in snd_card_disconnect(), the whole sysfs entries belonging to
    card->card_dev have been already removed recursively. Thus this
    results in a warning as input_unregister_device() yet tries to
    unregister the already removed sysfs entry.

    For fixing this mess, we need to unregister the jack input device at
    dev_disconnect callback so that it's called before unregistering the
    card->card_dev.

    Reviwed-by: Mark Brown
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

13 Nov, 2013

1 commit

  • Pull vfs updates from Al Viro:
    "All kinds of stuff this time around; some more notable parts:

    - RCU'd vfsmounts handling
    - new primitives for coredump handling
    - files_lock is gone
    - Bruce's delegations handling series
    - exportfs fixes

    plus misc stuff all over the place"

    * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (101 commits)
    ecryptfs: ->f_op is never NULL
    locks: break delegations on any attribute modification
    locks: break delegations on link
    locks: break delegations on rename
    locks: helper functions for delegation breaking
    locks: break delegations on unlink
    namei: minor vfs_unlink cleanup
    locks: implement delegations
    locks: introduce new FL_DELEG lock flag
    vfs: take i_mutex on renamed file
    vfs: rename I_MUTEX_QUOTA now that it's not used for quotas
    vfs: don't use PARENT/CHILD lock classes for non-directories
    vfs: pull ext4's double-i_mutex-locking into common code
    exportfs: fix quadratic behavior in filehandle lookup
    exportfs: better variable name
    exportfs: move most of reconnect_path to helper function
    exportfs: eliminate unused "noprogress" counter
    exportfs: stop retrying once we race with rename/remove
    exportfs: clear DISCONNECTED on all parents sooner
    exportfs: more detailed comment for path_reconnect
    ...

    Linus Torvalds
     

12 Nov, 2013

1 commit

  • Pausing audio playback is not an illegal state so it doesn't
    seem sensible for poll() to return -EBADFD on a paused stream.
    There's also no reason to assume that we can't write more data
    to the DSP while playback is paused. Remove the -EBADFD so that
    a stream in paused state will still report the buffer
    availability from poll(). It is up to the user process to
    manage its state so that it knows whether it is paused or not.

    Signed-off-by: Richard Fitzgerald
    Acked-by VInod Koul
    Signed-off-by: Takashi Iwai

    Richard Fitzgerald
     

07 Nov, 2013

1 commit

  • The drain and drain_notify callback were blocked by low level driver
    until the draining was complete. Due to this being invoked with big
    fat mutex held, others ops like reading timestamp, calling pause, drop
    were blocked.

    So to fix this we add a new snd_compr_drain_notify() API. This would
    be required to be invoked by low level driver when drain or partial
    drain has been completed by the DSP. Thus we make the drain and
    partial_drain callback as non blocking and driver returns immediately
    after notifying DSP. The waiting is done while releasing the lock so
    that other ops can go ahead.

    [ The commit 917f4b5cba78 was wrongly applied from the preliminary
    patch. This commit corrects to the final version.
    Sorry for inconvenience! -- tiwai ]

    Signed-off-by: Vinod Koul
    CC: stable@vger.kernel.org
    Signed-off-by: Takashi Iwai

    Vinod Koul
     

04 Nov, 2013

1 commit


01 Nov, 2013

1 commit

  • Unable to handle kernel NULL pointer dereference at virtual address 00000008
    pgd = d5300000
    [00000008] *pgd=0d265831, *pte=00000000, *ppte=00000000
    Internal error: Oops: 17 [#1] PREEMPT ARM
    CPU: 0 PID: 2295 Comm: vlc Not tainted 3.11.0+ #755
    task: dee74800 ti: e213c000 task.ti: e213c000
    PC is at snd_pcm_info+0xc8/0xd8
    LR is at 0x30232065
    pc : [] lr : [] psr: a0070013
    sp : e213dea8 ip : d81cb0d0 fp : c05f7678
    r10: c05f7770 r9 : fffffdfd r8 : 00000000
    r7 : d8a968a8 r6 : d8a96800 r5 : d8a96200 r4 : d81cb000
    r3 : 00000000 r2 : d81cb000 r1 : 00000001 r0 : d8a96200
    Flags: NzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment user
    Control: 10c5387d Table: 15300019 DAC: 00000015
    Process vlc (pid: 2295, stack limit = 0xe213c248)
    [] (snd_pcm_info) from [] (snd_pcm_info_user+0x34/0x9c)
    [] (snd_pcm_info_user) from [] (snd_pcm_control_ioctl+0x274/0x280)
    [] (snd_pcm_control_ioctl) from [] (snd_ctl_ioctl+0xc0/0x55c)
    [] (snd_ctl_ioctl) from [] (do_vfs_ioctl+0x80/0x31c)
    [] (do_vfs_ioctl) from [] (SyS_ioctl+0x3c/0x60)
    [] (SyS_ioctl) from [] (ret_fast_syscall+0x0/0x48)
    Code: e1a00005 e59530dc e3a01001 e1a02004 (e5933008)
    ---[ end trace cb3d9bdb8dfefb3c ]---

    This is provoked when the ASoC front end is open along with its backend,
    (which causes the backend to have a runtime assigned to it) and then the
    SNDRV_CTL_IOCTL_PCM_INFO is requested for the (visible) backend device.

    Resolve this by ensuring that ASoC internal backend devices are not
    visible to userspace, just as the commentry for snd_pcm_new_internal()
    says it should be.

    Signed-off-by: Russell King
    Acked-by: Mark Brown
    Cc: [v3.4+]
    Signed-off-by: Takashi Iwai

    Russell King
     

29 Oct, 2013

5 commits


28 Oct, 2013

2 commits


25 Oct, 2013

1 commit


24 Oct, 2013

3 commits

  • The drain and drain_notify callback were blocked by low level driver untill the
    draining was complete. Due to this being invoked with big fat mutex held, others
    ops like reading timestamp, calling pause, drop were blocked.

    So to fix this we add a new snd_compr_drain_notify() API. This would be required
    to be invoked by low level driver when drain or partial drain has been completed
    by the DSP. Thus we make the drain and partial_drain callback as non blocking
    and driver returns immediately after notifying DSP.
    The waiting is done while relasing the lock so that other ops can go ahead.

    Signed-off-by: Vinod Koul
    CC: stable@vger.kernel.org
    Signed-off-by: Takashi Iwai

    Vinod Koul
     
  • It turned out that we can't use gen_pool_*() functions on archs
    without CONFIG_GENERIC_ALLOCATOR (resulting in missing symbols), since
    linux/genalloc.h doesn't provide dummy functions for all. We'd be
    able to fix linux/genalloc.h size, but I take an easier path for
    now...

    Reported-by: Fengguang Wu
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     
  • Now it's quite common that an SoC contains its on-chip internal RAM.
    By using this RAM space for DMA buffer during audio playback/record,
    we can shutdown the voltage for external RAM to save power.

    So add new DEV type with iram malloc()/free() and accordingly modify
    current default mmap() for the iram circumstance.

    Signed-off-by: Nicolin Chen
    Reviewed-by: Lars-Peter Clausen
    Signed-off-by: Takashi Iwai

    Nicolin Chen
     

26 Sep, 2013

1 commit


20 Sep, 2013

1 commit


23 Aug, 2013

1 commit

  • ASoC: Updates for v3.12

    - DAPM is now mandatory for CODEC drivers in order to avoid the repeated
    regressions in the special cases for non-DAPM CODECs and make it
    easier to integrate with other components on boards. All existing
    drivers have had some level of DAPM support added.
    - A lot of cleanups in DAPM plus support for maintaining controls in a
    specific state while a DAPM widget all contributed by Lars-Peter Clausen.
    - Core helpers for bitbanged AC'97 reset from Markus Pargmann.
    - New drivers and support for Analog Devices ADAU1702 and ADAU1401(a),
    Asahi Kasei Microdevices AK4554, Atmel AT91ASM9x5 and WM8904 based
    machines, Freescale S/PDIF and SSI AC'97, Renesas R-Car SoCs, Samsung
    Exynos5420 SoCs, Texas Instruments PCM1681 and PCM1792A and Wolfson
    Microelectronics WM8997.
    - Support for building drivers that can support it cross-platform for
    compile test.

    Takashi Iwai
     

19 Aug, 2013

1 commit

  • The use of snd_printd_ratelimit() supresses superfluous output from
    printk_ratelimit() when CONFIG_SND_DEBUG is not defined. For example,

    [ 43.753692] snd_pcm_update_hw_ptr0: 26 callbacks suppressed
    [ 48.822131] snd_pcm_update_hw_ptr0: 25 callbacks suppressed
    [ 53.894953] snd_pcm_update_hw_ptr0: 25 callbacks suppressed
    [ 58.997761] snd_pcm_update_hw_ptr0: 25 callbacks suppressed
    [ 64.100952] snd_pcm_update_hw_ptr0: 25 callbacks suppressed

    fills the log even when no debug output is actually produced.

    Cc: Jaroslav Kysela
    Cc: Takashi Iwai
    Cc: Pierre-Louis Bossart
    Cc: Lars-Peter Clausen
    Cc: Yacine Belkadi
    Signed-off-by: Tim Gardner
    Signed-off-by: Takashi Iwai

    Tim Gardner
     

16 Aug, 2013

1 commit


15 Aug, 2013

1 commit


29 Jul, 2013

1 commit


17 Jul, 2013

1 commit

  • We've got bug reports that the module loading stuck on Debian system
    with 3.10 kernel. The debugging session revealed that the initial
    registration of OSS sequencer clients stuck at module loading time,
    which involves again with request_module() at the init phase. This is
    triggered only by special --install stuff Debian is using, but it's
    still not good to have such loops.

    As a workaround, call the registration part asynchronously. This is a
    better approach irrespective of the hang fix, in anyway.

    Reported-and-tested-by: Philipp Matthias Hahn
    Cc:
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

04 Jul, 2013

1 commit

  • Pull sound updates from Takashi Iwai:
    "A relative calm release at this time with a flat diffstat. The only
    significant change in the ALSA core side is the support for more than
    32 card instances, configurable via kconfig. Other than that, in both
    ASoC and other parts, mostly some improvements and fixes on the driver
    side.

    - hda: More quirks for ALC269-variants on Dell & co, VIA codec fixes
    - hda: Haswell HDMI audio fixes, runtime PM improvements
    - hda: Intel BayTrail support, ALC5505 DSP support
    - es1968: MediaForte M56VAP support
    - usb-audio: Improved support for Yamaha/Roland devices
    - usb-audio: M2Tech hiFace, Audio Advantage Micro II support
    - hdspm: wordclock fixes
    - ASoC: Pending fixes for WM8962
    - ASoC: Cleanups and fixes for Blackfin, SGTL5000 and UX500
    - ASoC: Generalisation of the Bluetooth and HDMI stub drivers
    - ASoC: SSM2518 and RT5640 codec drivers.
    - ASoC: Tegra CPUs with RT5640 machine driver
    - ASoC: AC'97 refactoring bug fixes
    - ASoC: ADAU1701 driver fixes
    - Clean up of *_set_drvdata() in a wide range of drivers"

    * tag 'sound-3.11' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (284 commits)
    ALSA: vmaster: Fix the regression of missing vmaster hook call
    ALSA: hda - Add Dell SSID to support Headset Mic recording
    ASoC: adau1701: remove control_data assignment
    ASoC: adau1701: more direct regmap usage
    ASoC: ac97: fixup multi-platform AC'97 module build failure
    ASoC: pxa2xx: fixup multi-platform AC'97 build failures
    ASoC: tegra20-ac97: Remove unused variable
    ASoC: tegra20-ac97: Remove duplicate error message
    ALSA: usb-audio: Add Audio Advantage Micro II
    ASoC: tas5086: fix Mid-Z implementation
    ASoC: tas5086: fix TAS5086_CLOCK_CONTROL register size
    ALSA: Replace the magic number 44 with const
    ALSA: hda - Fix the max length of control name in generic parser
    ALSA: hda - Guess what, it's two more Dell headset mic quirks
    ALSA: hda - Yet another Dell headset mic quirk
    ALSA: hda - Add support for ALC5505 DSP power-save mode
    ASoC: mfld: Remove unused variable
    ALSA: usb-audio: add quirks for Roland QUAD/OCTO-CAPTURE
    ALSA: usb-audio: claim autodetected PCM interfaces all at once
    ALSA: usb-audio: remove superfluous Roland quirks
    ...

    Linus Torvalds