1. 14 2月, 2014 1 次提交
  2. 10 2月, 2014 1 次提交
    • T
      ALSA: Replace with IS_ENABLED() · 8eeaa2f9
      Takashi Iwai 提交于
      Replace the lengthy #if defined(XXX) || defined(XXX_MODULE) with the
      new IS_ENABLED() macro.
      
      The patch still doesn't cover all ifdefs.  For example, the dependency
      on CONFIG_GAMEPORT is still open-coded because this also has an extra
      dependency on MODULE.  Similarly, an open-coded ifdef in pcm_oss.c and
      some sequencer-related stuff are left untouched.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      8eeaa2f9
  3. 01 11月, 2013 1 次提交
    • R
      ALSA: fix oops in snd_pcm_info() caused by ASoC DPCM · a4461f41
      Russell King 提交于
      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 : [<c031b52c>]    lr : [<30232065>]    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)
      [<c031b52c>] (snd_pcm_info) from [<c031b570>] (snd_pcm_info_user+0x34/0x9c)
      [<c031b570>] (snd_pcm_info_user) from [<c03164a4>] (snd_pcm_control_ioctl+0x274/0x280)
      [<c03164a4>] (snd_pcm_control_ioctl) from [<c0311458>] (snd_ctl_ioctl+0xc0/0x55c)
      [<c0311458>] (snd_ctl_ioctl) from [<c00eca84>] (do_vfs_ioctl+0x80/0x31c)
      [<c00eca84>] (do_vfs_ioctl) from [<c00ecd5c>] (SyS_ioctl+0x3c/0x60)
      [<c00ecd5c>] (SyS_ioctl) from [<c000e500>] (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: NRussell King <rmk+kernel@arm.linux.org.uk>
      Acked-by: NMark Brown <broonie@linaro.org>
      Cc: <stable@vger.kernel.org> [v3.4+]
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      a4461f41
  4. 18 4月, 2013 1 次提交
    • D
      ALSA: add DSD formats · ef7a4f97
      Daniel Mack 提交于
      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     <----       sample rate
      
      8-bit                2.8MHz     5.6MHz
      16-bit    2.8Mhz     5.6MHz    11.2MHz
      
               `-----------------------------'
                   actual DSD sample rates
      Signed-off-by: NDaniel Mack <zonque@gmail.com>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      ef7a4f97
  5. 12 3月, 2013 1 次提交
  6. 21 11月, 2012 1 次提交
  7. 30 10月, 2012 2 次提交
  8. 07 9月, 2012 1 次提交
    • T
      ALSA: PCM: channel mapping API implementation · 2d3391ec
      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: NTakashi Iwai <tiwai@suse.de>
      2d3391ec
  9. 12 3月, 2012 1 次提交
    • P
      device.h: cleanup users outside of linux/include (C files) · 51990e82
      Paul Gortmaker 提交于
      For files that are actively using linux/device.h, make sure
      that they call it out.  This will allow us to clean up some
      of the implicit uses of linux/device.h within include/*
      without introducing build regressions.
      
      Yes, this was created by "cheating" -- i.e. the headers were
      cleaned up, and then the fallout was found and fixed, and then
      the two commits were reordered.  This ensures we don't introduce
      build regressions into the git history.
      Signed-off-by: NPaul Gortmaker <paul.gortmaker@windriver.com>
      51990e82
  10. 09 2月, 2012 1 次提交
    • L
      ALSA: PCM - Add PCM creation API for internal PCMs. · 945e5038
      Liam Girdwood 提交于
      The new ASoC dynamic PCM core needs to create PCMs and substreams that are
      for use by internal ASoC drivers only and not visible to userspace for
      direct IO. These new PCMs are similar to regular PCMs expect they have no
      device nodes or procfs entries. The ASoC component drivers use them in exactly
      the same way as regular PCMs for PCM and DAI operations.
      
      The intention is that a dynamic PCM based driver will register both regular
      PCMs and internal PCMs. The regular PCMs will be used for all IO with userspace
      however the internal PCMs will be used by the driver to route digital audio
      through numerous back end DAI links (with potentially a DSP providing different
      hw_params, DAI formats based on the regular front end PCM params) to devices
      like CODECs, MODEMs, Bluetooth, FM, DMICs, etc
      
      This patch adds a new snd_pcm_new_internal() API call to create the internal PCM
      without device nodes or procfs. It also adds adds a new internal flag to snd_pcm.
      
      [fixed minor coding-style issues by tiwai]
      Signed-off-by: NLiam Girdwood <lrg@ti.com>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      945e5038
  11. 01 11月, 2011 1 次提交
  12. 15 2月, 2011 1 次提交
  13. 17 9月, 2010 1 次提交
  14. 07 9月, 2010 1 次提交
  15. 28 8月, 2010 1 次提交
    • D
      ALSA: pcm: add more format names · 7a28826a
      Dan Carpenter 提交于
      There were some new formats added in commit 15c0cee6 "ALSA: pcm:
      Define G723 3-bit and 5-bit formats".  That commit increased
      SNDRV_PCM_FORMAT_LAST as well.  My concern is that there are a couple
      places which do:
      
              for (i = 0; i < SNDRV_PCM_FORMAT_LAST; i++) {
                      if (dummy->pcm_hw.formats & (1ULL << i))
                              snd_iprintf(buffer, " %s", snd_pcm_format_name(i));
              }
      
      I haven't tested these but it looks like if "i" were equal to
      SNDRV_PCM_FORMAT_G723_24 or higher then we might read past the end of
      the array.
      Signed-off-by: NDan Carpenter <error27@gmail.com>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      7a28826a
  16. 11 5月, 2010 1 次提交
    • M
      PM QOS update · ed77134b
      Mark Gross 提交于
      This patch changes the string based list management to a handle base
      implementation to help with the hot path use of pm-qos, it also renames
      much of the API to use "request" as opposed to "requirement" that was
      used in the initial implementation.  I did this because request more
      accurately represents what it actually does.
      
      Also, I added a string based ABI for users wanting to use a string
      interface.  So if the user writes 0xDDDDDDDD formatted hex it will be
      accepted by the interface.  (someone asked me for it and I don't think
      it hurts anything.)
      
      This patch updates some documentation input I got from Randy.
      Signed-off-by: Nmarkgross <mgross@linux.intel.com>
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      ed77134b
  17. 21 1月, 2010 1 次提交
  18. 07 1月, 2010 1 次提交
  19. 10 11月, 2009 1 次提交
  20. 06 11月, 2009 1 次提交
  21. 30 10月, 2009 1 次提交
  22. 08 9月, 2009 1 次提交
  23. 09 3月, 2009 1 次提交
  24. 05 2月, 2009 1 次提交
  25. 25 9月, 2008 1 次提交
    • T
      ALSA: fix locking in snd_pcm_open*() and snd_rawmidi_open*() · 399ccdc1
      Takashi Iwai 提交于
      The PCM and rawmidi open callbacks have a lock against card->controls_list
      but it takes a wrong one, card->controls_rwsem, instead of a right one
      card->ctl_files_rwlock.  This patch fixes them.
      
      This change also fixes automatically the potential deadlocks due to
      mm->mmap_sem in munmap and copy_from/to_user, reported by Sitsofe
      Wheeler:
      
        A: snd_ctl_elem_user_tlv(): card->controls_rwsem => mm->mmap_sem
        B: snd_pcm_open(): card->open_mutex => card->controls_rwsem
        C: munmap: mm->mmap_sem => snd_pcm_release(): card->open_mutex
      
      The patch breaks the chain.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      399ccdc1
  26. 13 8月, 2008 1 次提交
  27. 01 8月, 2008 2 次提交
  28. 30 7月, 2008 1 次提交
    • P
      ALSA: Fix limit of 8 PCM devices in SNDRV_CTL_IOCTL_PCM_NEXT_DEVICE · 94239690
      Pawel MOLL 提交于
      When compiled with CONFIG_SND_DYNAMIC_MINORS the ALSA core is fine
      to have more than 8 PCM devices per card, except one place - the
      SNDRV_CTL_IOCTL_PCM_NEXT_DEVICE ioctl, which will not enumerate
      devices > 7. This patch fixes the issue, changing the devices list
      organisation.
      
      Instead of adding new device to the tail, the list is now kept always
      ordered (by card number, then device number). Thus, during enumeration,
      it is easy to discover the fact that there is no more given card's
      devices. The same limit was present in OSS emulation code. It has
      been fixed as well.
      
      Additionally the device field of struct snd_pcm is now int, instead of
      unsigned int, as there is no obvious reason for keeping it unsigned.
      This caused a lot of problems with comparing this value with other
      (almost always signed) variables. There is just one more place where
      device number is unsigned - in struct snd_pcm_info, which should be
      also sorted out in future.
      Signed-off-by: NPawel MOLL <pawel.moll@st.com>
      Signed-off-by: NJaroslav Kysela <perex@perex.cz>
      94239690
  29. 01 2月, 2008 4 次提交
    • J
      [ALSA] PCM interface - rename SNDRV_PCM_TSTAMP_MMAP to SNDRV_PCM_TSTAMP_ENABLE · 8c121586
      Jaroslav Kysela 提交于
      Change semantics for SNDRV_PCM_TSTAMP_MMAP. Doing timestamping only in
      the interrupt handler might cause that hw_ptr is not related to actual
      timestamp. With this change, grab timestamp at every hw_ptr update to
      have always valid timestamp + ring buffer position pair.
      With this change, SNDRV_PCM_TSTAMP_MMAP was renamed to
      SNDRV_PCM_TSTAMP_ENABLE. It's no regression (I think).
      Signed-off-by: NJaroslav Kysela <perex@perex.cz>
      8c121586
    • T
      [ALSA] Remove sound/driver.h · 9004acc7
      Takashi Iwai 提交于
      This header file exists only for some hacks to adapt alsa-driver
      tree.  It's useless for building in the kernel.  Let's move a few
      lines in it to sound/core.h and remove it.
      With this patch, sound/driver.h isn't removed but has just a single
      compile warning to include it.  This should be really killed in
      future.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      Signed-off-by: NJaroslav Kysela <perex@perex.cz>
      9004acc7
    • T
      [ALSA] Remove PCM sleep_min and tick · 31e8960b
      Takashi Iwai 提交于
      The 'tick' in PCM is set (again) via sw_params.  And, nobody uses
      this feature at all except for a command line option of aplay.
      (This is literally 'nobody', as I checked alsa-lib API calls in all
       programs in major distros.)
      Above all, if we need finer wake-ups for the position update, it's
      basically an issue that the driver should solve, not tuned by each
      application.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      Signed-off-by: NJaroslav Kysela <perex@perex.cz>
      31e8960b
    • T
      [ALSA] Remove PCM xfer_align sw params · d948035a
      Takashi Iwai 提交于
      The xfer_align sw_params parameter has never been used in a sane manner,
      and no one understands what this does exactly.  The current
      implementation looks also buggy because it allows write of shorter size
      than xfer_align.  So, if you do partial writes, the write isn't actually
      aligned at all.
      Removing this parameter will make some pcm_lib_* code more readable
      (and less buggy).
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      Signed-off-by: NJaroslav Kysela <perex@perex.cz>
      d948035a
  30. 16 10月, 2007 1 次提交
  31. 09 2月, 2007 3 次提交
  32. 20 12月, 2006 1 次提交
  33. 02 12月, 2006 1 次提交
    • G
      Driver core: convert sound core to use struct device · d80f19fa
      Greg Kroah-Hartman 提交于
      Converts from using struct "class_device" to "struct device" making
      everything show up properly in /sys/devices/ with symlinks from the
      /sys/class directory.
      
      It also makes the struct sound_card to show up as a "real" device
      where all the different sound class devices are placed as childs
      and different card attribute files can hang off of. /sys/class/sound is
      still a flat directory, but the symlink targets of all devices belonging
      to the same card, point the the /sys/devices tree below the new card
      device object.
      
      Thanks to Kay for the updates to this patch.
      Signed-off-by: NKay Sievers <kay.sievers@novell.com>
      Acked-by: NJaroslav Kysela <perex@suse.cz>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      d80f19fa