09 Apr, 2015

1 commit


23 Feb, 2015

3 commits

  • A part of these drivers, especially BeBoB driver, are programmed to wait
    some events. Thus the drivers should not destroy any data in .remove()
    context.

    This commit moves some destructors from 'struct fw_driver.remove()' to
    'struct snd_card.private_free()' to shutdown safely.

    Signed-off-by: Takashi Sakamoto
    Cc: # 3.19+
    Signed-off-by: Takashi Iwai

    Takashi Sakamoto
     
  • Currently stream destructor in each driver has a problem to be called in
    a context in which sound card object is released, because the destructors
    call amdtp_stream_pcm_abort() and touch PCM runtime data.

    The PCM runtime data is destroyed in application's context with
    snd_pcm_close(), on the other hand PCM substream data is destroyed after
    sound card object is released, in most case after all of ALSA character
    devices are released. When PCM runtime is destroyed and PCM substream is
    remained, amdtp_stream_pcm_abort() touches PCM runtime data and causes
    Null-pointer-dereference.

    This commit changes stream destructors and allows each driver to call
    it after releasing runtime.

    Signed-off-by: Takashi Sakamoto
    Cc: # 3.19+
    Signed-off-by: Takashi Iwai

    Takashi Sakamoto
     
  • Fireworks and Dice drivers try to touch instances of FireWire unit after
    sound card object is released, while references to the unit is decremented
    in .remove(). When unplugging during streaming, sound card object is
    released after .remove(), thus Fireworks and Dice drivers causes GPF or
    Null-pointer-dereferencing to application processes because an instance of
    FireWire unit was already released.

    This commit adds reference-counting for FireWire unit in drivers to allow
    them to touch an instance of FireWire unit after .remove(). In most case,
    any operations after .remove() may be failed safely.

    Signed-off-by: Takashi Sakamoto
    Cc: # 3.19+
    Signed-off-by: Takashi Iwai

    Takashi Sakamoto
     

17 Jan, 2015

1 commit

  • There are several devices that expect to receive MIDI data only in the
    first eight data blocks of a packet. If the driver restricts the data
    rate to the allowed rate (as mandated by the specification, but not yet
    implemented by this driver), this happens naturally. Therefore, there
    is no reason to ever try to use more data packets with any device.

    Signed-off-by: Clemens Ladisch
    Reviewed-by: Takashi Sakamoto
    Tested-by: Takashi Sakamoto
    Signed-off-by: Takashi Iwai

    Clemens Ladisch
     

27 Oct, 2014

3 commits


21 Oct, 2014

2 commits


10 Oct, 2014

1 commit

  • This patch fixes a failure to open PCM device with -ENOSYS in
    Terratec Phase 88.

    Terratec Phase 88 has two Selector Function Blocks of AVC Audio subunit
    to switch source of clock. One is to switch internal/external for the
    source and another is to switch word/spdif for the external clock.

    The IDs for these Selector Function Blocks are 9 and 8. But in current
    implementation they're 0 and 0.

    Reported-by: András Murányi
    Tested-by: András Murányi
    Cc: # v3.16+
    Signed-off-by: Takashi Sakamoto
    Signed-off-by: Takashi Iwai

    Takashi Sakamoto
     

22 Jul, 2014

4 commits

  • This commit is a supplement to my previous patch.
    http://mailman.alsa-project.org/pipermail/alsa-devel/2014-July/079190.html

    The special_clk_ctl_put() still returns 0 in error handling case. It should
    return -EINVAL.

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

    Takashi Sakamoto
     
  • This commit is for correction of my misunderstanding about return value of
    .put callback in ALSA Control interface.

    According to 'Writing ALSA Driver' (*1), return value of the callback has
    three patterns; 1: changed, 0: not changed, an negative value: fatal error.

    But I misunderstood that it's boolean; zero or nonzero.

    *1: Writing an ALSA Driver (2005, Takashi Iwai)
    http://www.alsa-project.org/main/index.php/ALSA_Driver_Documentation

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

    Takashi Sakamoto
     
  • This commit uses different labels for control elements of digital input/output
    interfaces to correct my misunderstanding about M-Audio Firewire 1814 and
    ProjectMix I/O.

    According to user manuals for these two models, they have two modes for
    digital input; one is S/PDIF in both of optical and coaxial interfaces,
    another is ADAT in optical interface only.

    But in current implementation, a control element for it reduced labels which
    a control element for digital output uses because of my misunderstanding
    that optical interface is not available for digital input with S/PDIF mode.

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

    Takashi Sakamoto
     
  • In error handling case, special_clk_ctl_put() returns without unlock_mutex(),
    therefore the mutex is still locked. This commit moves mutex_lock() after
    the error handling case.

    This commit is my solution for this post.

    [PATCH -next] ALSA: bebob: Fix missing unlock on error in special_clk_ctl_put()
    https://lkml.org/lkml/2014/7/20/12

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

    Takashi Sakamoto
     

04 Jun, 2014

2 commits


02 Jun, 2014

1 commit


27 May, 2014

8 commits


26 May, 2014

14 commits

  • In post commit, a quirk of this firmware about transactions is reported.
    This commit apply a workaround for this quirk.

    They often fail transactions due to gap_count mismatch. This state is changed
    by generating bus reset.

    The fw_schedule_bus_reset() is an exported symbol in firewire-core. But there
    are no header for public. This commit moves its prototype from
    drivers/firewire/core.h to include/linux/firewire.h.

    This mismatch still affects bus management before generating this bus reset.
    It still takes a time to call driver's probe() because transactions are still
    often failed.

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

    Takashi Sakamoto
     
  • Just powering on, these devices below wait to download firmware.
    - Firewire Audiophile
    - Firewire 410
    - Firewire 1814
    - ProjectMix I/O

    But firmware version 5058 or later, flash memory in the device stores the
    firmware. So this driver can enable these devices by sending a certain cue to
    load the firmware.

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

    Takashi Sakamoto
     
  • The firmwares for M-Audio Firewire 410/1814 and ProjectMix I/O has a quirk to
    ignore MIDI messages in data blocks more than 8. This commit uses a flag which
    Fireworks uses for a similar quirk.

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

    Takashi Sakamoto
     
  • …pecial Firewire series

    M-Audio Firewire 1814 has a quirk, ProjectMix I/O also has. They transmit
    empty packet with wrong value of dbc incremented by 8 at high sampling rate.
    According to IEC 61883-1, this value should be the same as the one in
    previous packet.

    This commit adds a flag named as CIP_EMPTY_HAS_WRONG_DBC. With flag, the value
    of dbc in empty packet is overwittern by an expected value.

    This is an example of this quirk:
    CIP Header 0 CIP Header 1 Payload size
    010D0000 9004F759 210
    010D0010 90040B59 210
    010D0020 90042359 210
    01020028 9004FFFF 2 <-
    010D0030 90043759 210
    010D0040 90044B59 210
    010D0050 90046359 210
    01020058 9004FFFF 2 <-
    010D0060 90047759 210
    010D0070 90048B59 210
    010D0080 9004A359 210
    01020088 9004FFFF 2 <-
    010D0090 9004B759 210
    010D00A0 9004CB59 210
    010D00B0 9004E359 210
    010200B8 9004FFFF 2 <-
    010D00C0 9004F759 210
    010D00D0 90040B59 210
    010D00E0 90042359 210

    Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
    Signed-off-by: Takashi Iwai <tiwai@suse.de>

    Takashi Sakamoto
     
  • This commit allows this driver to support some models which M-Audio produces
    with DM1000 but its firmware is special. They are:
    - Firewire 1814
    - ProjectMix I/O

    They have heavily customized firmware. The usual operations can't be applied to
    them. For this reason, this commit adds a model specific member to 'struct
    snd_bebob' and some model specific functions. Some parameters are write-only so
    this commit also adds control interface for applications to set them.

    M-Audio special firmware quirks:
    - Just after powering on, they wait to download firmware. This state is
    changed when receiving cue. Then bus reset is generated and the device is
    recognized as a different model with the uploaded firmware.
    - They don't respond against BridgeCo AV/C extension commands. So drivers
    can't get their stream formations and so on.
    - They do not start to transmit packets only by establishing connection but
    also by receiving SIGNAL FORMAT command.
    - After booting up, they often fail to send response against driver's request
    due to mismatch of gap_count.

    This module don't support to upload firmware.

    Tested-by: Darren Anderson (ProjectMix I/O)
    Signed-off-by: Takashi Sakamoto
    Signed-off-by: Takashi Iwai

    Takashi Sakamoto
     
  • This commit allows this driver to support some models which M-Audio produces
    with DM1000/DM1000E with usual firmware. They are:
    - Firewire 410
    - Firewire AudioPhile
    - Firewire Solo
    - Ozonic
    - NRV10
    - FirewireLightBridge

    According to a person who worked in BridgeCo, some models are produced with
    'Pre-BeBoB'. This means that these products were released before BeBoB was
    officially produced, and later BeBoB specification was formed. So these models
    have some quirks.

    M-Audio usual firmware quirks:
    - Just after powering on, 'Firewire 410' waits to download firmware. This
    state is changed when receiving cue. Then bus reset is generated and the
    device is recognized as a different model with the uploaded firmware.
    - 'Firewire Audiophile' also waits to download firmware but its
    vendor id/model id is the same as the one after loading firmware.
    - The information of channel mapping for MIDI conformant data channel is
    invalid against BridgeCo specification.

    This commit adds some codes for these quirks but don't support to upload
    firmware.

    This commit also adds specific operations to get metering information. The
    metering information also includes status of clock synchronization if the model
    supports to switch source of clock.

    The specification of FirewireLightBridge is unknown. So in this time, normal
    operations are applied for this model.

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

    Takashi Sakamoto
     
  • This commit allows this driver to support all of models which Focusrite
    produces with DM1000/BeBoB. They are:
    - Saffire
    - Saffire LE
    - SaffirePro 10 I/O
    - SaffirePro 26 I/O

    This commit adds Focusrite specific operations:
    1. Get source of clock
    2. Get/Set sampling frequency
    3. Get metering information

    The driver uses these functionalities to read/write specific address by async
    transaction.

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

    Takashi Sakamoto
     
  • This commit allows this driver to support all of models which Yamaha produced
    with DM1000/BeBoB. They are:
    - GO44
    - GO46

    This commit adds Yamaha specific operations. To get source of clock, AV/C Audio
    Subunit command is used.

    I note that their appearances are similar to some models of TerraTec; 'Go44' is
    similar to 'PHASE 24 FW' and 'GO46' is similar to 'PHASE X24 FW'. But their
    combination of Audio/Music subunits is a bit different.

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

    Takashi Sakamoto
     
  • This commit allows this driver to support all of models which Terratec produced
    with DM1000/BeBoB. They are:
    - PHASE 24 FW
    - PHASE X24 FW
    - PHASE 88 Rack FW
    - EWS MIC2
    - EWS MIC4
    - Aureon 7.1 Firewire

    For Phase series, this commit adds a Terratec specific operation. To get source
    of clock. AV/C Audio Subunit command is used.

    For EWS series and Aureon, this module uses normal operations.

    Tested-by: Maximilian Engelhardt (PHASE 24 FW)
    Signed-off-by: Takashi Sakamoto
    Signed-off-by: Takashi Iwai

    Takashi Sakamoto
     
  • This commit is for some devices which have its own operations or quirks.

    Many functionality should be implemented in user land. Then this commit adds
    functionality related to stream such as sampling frequency or clock source. For
    help to debug, this commit adds the functionality to get metering information
    if it's available.

    To help these functionalities, this commit adds some AV/C commands defined in
    'AV/C Audio Subunit Specification (1394TA).

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

    Takashi Sakamoto
     
  • This interface is designed for mixer/control application. By using hwdep
    interface, the application can get information about firewire node, can
    lock/unlock kernel streaming and can get notification at starting/stopping
    kernel streaming.

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

    Takashi Sakamoto
     
  • This commit adds a functionality to capture/playback PCM samples.

    When AMDTP stream is already running for PCM or the source of clock is not
    internal, available sampling rate is limited at current one.

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

    Takashi Sakamoto
     
  • This commit adds a functionality to capture/playback MIDI messages.

    When no AMDTP streams are running, this module starts AMDTP stream at current
    sampling rate for MIDI substream.

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

    Takashi Sakamoto
     
  • This commit adds proc interface to get these information for debugging:
    - firmware information
    - stream formation
    - current clock source and sampling rate

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

    Takashi Sakamoto