1. 23 11月, 2012 1 次提交
    • T
      ALSA: hdsp: improve firmware caching · 90caaef6
      Takashi Iwai 提交于
      As the recent firmware code tries to reread and cache the firmware by
      itself, it's even better to keep the struct firmware data instead of
      keeping a local copy.  Also, it makes little sense to disable the fw
      loader for this driver, so added the explicit dependency, too.
      
      Last, but not least, allocate the firmware data loaded via ioctl in
      vmalloc'ed buffer instead, as the firmware size isn't that small.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      90caaef6
  2. 08 11月, 2012 1 次提交
    • A
      ALSA: hdspm - Fix sync check reporting on RME RayDAT · d1a3c98d
      Adrian Knoth 提交于
      The RayDAT reports the sync status of its inputs in consecutive bit
      positions, so all we do in hdspm_s1_sync_check is to iterate over idx:
      
          status = hdspm_read(hdspm, HDSPM_RD_STATUS_1);
      
          lock = (status & (0x1<<idx)) ? 1 : 0;
          sync = (status & (0x100<<idx)) ? 1 : 0;
      
      The index is given in kcontrol->private_value:
      
          HDSPM_SYNC_CHECK("WC SyncCheck", 0),
          HDSPM_SYNC_CHECK("AES SyncCheck", 1),
          HDSPM_SYNC_CHECK("SPDIF SyncCheck", 2),
          HDSPM_SYNC_CHECK("ADAT1 SyncCheck", 3),
          HDSPM_SYNC_CHECK("ADAT2 SyncCheck", 4),
          HDSPM_SYNC_CHECK("ADAT3 SyncCheck", 5),
          HDSPM_SYNC_CHECK("ADAT4 SyncCheck", 6),
          HDSPM_SYNC_CHECK("TCO SyncCheck", 7),
          HDSPM_SYNC_CHECK("SYNC IN SyncCheck", 8),
      
      The patch corrects the indicated sync flags by passing the proper index
      value to hdspm_s1_sync_check().
      Signed-off-by: NAdrian Knoth <adi@drcomp.erfurt.thur.de>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      d1a3c98d
  3. 04 11月, 2012 1 次提交
  4. 20 10月, 2012 9 次提交
  5. 20 8月, 2012 1 次提交
  6. 31 5月, 2012 1 次提交
  7. 08 5月, 2012 1 次提交
  8. 24 4月, 2012 1 次提交
  9. 08 3月, 2012 1 次提交
  10. 11 1月, 2012 1 次提交
    • A
      ALSA: hdspm - Provide unique driver id based on card serial · f7de8ba3
      Adrian Knoth 提交于
      Before, /proc/asound looked like this:
      
       2 [Default        ]: HDSPM - RME RayDAT_f1cd85
                            RME RayDAT S/N 0xf1cd85 at 0xf7300000, irq 18
      
      In case of a second HDSPM card, its name would be Default_1. This is
      cumbersome, because the order of the cards isn't stable across reboots.
      
      To help userspace tools referring to the correct card, this commit
      provides a unique id for each card:
      
       2 [HDSPMxf1cd85   ]: HDSPM - RME RayDAT_f1cd85
                            RME RayDAT S/N 0xf1cd85 at 0xf7300000, irq 18
      
      In this example, userspace (configuration files) would then use
      hw:HDSPMxf1cd85 to choose the right card.
      
      The serial is masked to 24bits, so this string is always shorter than
      sixteen chars.
      Signed-off-by: NAdrian Knoth <adi@drcomp.erfurt.thur.de>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      f7de8ba3
  11. 10 1月, 2012 1 次提交
  12. 08 1月, 2012 1 次提交
  13. 19 12月, 2011 1 次提交
  14. 22 11月, 2011 1 次提交
  15. 01 11月, 2011 1 次提交
  16. 31 10月, 2011 3 次提交
  17. 23 9月, 2011 2 次提交
    • D
      ALSA: hdspm - cleanup __user tags in ioctl() · 2ca595ab
      Dan Carpenter 提交于
      This makes the code cleaner and silences a Sparse complaint:
      sound/pci/rme9652/hdspm.c:6341:23: warning: incorrect type in assignment (incompatible argument 4 (different address spaces))
      sound/pci/rme9652/hdspm.c:6341:23:    expected int ( *ioctl )( ... )
      sound/pci/rme9652/hdspm.c:6341:23:    got int ( static [toplevel] *<noident> )( ... )
      sound/pci/rme9652/hdspm.c:6102:44: warning: dereference of noderef expression
      sound/pci/rme9652/hdspm.c:6225:50: warning: dereference of noderef expression
      sound/pci/rme9652/hdspm.c:6264:50: warning: dereference of noderef expression
      sound/pci/rme9652/hdspm.c:6283:50: warning: dereference of noderef expression
      sound/pci/rme9652/hdspm.c:6289:59: warning: dereference of noderef expression
      Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      2ca595ab
    • D
      ALSA: hdspm - potential info leak in snd_hdspm_hwdep_ioctl() · 643d6bbb
      Dan Carpenter 提交于
      Smatch has a new check for Rosenberg type information leaks where
      structs are copied to the user with uninitialized stack data in them.
      
      The status struct has a hole in it, and on some paths not all the
      members were initialized.
      
      struct hdspm_status {
              unsigned char              card_type;            /*     0     1 */
              /* XXX 3 bytes hole, try to pack */
              enum hdspm_syncsource      autosync_source;      /*     4     4 */
              long long unsigned int     card_clock;           /*     8     8 */
      
      The hdspm_version struct had holes in it as well.
      
      struct hdspm_version {
              unsigned char              card_type;            /*     0     1 */
              char                       cardname[20];         /*     1    20 */
              /* XXX 3 bytes hole, try to pack */
              unsigned int               serial;               /*    24     4 */
              short unsigned int         firmware_rev;         /*    28     2 */
              /* XXX 2 bytes hole, try to pack */
              int                        addons;               /*    32     4 */
      Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      643d6bbb
  18. 15 8月, 2011 8 次提交
  19. 05 8月, 2011 1 次提交
  20. 29 7月, 2011 3 次提交