1. 09 2月, 2016 1 次提交
    • T
      ALSA: dice: purge generating channel cache · 6f688268
      Takashi Sakamoto 提交于
      Dice interface design doesn't allow drivers to read supported combination
      between sampling transfer frequencies and the number of Multi bit linear
      audio data channels. Due to the design, ALSA dice driver changes current
      sampling transfer frequency to generate cache of the combinations at
      device probing processing.
      
      Although, this idea is worse because ALSA dice driver changes the state of
      clock. This is not what users want when they save favorite configuration
      to the device in advance.
      
      Furthermore, there's a possibility that the format of data block is decided
      not only according to current sampling transfer frequency, but also the
      other factors, i.e. data format for digital interface. It's not good to
      generate channel cache according to the sampling transfer frequency only.
      
      This commit purges processing cache data and related structure members. As
      a result, users must set preferable sampling transfer frequency before
      using ALSA PCM applications, as long as they want to start any PCM
      substreams at the rate except for current one.
      Signed-off-by: NTakashi Sakamoto <o-takashi@sakamocchi.jp>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      6f688268
  2. 06 1月, 2016 2 次提交
    • T
      ALSA: dice: postpone card registration · b59fb190
      Takashi Sakamoto 提交于
      Some models based on ASIC for Dice II series (STD, CP) change their
      hardware configurations after appearing on IEEE 1394 bus. This is due to
      interactions of boot loader (RedBoot), firmwares (eCos) and vendor's
      configurations. This causes current ALSA dice driver to get wrong
      information about the hardware's capability because its probe function
      runs just after detecting unit of the model.
      
      As long as I investigated, it takes a bit time (less than 1 second) to load
      the firmware after bootstrap. Just after loaded, the driver can get
      information about the unit. Then the hardware is initialized according to
      vendor's configurations. After, the got information becomes wrong.
      Between bootstrap, firmware loading and post configuration, some bus resets
      are observed.
      
      This commit offloads most processing of probe function into workqueue and
      schedules the workqueue after successive bus resets. This has an effect to
      get correct hardware information and avoid involvement to bus reset storm.
      
      For code simplicity, this change effects all of Dice-based models, i.e.
      Dice II, Dice Jr., Dice Mini and Dice III.
      
      I use a loose strategy to manage a race condition between the work and the
      bus reset. This is due to a specification of dice transaction. When bus
      reset occurs, registered address for the transaction is cleared. Drivers
      must re-register their own address again. While, this operation is required
      for the work because the work includes to wait for the transaction. This
      commit uses no lock primitives for the race condition. Instead, checking
      'registered' member of 'struct snd_dice' avoid executing the work again.
      If sound card is not registered, the work can be scheduled again by bus
      reset handler.
      
      When .remove callback is executed, the sound card is going to be released.
      The work should not be pending or executed in the releasing. This commit
      uses cancel_delayed_work_sync() in .remove callback and wait till the
      pending work finished. After .remove callback, .update callback is not
      executed, therefore no works are scheduled again.
      Signed-off-by: NTakashi Sakamoto <o-takashi@sakamocchi.jp>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      b59fb190
    • T
      ALSA: dice: split subaddress check from category check · 4a47a87d
      Takashi Sakamoto 提交于
      Before allocating an instance of sound card, ALSA dice driver checks
      chip_ID_hi in Bus information block of Config ROM, then also checks
      subaddresses. The former operation reads cache of Config ROM in Linux
      FireWire subsystem, while the latter operation sends read transaction.
      The latter can be merged into initialization of transaction system.
      
      This commit splits these two operations to reduce needless transactions
      in probe processing.
      Signed-off-by: NTakashi Sakamoto <o-takashi@sakamocchi.jp>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      4a47a87d
  3. 15 11月, 2015 1 次提交
  4. 19 10月, 2015 1 次提交
    • T
      ALSA: dice: assign converted data to the same type of variable · cbc6f280
      Takashi Sakamoto 提交于
      In former commit, u32 data was assigned to __be32 variable instead of an
      int variable. This is not enough solution because it still causes sparse
      warnings.
      
      dice.c:80:23: warning: incorrect type in assignment (different base types)
      dice.c:80:23:    expected restricted __be32 [usertype] value
      dice.c:80:23:    got unsigned int
      dice.c:81:21: warning: restricted __be32 degrades to integer
      dice.c:81:46: warning: restricted __be32 degrades to integer
      
      This commit fixes this bug.
      
      Fixes: 7c2d4c0c('ALSA: dice: Split transaction functionality into a file')
      Signed-off-by: NTakashi Sakamoto <o-takashi@sakamocchi.jp>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      cbc6f280
  5. 23 2月, 2015 2 次提交
  6. 10 12月, 2014 3 次提交
  7. 30 11月, 2014 8 次提交
  8. 29 8月, 2014 2 次提交
  9. 26 5月, 2014 4 次提交
  10. 14 2月, 2014 1 次提交
  11. 29 11月, 2013 1 次提交
  12. 15 11月, 2013 1 次提交
  13. 21 10月, 2013 13 次提交