27 Apr, 2015

2 commits


21 Feb, 2015

3 commits

  • can be removed without breaking git-bisect now

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

    Pierre-Louis Bossart
     
  • Introduce more generic .get_time_info to retrieve
    system timestamp and audio timestamp in single routine.
    Backwards compatibility is preserved with same functionality
    as with .wall_clock method (to be removed in following commits
    to avoid breaking git bisect)

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

    Pierre-Louis Bossart
     
  • Audio timestamps can be extracted from sample counters, wall clocks,
    PHC clocks (Ethernet AVB), on-demand synchronized snapshots. This
    patch provides the ability to report timestamping capabilities, select
    timestamp types and retrieve timestamp accuracy, if supported.
    Details can be found in Documentations/sound/alsa/timestamping.txt

    This functionality is introduced by reclaiming the reserved_aligned
    field introduced by commit9c7066aef4a5eb8e4063de28f06c508bf6f2963a
    in snd_pcm_status to provide userspace with selection/query capabilities.
    Additional driver_tstamp and audio_tstamp_accuracy fields are also added.

    snd_pcm_mmap_status remains a read-only structure with only
    the audio timestamp value accessible from user space. The selection
    of audio timestamp type is done through snd_pcm_status only

    This commit does not impact ABI and does not impact the default
    behavior. By default audio timestamp is aligned with hw_pointer and
    reports the DMA position. Backwards compatibility is handled by using
    the HDAudio wall clock for playback and the hw_ptr for all other
    cases.

    For timestamp selection a new STATUS_EXT ioctl is introduced with
    read/write parameters. Alsa-lib will be modified to make use of
    STATUS_EXT.

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

    Pierre-Louis Bossart
     

09 Feb, 2015

1 commit


05 Feb, 2015

2 commits


04 Feb, 2015

1 commit


02 Feb, 2015

1 commit

  • Like previous patches, at this time we embed the struct device into
    PCM object. However, this needs a bit more caution: struct snd_pcm
    doesn't own one device but two, for both playback and capture! Thus
    not struct snd_pcm but struct snd_pcm_str object contains the device.

    Along with this change, pcm->dev field is dropped for avoiding
    confusion. It was meant to point to a non-standard parent. But,
    since now we can touch each struct device directly, we can manipulate
    the parent field easily there, too.

    Reviewed-by: Jaroslav Kysela
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

29 Jan, 2015

1 commit

  • Add helper functions to allow drivers to specify several disjoint
    ranges for a variable. In particular, there is a codec (PCM512x) that
    has a hole in its supported range of rates, due to PLL and divider
    restrictions.

    This is like snd_pcm_hw_constraint_list(), but for ranges instead of
    points.

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

    Peter Rosin
     

04 Jan, 2015

1 commit

  • Remove function declarations for functions that don't have a matching
    implementation.

    For snd_pcm_build_linear_format the implementation was removed in
    64d27f96cb719cf8 ("[ALSA] Support 3-bytes 24bit format in PCM OSS
    emulation"). All the others never had one (as far as git history goes).

    Signed-off-by: Lars-Peter Clausen
    Signed-off-by: Takashi Iwai

    Lars-Peter Clausen
     

01 Jan, 2015

1 commit


30 Dec, 2014

2 commits


29 Nov, 2014

1 commit


21 Nov, 2014

1 commit


10 Nov, 2014

1 commit

  • Add a new helper function snd_pcm_stop_xrun() to the standard sequnce
    lock/snd_pcm_stop(XRUN)/unlock by a single call, and replace the
    existing open codes with this helper.

    The function checks the PCM running state to prevent setting the wrong
    state, too, for more safety.

    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

04 Nov, 2014

1 commit

  • This patch adds a new proc entry for PCM substreams to inject an
    XRUN. When a PCM substream is running and any value is written to its
    xrun_injection proc file, the driver triggers XRUN. This is a useful
    feature for debugging XRUN and error handling code paths.

    Note that this entry is enabled only when CONFIG_SND_PCM_XRUN_DEBUG is
    set.

    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

30 Oct, 2014

3 commits


08 Sep, 2014

1 commit

  • XMOS based USB DACs with native DSD support expose this feature via a USB
    alternate setting. The audio format is either 32-bit raw or a 32-bit PCM format.
    To utilize this feature on linux this patch introduces a new 32-bit DSD
    sampleformat DSD_U32_LE.
    A follow up patch will add a quirk for XMOS based devices to utilize the new format.
    Further patches will add support to alsa-lib.

    Signed-off-by: Jurgen Kramer
    Signed-off-by: Takashi Iwai

    Jurgen Kramer
     

03 Sep, 2014

2 commits

  • The previous commit for the non-atomic PCM ops added more codes to
    snd_pcm_stream_lock() and its variants. Since they are inlined
    functions, it resulted in a significant code size bloat. For reducing
    the size bloat, this patch changes the inline functions to the normal
    function calls. The export of rwlock and rwsem are removed as well,
    since they are referred only in pcm_native.c now.

    Signed-off-by: Takashi Iwai

    Takashi Iwai
     
  • Currently, many PCM operations are performed in a critical section
    protected by spinlock, typically the trigger and pointer callbacks are
    assumed to be atomic. This is basically because some trigger action
    (e.g. PCM stop after drain or xrun) is done in the interrupt handler.
    If a driver runs in a threaded irq, however, this doesn't have to be
    atomic. And many devices want to handle trigger in a non-atomic
    context due to lengthy communications.

    This patch tries all PCM calls operational in non-atomic context.
    What it does is very simple: replaces the substream spinlock with the
    corresponding substream mutex when pcm->nonatomic flag is set. The
    driver that wants to use the non-atomic PCM ops just needs to set the
    flag and keep the rest as is. (Of course, it must not handle any PCM
    ops in irq context.)

    Note that the code doesn't check whether it's atomic-safe or not, but
    trust in 100% that the driver sets pcm->nonatomic correctly.

    One possible problem is the case where linked PCM substreams have
    inconsistent nonatomic states. For avoiding this, snd_pcm_link()
    returns an error if one tries to link an inconsistent PCM substream.

    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

10 Jul, 2014

1 commit

  • For applications which need to synchronise with external timebases such
    as broadcast TV applications the kernel monotonic time is not optimal as
    it includes adjustments from NTP and so may still include discontinuities
    due to that. A raw monotonic time which does not include any adjustments
    is available in the kernel from getrawmonotonic() so provide userspace with
    a new timestamp type SNDRV_PCM_TSTAMP_TYPE_MONOTONIC_RAW which provides
    timestamps based on this as an option.

    [dropped tstamp_type assignment code, as it's no longer needed -- tiwai]

    Reported-by: Daniel Thompson
    Signed-off-by: Mark Brown
    Acked-by: Jaroslav Kysela
    Signed-off-by: Takashi Iwai

    Mark Brown
     

12 Jun, 2014

1 commit


14 Feb, 2014

1 commit


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
     

09 Jan, 2014

1 commit

  • Nowadays we have CMA for obtaining the contiguous memory pages
    efficiently. Let's kill the old kludge for reserving the memory pages
    for large buffers. It was rarely useful (only for preserving pages
    among module reloading or a little help by an early boot scripting),
    used only by a couple of drivers, and yet it gives too much ugliness
    than its benefit.

    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

24 May, 2013

1 commit


04 May, 2013

1 commit

  • Pull sound updates from Takashi Iwai:
    "Mostly many small changes spread as seen in diffstat in sound/*
    directory by this update. A significant change in the subsystem level
    is the introduction of snd_soc_component, which will help more generic
    handling of SoC and off-SoC components.

    Also, snd_BUG_ON() macro is enabled unconditionally now due to its
    misuses, so people might hit kernel warnings (it's a good thing for
    us).

    - compress-offload: support for capture by Charles Keepax
    - HD-audio: codec delay support by Dylan Reid
    - HD-audio: improvements/fixes in generic parser: better headphone
    mic and headset mic support, jack_modes hint consolidation, proper
    beep attach/detachment, generalized power filter controls by David
    Henningsson, et al
    - HD-audio: Improved management of HDMI codec pins/converters
    - HD-audio: Better pin/DAC assignment for VIA codecs
    - HD-audio: Haswell HDMI workarounds
    - HD-audio: ALC268 codec support, a few new quirks for Chromebooks
    - USB: regression fixes: USB-MIDI autopm fix, the recent ISO latency
    fix by Clemens Ladisch
    - USB: support for DSD formats by Daniel Mack
    - USB: A few UAC2 device endian/cock fixes by Eldad Zack
    - USB: quirks for Emu 192kHz support, Novation Twitch DJ controller,
    Yamaha THRxx devices
    - HDSPM: updates for TCO controls by Adrian Knoth
    - ASoC: Add a snd_soc_component object type for generic handling of
    SoC and off-SoC components by Kuninori Morimoto,
    - dmaengine: a large set of cleanups and conversions by Lars-Peter
    Clausen
    - ASoC DAPM: performance optimizations from Ryo Tsutsui
    - ASoC DAPM: support for mixer control sharing by Stephen Warren
    - ASoC: multiplatform ARM cleanups from Arnd Bergmann
    - ASoC: new codec drivers for AK5385 and TAS5086 from Daniel Mack"

    * tag 'sound-3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (315 commits)
    ALSA: usb-audio: caiaq: fix endianness bug in snd_usb_caiaq_maschine_dispatch
    ALSA: asihpi: add format support check in snd_card_asihpi_capture_formats
    ALSA: pcm_format_to_bits strong-typed conversion
    ALSA: compress: fix the states to check for allowing read
    ALSA: hda - Move Thinkpad X220 to use auto parser
    ALSA: USB: adjust for changed 3.8 USB API
    ALSA: usb - Avoid unnecessary sample rate changes on USB 2.0 clock sources
    sound: oss/dmabuf: use dma_map_single
    ALSA: ali5451: use mdelay instead of large udelay constants
    ALSA: hda - Add the support for ALC286 codec
    ALSA: usb-audio: USB quirk for Yamaha THR10C
    ALSA: usb-audio: USB quirk for Yamaha THR5A
    ALSA: usb-audio: USB quirk for Yamaha THR10
    ALSA: usb-audio: Fix autopm error during probing
    ALSA: snd-usb: try harder to find USB_DT_CS_ENDPOINT
    ALSA: sound kconfig typo
    ALSA: emu10k1: Fix dock firmware loading
    ASoC: ux500: forward declare msp_i2s_platform_data
    ASoC: davinci-mcasp: Add Support BCLK-to-LRCLK ratio for TDM modes
    ASoC: davinci-pcm, davinci-mcasp: Clean up active_serializers
    ...

    Linus Torvalds
     

29 Apr, 2013

1 commit


24 Apr, 2013

1 commit


18 Apr, 2013

1 commit

  • This patch adds two formats for Direct Stream Digital (DSD), a
    pulse-density encoding format which is described here:
    https://en.wikipedia.org/wiki/Direct_Stream_Digital

    DSD operates on 2.8, 5.6 or 11.2MHz sample rates and as a 1-bit
    stream.

    The two new types added by this patch describe streams that are capable
    of handling DSD samples in DOP format as 8-bit or in 16-bit (or at a x8
    or x16 data rate, respectively).

    DSD itself specifies samples in *bit*, while DOP and ALSA handle them
    as *bytes*. Hence, a factor of 8 or 16 has to be applied for the sample
    rare configuration, according to the following table:

    configured hardware
    176.4KHz 352.8kHz 705.6KHz
    Signed-off-by: Takashi Iwai

    Daniel Mack
     

12 Mar, 2013

1 commit

  • script/kernel-doc reports the following type of warnings (when run in verbose
    mode):

    Warning(sound/core/init.c:152): No description found for return value of
    'snd_card_create'

    To fix that:
    - add missing descriptions of function return values
    - use "Return:" sections to describe those return values

    Along the way:
    - complete some descriptions
    - fix some typos

    Signed-off-by: Yacine Belkadi
    Signed-off-by: Takashi Iwai

    Yacine Belkadi
     

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

1 commit

  • 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