23 Jan, 2020

2 commits

  • commit 747d1f076de5a60770011f6e512de43298ec64cb upstream.

    ALSA firewire-tascam driver can bring corruption due to spin lock without
    restoration of IRQ flag in SoftIRQ context. This commit fixes the bug.

    Cc: Scott Bahling
    Cc: # v4.21
    Fixes: d7167422433c ("ALSA: firewire-tascam: queue events for change of control surface")
    Signed-off-by: Takashi Sakamoto
    Link: https://lore.kernel.org/r/20200113085719.26788-1-o-takashi@sakamocchi.jp
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Takashi Sakamoto
     
  • commit 3e2dc6bdb56893bc28257e482e1dbe5d39f313df upstream.

    At failure of attempt to detect protocol extension, ALSA dice driver
    should be fallback to limited functionality. However it's not.

    This commit fixes it.

    Cc: # v4.18+
    Fixes: 58579c056c1c9 ("ALSA: dice: use extended protocol to detect available stream formats")
    Signed-off-by: Takashi Sakamoto
    Link: https://lore.kernel.org/r/20200113084630.14305-2-o-takashi@sakamocchi.jp
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Takashi Sakamoto
     

09 Jan, 2020

1 commit

  • commit 0929249e3be3bb82ee6cfec0025f4dde952210b3 upstream.

    Just fix a typo of "S/PDIF" in the clock name string.

    Fixes: 4638ec6ede08 ("ALSA: firewire-motu: add proc node to show current statuc of clock and packet formats")
    Acked-by: Takashi Sakamoto
    Link: https://lore.kernel.org/r/20191030100921.3826-1-tiwai@suse.de
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Takashi Iwai
     

31 Dec, 2019

1 commit

  • [ Upstream commit d3eabe939aee3ffd5b133766a932629a9746298c ]

    As long as I investigated, some devices with BeBoB protocol version 1
    can be freezed during several hundreds milliseconds after breaking
    connections. When accessing during the freezed time, any transaction
    is corrupted. In the worst case, the device is going to reboot.

    I can see this issue in:
    * Roland FA-66
    * M-Audio FireWire Solo

    This commit expands sleep just after breaking connections to avoid
    the freezed time as much as possible. I note that the freeze/reboot
    behaviour is similar to below models:
    * Focusrite Saffire Pro 10 I/O
    * Focusrite Saffire Pro 26 I/O

    The above models certainly reboot after breaking connections.

    Signed-off-by: Takashi Sakamoto
    Link: https://lore.kernel.org/r/20191101131323.17300-2-o-takashi@sakamocchi.jp
    Signed-off-by: Takashi Iwai
    Signed-off-by: Sasha Levin

    Takashi Sakamoto
     

18 Dec, 2019

2 commits

  • commit 59a126aa3113fc23f03fedcafe3705f1de5aff50 upstream.

    Even if isochronous resources reservation fails, error code doesn't return
    in pcm.hw_params callback.

    Cc: #5.3+
    Fixes: 4f380d007052 ("ALSA: oxfw: configure packet format in pcm.hw_params callback")
    Signed-off-by: Takashi Sakamoto
    Link: https://lore.kernel.org/r/20191209151655.GA8090@workstation
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Takashi Sakamoto
     
  • commit 480136343cbe89426d6c2ab74ffb4e3ee572c7ee upstream.

    Even if isochronous resources reservation fails, error code doesn't return
    in pcm.hw_params callback.

    Cc: #5.3+
    Fixes: 55162d2bb0e8 ("ALSA: fireface: reserve/release isochronous resources in pcm.hw_params/hw_free callbacks")
    Signed-off-by: Takashi Sakamoto
    Link: https://lore.kernel.org/r/20191209151655.GA8090@workstation
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Takashi Sakamoto
     

04 Nov, 2019

1 commit

  • For Focusrite Saffire Pro i/o, the lowest 8 bits of register represents
    configured source of sampling clock. The next lowest 8 bits represents
    whether the configured source is actually detected or not just after
    the register is changed for the source.

    Current implementation evaluates whole the register to detect configured
    source. This results in failure due to the next lowest 8 bits when the
    source is connected in advance.

    This commit fixes the bug.

    Fixes: 25784ec2d034 ("ALSA: bebob: Add support for Focusrite Saffire/SaffirePro series")
    Cc: # v3.16+
    Signed-off-by: Takashi Sakamoto
    Link: https://lore.kernel.org/r/20191102150920.20367-1-o-takashi@sakamocchi.jp
    Signed-off-by: Takashi Iwai

    Takashi Sakamoto
     

26 Oct, 2019

1 commit

  • A helper function of ALSA bebob driver returns negative value in a
    function which has a prototype to return unsigned value.

    This commit fixes it by changing the prototype.

    Fixes: eb7b3a056cd8 ("ALSA: bebob: Add commands and connections/streams management")
    Cc: # v3.16+
    Signed-off-by: Takashi Sakamoto
    Link: https://lore.kernel.org/r/20191026030620.12077-1-o-takashi@sakamocchi.jp
    Signed-off-by: Takashi Iwai

    Takashi Sakamoto
     

17 Sep, 2019

1 commit

  • At higher sampling rate (e.g. 192.0 kHz), Alesis iO26 transfers 4 data
    channels per data block in CIP.

    Both iO14 and iO26 have the same contents in their configuration ROM.
    For this reason, ALSA Dice driver attempts to distinguish them according
    to the value of TX0_AUDIO register at probe callback. Although the way is
    valid at lower and middle sampling rate, it's lastly invalid at higher
    sampling rate because because the two models returns the same value for
    read transaction to the register.

    In the most cases, users just plug-in the device and ALSA dice driver
    detects it. In the case, the device runs at lower sampling rate and
    the driver detects expectedly. For this reason, this commit leaves the
    way to detect as is.

    Fixes: 28b208f600a3 ("ALSA: dice: add parameters of stream formats for models produced by Alesis")
    Cc: # v4.18+
    Signed-off-by: Takashi Sakamoto
    Link: https://lore.kernel.org/r/20190916101851.30409-1-o-takashi@sakamocchi.jp
    Signed-off-by: Takashi Iwai

    Takashi Sakamoto
     

14 Sep, 2019

1 commit


10 Sep, 2019

3 commits

  • 2 bytes in MSB of register for clock status is zero during intermediate
    state after changing status of sampling clock in models of TASCAM FireWire
    series. The duration of this state differs depending on cases. During the
    state, it's better to retry reading the register for current status of
    the clock.

    In current implementation, the intermediate state is checked only when
    getting current sampling transmission frequency, then retry reading.
    This care is required for the other operations to read the register.

    This commit moves the codes of check and retry into helper function
    commonly used for operations to read the register.

    Fixes: e453df44f0d6 ("ALSA: firewire-tascam: add PCM functionality")
    Cc: # v4.4+
    Signed-off-by: Takashi Sakamoto
    Link: https://lore.kernel.org/r/20190910135152.29800-3-o-takashi@sakamocchi.jp
    Signed-off-by: Takashi Iwai

    Takashi Sakamoto
     
  • The return value of snd_tscm_stream_get_clock() is ignored. This commit
    checks the value and handle error.

    Fixes: e453df44f0d6 ("ALSA: firewire-tascam: add PCM functionality")
    Cc: # v4.4+
    Signed-off-by: Takashi Sakamoto
    Link: https://lore.kernel.org/r/20190910135152.29800-2-o-takashi@sakamocchi.jp
    Signed-off-by: Takashi Iwai

    Takashi Sakamoto
     
  • ASoC: Updates for v5.4

    Quite a big update this time around, particularly in the core
    where we've had a lot of cleanups from Morimoto-san - there's
    not much functional change but quite a bit of modernization
    going on. We've also seen a lot of driver work, a lot of it
    cleanups but also some particular drivers.

    - Lots and lots of cleanups from Morimoto-san and Yue Haibing.
    - Lots of cleanups and enhancements to the Freescale, sunxi dnd
    Intel rivers.
    - Initial Sound Open Firmware suppot for i.MX8.
    - Removal of w90x900 and nuc900 drivers as the platforms are
    being removed.
    - New support for Cirrus Logic CS47L15 and CS47L92, Freescale
    i.MX 7ULP and 8MQ, Meson G12A and NXP UDA1334

    Takashi Iwai
     

07 Sep, 2019

1 commit

  • The destructor of AMDTP domain has WARN_ON() for the list of associated
    AMDTP stream. Although this reminds a case that developers forget to
    program consumer drivers to stop AMDTP domain, it hits when AMDTP domain
    is not initialized yet. This occurs when initialization of sound card
    fails as well and it's superfluous.

    This commit removes the WARN_ON. Although the API to AMDTP domain does
    nothing, it's left for future usage.

    Fixes: 3ec3d7a3ff106 ("ALSA: firewire-lib: add AMDTP domain structure to handle several isoc contexts")
    Signed-off-by: Takashi Sakamoto
    Link: https://lore.kernel.org/r/20190906131414.15370-1-o-takashi@sakamocchi.jp
    Signed-off-by: Takashi Iwai

    Takashi Sakamoto
     

06 Sep, 2019

1 commit

  • TASCAM FE-8 is the rest of model in TASCAM FireWire series. This device
    has no functionality to process audio signal and MIDI messages. Instead,
    it transfers control messages to host system corresponding to operations
    for some faders, buttons and knobs on its surface.

    Unlike the other devices in this series, the control messages are
    transmitted by asynchronous transactions. Some registers of device are
    used for registration of destination address for the transaction. The
    transaction includes quadlet-aligned data up to 32 quadlets.

    Userspace applications can receive the transaction and parse it for
    control message via Linux FireWire subsystem, without any support by
    ALSA firewire-tascam driver. Therefore the driver gives no support
    for it.

    This commit removes placeholder for FE-8 and add some comment for its
    functionalities as notes.

    $ python2 linux-firewire-utils/src/crpp < ~/git/am-config-rom/tascam/tascam-fe8.img
    ROM header and bus information block
    -----------------------------------------------------------------
    400 040f4798 bus_info_length 4, crc_length 15, crc 18328 (should be 14256)
    404 31333934 bus_name "1394"
    408 20ff7002 irmc 0, cmc 0, isc 1, bmc 0, cyc_clk_acc 255, max_rec 7 (256)
    40c 00022eff company_id 00022e |
    410 a094dcb7 device_id ffa094dcb7 | EUI-64 00022effa094dcb7

    root directory
    -----------------------------------------------------------------
    414 0004bccc directory_length 4, crc 48332
    418 0300022e vendor
    41c 0c0083c0 node capabilities per IEEE 1394
    420 8d000006 --> eui-64 leaf at 438
    424 d1000001 --> unit directory at 428

    unit directory at 428
    -----------------------------------------------------------------
    428 0003eda4 directory_length 3, crc 60836
    42c 1200022e specifier id
    430 13800001 version
    434 d4000004 --> dependent info directory at 444

    eui-64 leaf at 438
    -----------------------------------------------------------------
    438 0002461e leaf_length 2, crc 17950
    43c 00022eff company_id 00022e |
    440 a094dcb7 device_id ffa094dcb7 | EUI-64 00022effa094dcb7

    dependent info directory at 444
    -----------------------------------------------------------------
    444 0002ae47 directory_length 2, crc 44615
    448 81000002 --> descriptor leaf at 450
    44c 82000006 --> bus dependent info leaf at 464

    descriptor leaf at 450
    -----------------------------------------------------------------
    450 0004a79e leaf_length 4, crc 42910
    454 00000000 textual descriptor
    458 00000000 minimal ASCII
    45c 54415343 "TASC"
    460 414d0000 "AM"

    bus dependent info leaf at 464
    -----------------------------------------------------------------
    464 0004a7d8 leaf_length 4, crc 42968
    468 00000000
    46c 00000000
    470 46452d38
    474 00000000

    Signed-off-by: Takashi Sakamoto
    Link: https://lore.kernel.org/r/20190906125544.13800-1-o-takashi@sakamocchi.jp
    Signed-off-by: Takashi Iwai

    Takashi Sakamoto
     

30 Aug, 2019

1 commit

  • MOTU 4pre was launched in 2012 by MOTU, Inc. This commit allows userspace
    applications can transmit and receive PCM frames and MIDI messages for
    this model via ALSA PCM interface and RawMidi/Sequencer interfaces.

    The device supports MOTU protocol version 3. Unlike the other devices, the
    device is simply designed. The size of data block is fixed to 10 quadlets
    during available sampling rates (44.1 - 96.0 kHz). Each data block
    includes 1 source packet header, 2 data chunks for messages, 8 data chunks
    for PCM samples and 2 data chunks for padding to quadlet alignment. The
    device has no MIDI, optical, BNC and AES/EBU interfaces.

    Like support for the other MOTU devices, the quality of playback sound
    is not enough good with periodical noise yet.

    $ python2 crpp < ~/git/am-config-rom/motu/motu-4pre.img
    ROM header and bus information block
    -----------------------------------------------------------------
    400 041078cc bus_info_length 4, crc_length 16, crc 30924
    404 31333934 bus_name "1394"
    408 20ff7000 irmc 0, cmc 0, isc 1, bmc 0, cyc_clk_acc 255, max_rec 7 (256)
    40c 0001f200 company_id 0001f2 |
    410 000a41c5 device_id 00000a41c5 | EUI-64 0001f200000a41c5

    root directory
    -----------------------------------------------------------------
    414 0004ef04 directory_length 4, crc 61188
    418 030001f2 vendor
    41c 0c0083c0 node capabilities per IEEE 1394
    420 d1000002 --> unit directory at 428
    424 8d000005 --> eui-64 leaf at 438

    unit directory at 428
    -----------------------------------------------------------------
    428 0003ceda directory_length 3, crc 52954
    42c 120001f2 specifier id
    430 13000045 version
    434 17103800 model

    eui-64 leaf at 438
    -----------------------------------------------------------------
    438 0002d248 leaf_length 2, crc 53832
    43c 0001f200 company_id 0001f2 |
    440 000a41c5 device_id 00000a41c5 | EUI-64 0001f200000a41c5

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

    Takashi Sakamoto
     

29 Aug, 2019

2 commits


26 Aug, 2019

2 commits

  • When userspace application calls ioctl(2) to configure hardware for PCM
    playback substream, ALSA OXFW driver handles incoming AMDTP stream.
    In this case, outgoing AMDTP stream should be handled.

    This commit fixes the bug for v5.3-rc kernel.

    Fixes: 4f380d007052 ("ALSA: oxfw: configure packet format in pcm.hw_params callback")
    Signed-off-by: Takashi Sakamoto
    Signed-off-by: Takashi Iwai

    Takashi Sakamoto
     
  • ALSA oxfw driver supports Griffin FireWave. This device supports one
    isochronous stream for PCM playback. Current driver executes code to
    wait event for stream structure of opposite direction. This causes
    NULL pointer dereference.

    This commit fixes the bug.

    Fixes: ac5d77864cfc ("ALSA: oxfw: support AMDTP domain")
    Signed-off-by: Takashi Sakamoto
    Signed-off-by: Takashi Iwai

    Takashi Sakamoto
     

22 Aug, 2019

1 commit


08 Aug, 2019

1 commit

  • In iso_packets_buffer_init(), 'b->packets' is allocated through
    kmalloc_array(). Then, the aligned packet size is checked. If it is
    larger than PAGE_SIZE, -EINVAL will be returned to indicate the error.
    However, the allocated 'b->packets' is not deallocated on this path,
    leading to a memory leak.

    To fix the above issue, free 'b->packets' before returning the error code.

    Fixes: 31ef9134eb52 ("ALSA: add LaCie FireWire Speakers/Griffin FireWave Surround driver")
    Signed-off-by: Wenwen Wang
    Reviewed-by: Takashi Sakamoto
    Cc: # v2.6.39+
    Signed-off-by: Takashi Iwai

    Wenwen Wang
     

06 Aug, 2019

18 commits