lp:~diwic/alsa-driver/snd-firewire-improve

Created by David Henningsson on 2014-04-11 and last modified on 2019-09-16

Takashi Sakamoto's firewire drivers

Get this branch:
bzr branch lp:~diwic/alsa-driver/snd-firewire-improve

Branch merges

Related bugs

Related blueprints

Branch information

Owner:
David Henningsson
Project:
ALSA driver
Status:
Development

Import details

Import Status: Reviewed

This branch is an import of the HEAD branch of the Git repository at https://github.com/takaswie/snd-firewire-improve.git.

The next import is scheduled to run in 1 hour.

Last successful import was 4 hours ago.

Import started 4 hours ago on alnitak and finished 4 hours ago taking 20 seconds — see the log
Import started 10 hours ago on alnitak and finished 10 hours ago taking 20 seconds — see the log
Import started 16 hours ago on alnitak and finished 16 hours ago taking 20 seconds — see the log
Import started 23 hours ago on alnitak and finished 23 hours ago taking 20 seconds — see the log
Import started on 2019-09-21 on alnitak and finished on 2019-09-21 taking 20 seconds — see the log
Import started on 2019-09-21 on alnitak and finished on 2019-09-21 taking 20 seconds — see the log
Import started on 2019-09-20 on alnitak and finished on 2019-09-20 taking 20 seconds — see the log
Import started on 2019-09-20 on alnitak and finished on 2019-09-20 taking 15 seconds — see the log
Import started on 2019-09-20 on alnitak and finished on 2019-09-20 taking 20 seconds — see the log
Import started on 2019-09-20 on alnitak and finished on 2019-09-20 taking 20 seconds — see the log

Recent revisions

1306. By Takashi Sakamoto on 2019-09-16

ALSA: dice: fix wrong packet parameter for Alesis iO26

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: <email address hidden> # v4.18+
Signed-off-by: Takashi Sakamoto <email address hidden>
Link: https://<email address hidden>
Signed-off-by: Takashi Iwai <email address hidden>

1305. By Takashi Sakamoto on 2019-09-10

ALSA: firewire-tascam: check intermediate state of clock status and retry

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: <email address hidden> # v4.4+
Signed-off-by: Takashi Sakamoto <email address hidden>
Link: https://<email address hidden>
Signed-off-by: Takashi Iwai <email address hidden>

1304. By Takashi Sakamoto on 2019-09-10

ALSA: firewire-tascam: handle error code when getting current source of clock

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: <email address hidden> # v4.4+
Signed-off-by: Takashi Sakamoto <email address hidden>
Link: https://<email address hidden>
Signed-off-by: Takashi Iwai <email address hidden>

1303. By Takashi Sakamoto on 2019-09-07

ALSA: firewire-lib: remove WARN_ON() at destruction of AMDTP domain

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 <email address hidden>
Link: https://<email address hidden>
Signed-off-by: Takashi Iwai <email address hidden>

1302. By Takashi Sakamoto on 2019-09-07

ALSA: firewire-tascam: add note for FE-8

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 <email address hidden>
Link: https://<email address hidden>
Signed-off-by: Takashi Iwai <email address hidden>

1301. By Takashi Sakamoto on 2019-08-30

ALSA: firewire-motu: add support for MOTU 4pre

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 <email address hidden>
Signed-off-by: Takashi Iwai <email address hidden>

1300. By Takashi Sakamoto on 2019-08-29

ALSA: firewire-lib: fix isoc cycle count to which rx packet is scheduled

When introducing the list of packet descriptor, for rx packet, the
calculation of scheduled isoc cycle is omitted. This commit fixes the
bug.

Fixes: f4f6ae7b7c1f ("ALSA: firewire-lib: use packet descriptor for IT context")
Signed-off-by: Takashi Sakamoto <email address hidden>
Signed-off-by: Takashi Iwai <email address hidden>

1299. By Takashi Sakamoto on 2019-08-29

ALSA: dice: fix error path for initialization of stream structures

When introducing AMDTP domain to ALSA dice driver, error path does not
handle error correctly. This commit fixes the bug.

Fixes: e9f21129b8d8 ("ALSA: dice: support AMDTP domain")
Signed-off-by: Takashi Sakamoto <email address hidden>
Signed-off-by: Takashi Iwai <email address hidden>

1298. By Takashi Sakamoto on 2019-08-26

ALSA: oxfw: fix NULL pointer dereference to unused stream structure

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 <email address hidden>
Signed-off-by: Takashi Iwai <email address hidden>

1297. By Takashi Sakamoto on 2019-08-26

ALSA: oxfw: fix to handle correct stream for PCM playback

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 <email address hidden>
Signed-off-by: Takashi Iwai <email address hidden>

Branch metadata

Branch format:
Branch format 7
Repository format:
Bazaar repository format 2a (needs bzr 1.16 or later)
This branch contains Public information 
Everyone can see this information.