06 Jan, 2016

5 commits

  • The nrpn_conv_table structures are never modified, so declare them as
    const.

    Done with the help of Coccinelle.

    Signed-off-by: Julia Lawall
    Signed-off-by: Takashi Iwai

    Julia Lawall
     
  • Some users have reported that their Dice based models generate ETIMEDOUT
    when starting PCM playback. It means that current timeout (=100msec) is
    not enough for their models to transfer notifications.

    This commit expands the timeout up to 2 sec. As a result, in a worst case,
    any operations to start AMDTP streams takes 2 sec or more. Then, in
    userspace, snd_pcm_hw_params(), snd_pcm_prepare(), snd_pcm_recover(),
    snd_rawmidi_open(), snd_seq_connect_from() and snd_seq_connect_to() may
    take the time.

    Signed-off-by: Takashi Sakamoto
    Signed-off-by: Takashi Iwai

    Takashi Sakamoto
     
  • In previous commit, card registration is processed under situation
    with few bus reset. There's no need to add a workaround of transaction
    re-initialization at timeout.

    This commit purges the re-initialization.

    Signed-off-by: Takashi Sakamoto
    Signed-off-by: Takashi Iwai

    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: Takashi Sakamoto
    Signed-off-by: Takashi Iwai

    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: Takashi Sakamoto
    Signed-off-by: Takashi Iwai

    Takashi Sakamoto
     

31 Dec, 2015

3 commits


23 Dec, 2015

32 commits