<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-dev/sound/firewire/tascam, branch master</title>
<subtitle>Linux kernel development work - see feature branches</subtitle>
<id>https://git.zx2c4.com/linux-dev/atom/sound/firewire/tascam?h=master</id>
<link rel='self' href='https://git.zx2c4.com/linux-dev/atom/sound/firewire/tascam?h=master'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/'/>
<updated>2022-09-27T06:47:25Z</updated>
<entry>
<title>ALSA: firewire: Replace runtime-&gt;status-&gt;state reference to runtime-&gt;state</title>
<updated>2022-09-27T06:47:25Z</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2022-09-26T13:55:51Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=23cb0767f0544858169c02cec445d066d4e02e2b'/>
<id>urn:sha1:23cb0767f0544858169c02cec445d066d4e02e2b</id>
<content type='text'>
The recent change in ALSA core allows drivers to get the current PCM
state directly from runtime object.  Replace the calls accordingly.

Reviewed-by: Jaroslav Kysela &lt;perex@perex.cz&gt;
Link: https://lore.kernel.org/r/20220926135558.26580-5-tiwai@suse.de
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: firewire-tascam: cease from delayed card registration</title>
<updated>2021-06-07T15:14:36Z</updated>
<author>
<name>Takashi Sakamoto</name>
<email>o-takashi@sakamocchi.jp</email>
</author>
<published>2021-06-07T08:12:47Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=7ae2f179a42d7a15a84e238eb1d177ca2c79f954'/>
<id>urn:sha1:7ae2f179a42d7a15a84e238eb1d177ca2c79f954</id>
<content type='text'>
The delayed registration of sound card instance brings less benefit than
complication of kobject management. This commit ceases from it.

Signed-off-by: Takashi Sakamoto &lt;o-takashi@sakamocchi.jp&gt;
Link: https://lore.kernel.org/r/20210607081250.13397-7-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: firewire-tascam: perform sequence replay for media clock recovery</title>
<updated>2021-06-01T06:19:37Z</updated>
<author>
<name>Takashi Sakamoto</name>
<email>o-takashi@sakamocchi.jp</email>
</author>
<published>2021-05-31T02:51:02Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=a9dd8a61b6b1fdf334d0cc63672b3ffac3827f18'/>
<id>urn:sha1:a9dd8a61b6b1fdf334d0cc63672b3ffac3827f18</id>
<content type='text'>
This commit takes ALSA firewire-tascam driver to perform sequence replay
for media clock recovery.

The protocol specific to Tascam FireWire series is not compliant to
IEC 61883-1/6 in terms of syt field of CIP. The protocol doesn't use
presentation time in received CIP for playback timing. The sequence of
the number of data blocks per packet is important for media clock
recovery.

Although the devices in Tascam FireWire series transfer packets
regardless of receiving packets, the tx packets includes no events
in the beginning of streaming. It takes so long to multiplex any event
into the packet after receiving the sequence of packets. As long as I
experienced, it takes several thousands of isochronous cycle. Furthermore,
just after changing sampling transmission frequency, it stops multiplexing
event at once, then starts multiplexing again.

The sequence replay is tested with below models:
 * FW-1884
 * FW-1804
 * FW-1082

Signed-off-by: Takashi Sakamoto &lt;o-takashi@sakamocchi.jp&gt;
Link: https://lore.kernel.org/r/20210531025103.17880-6-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: firewire-lib: transfer rx packets on-the-fly when replaying</title>
<updated>2021-05-28T09:06:33Z</updated>
<author>
<name>Takashi Sakamoto</name>
<email>o-takashi@sakamocchi.jp</email>
</author>
<published>2021-05-27T12:26:11Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=2f21a177631ae969537cf4ed602293d9aac9f73e'/>
<id>urn:sha1:2f21a177631ae969537cf4ed602293d9aac9f73e</id>
<content type='text'>
Models in below series start transmission of packet after receiving the
sequence of packets:

 * Digidesign Digi00x family
 * RME Fireface series

Additionally, models in Tascam FireWire series start multiplexing PCM
frames into packets enough after receiving packets. It's required to
transfer packets on-the-fly for the above models according to nominal
sampling transfer frequency before starting sequence replay.

This commit allows drivers to decide whether the engine transfers packet
on-the-fly or not.

Signed-off-by: Takashi Sakamoto &lt;o-takashi@sakamocchi.jp&gt;
Link: https://lore.kernel.org/r/20210527122611.173711-4-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: firewire-lib: add replay target to cache sequence of packet</title>
<updated>2021-05-28T08:44:01Z</updated>
<author>
<name>Takashi Sakamoto</name>
<email>o-takashi@sakamocchi.jp</email>
</author>
<published>2021-05-27T12:26:09Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=f9e5ecdfc2c2f2a87f4aa8aa3d0216016103d769'/>
<id>urn:sha1:f9e5ecdfc2c2f2a87f4aa8aa3d0216016103d769</id>
<content type='text'>
In design of audio and music unit in IEEE 1394 bus, feedback of
effective sampling transfer frequency (STF) is delivered by packets
transferred from device. The devices supported by ALSA firewire stack
are categorized to three groups regarding to it.

 * Group 1:
   * Echo Audio Fireworks board module
   * Oxford Semiconductor OXFW971 ASIC
   * Digidesign Digi00x family
   * Tascam FireWire series
   * RME Fireface series

 * Group 2:
   * BridgeCo. DM1000/DM1100/DM1500 ASICs for BeBoB solution
   * TC Applied Technologies DICE ASICs

 * Group 3:
   * Mark of the Unicord FireWire series

In group 1, the effective STF is determined by the sequence of the number
of events per packet. In group 2, the sequence of presentation timestamp
expressed in syt field of CIP header is interpreted as well. In group 3,
the presentation timestamp is expressed in source packet header (SPH) of
each data block.

I note that some models doesn't take care of effective STF with large
internal buffer. It's reasonable to name it as group 0:

 * Group 0
   * Oxford Semiconductor OXFW970 ASIC

The effective STF is known to be slightly different from nominal STF for
all of devices, and to be different between the devices. Furthermore, the
effective STF is known to be shifted for long-period transmission. This
makes it hard for software to satisfy the effective STF when processing
packets to the device.

The effective STF is deterministic as a result of analyzing the batch of
packet transferred from the device. For the analysis, caching the sequence
of parameter in the packet is required.

This commit adds an option so that AMDTP domain structure takes AMDTP
stream structure to cache the sequence of parameters in packet transferred
from the device. The parameters are offset ticks of syt field against the
cycle to receive the packet and the number of data blocks per packet.

Signed-off-by: Takashi Sakamoto &lt;o-takashi@sakamocchi.jp&gt;
Link: https://lore.kernel.org/r/20210527122611.173711-2-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: firewire-lib: add flag to unaware of syt in CIP header</title>
<updated>2021-05-22T06:46:41Z</updated>
<author>
<name>Takashi Sakamoto</name>
<email>o-takashi@sakamocchi.jp</email>
</author>
<published>2021-05-22T01:32:58Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=8070d2652e735585d31a50ff4f9bbaf2b5a49b10'/>
<id>urn:sha1:8070d2652e735585d31a50ff4f9bbaf2b5a49b10</id>
<content type='text'>
Many devices are unaware of syt field in rx CIP for playback timing.

This commit adds a flag to cancel processing syt field. Actually,
syt calculation is required to decide the number of events per rx packet.
The flag put 0xffff to CIP header of rx packet. On the other hand,
The value of syt field in CIP header of tx packet is unavailable. The
sequence of packet descriptor for tx packet includes 0 for the offset
of syt field to avoid computation.

Signed-off-by: Takashi Sakamoto &lt;o-takashi@sakamocchi.jp&gt;
Link: https://lore.kernel.org/r/20210522013303.49596-2-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: firewire-lib: change waking up timing to process packets</title>
<updated>2021-05-20T12:01:17Z</updated>
<author>
<name>Takashi Sakamoto</name>
<email>o-takashi@sakamocchi.jp</email>
</author>
<published>2021-05-20T04:01:54Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=bdaedca74d6293b6ac643a8ebe8231b52bf1171b'/>
<id>urn:sha1:bdaedca74d6293b6ac643a8ebe8231b52bf1171b</id>
<content type='text'>
When starting AMDTP domain, tasks in process context yields running CPU
till all of isochronous context get callback, with an assumption that
it's OK to process content of packet.

However several isochronous cycles are skipped to transfer rx packets, or
the content of rx packets are dropped, to manage the timing to start
processing the packets.

This commit changes the timing for tasks in process context to wake up
when processing content of packet is actually ready.

Signed-off-by: Takashi Sakamoto &lt;o-takashi@sakamocchi.jp&gt;
Link: https://lore.kernel.org/r/20210520040154.80450-9-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>Merge branch 'for-linus' into for-next</title>
<updated>2021-01-18T16:39:23Z</updated>
<author>
<name>Takashi Iwai</name>
<email>tiwai@suse.de</email>
</author>
<published>2021-01-18T16:39:18Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=c09e28cd1219fd267ed838e1758ff2e7b6ff3ec6'/>
<id>urn:sha1:c09e28cd1219fd267ed838e1758ff2e7b6ff3ec6</id>
<content type='text'>
Back-merge of 5.11 devel branch for more works on USB-audio.

Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: firewire-tascam: Fix integer overflow in midi_port_work()</title>
<updated>2021-01-12T13:57:38Z</updated>
<author>
<name>Geert Uytterhoeven</name>
<email>geert+renesas@glider.be</email>
</author>
<published>2021-01-11T13:02:51Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=9f65df9c589f249435255da37a5dd11f1bc86f4d'/>
<id>urn:sha1:9f65df9c589f249435255da37a5dd11f1bc86f4d</id>
<content type='text'>
As snd_fw_async_midi_port.consume_bytes is unsigned int, and
NSEC_PER_SEC is 1000000000L, the second multiplication in

    port-&gt;consume_bytes * 8 * NSEC_PER_SEC / 31250

always overflows on 32-bit platforms, truncating the result.  Fix this
by precalculating "NSEC_PER_SEC / 31250", which is an integer constant.

Note that this assumes port-&gt;consume_bytes &lt;= 16777.

Fixes: 531f471834227d03 ("ALSA: firewire-lib/firewire-tascam: localize async midi port")
Reviewed-by: Takashi Sakamoto &lt;o-takashi@sakamocchi.jp&gt;
Signed-off-by: Geert Uytterhoeven &lt;geert+renesas@glider.be&gt;
Link: https://lore.kernel.org/r/20210111130251.361335-3-geert+renesas@glider.be
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
<entry>
<title>ALSA: Convert strlcpy to strscpy when return value is unused</title>
<updated>2021-01-08T08:30:05Z</updated>
<author>
<name>Joe Perches</name>
<email>joe@perches.com</email>
</author>
<published>2021-01-04T17:17:34Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=75b1a8f9d62e50f05d0e4e9f3c8bcde32527ffc1'/>
<id>urn:sha1:75b1a8f9d62e50f05d0e4e9f3c8bcde32527ffc1</id>
<content type='text'>
strlcpy is deprecated.  see: Documentation/process/deprecated.rst

Change the calls that do not use the strlcpy return value to the
preferred strscpy.

Done with cocci script:

@@
expression e1, e2, e3;
@@

-	strlcpy(
+	strscpy(
	e1, e2, e3);

This cocci script leaves the instances where the return value is
used unchanged.

After this patch, sound/ has 3 uses of strlcpy() that need to be
manually inspected for conversion and changed one day.

$ git grep -w strlcpy sound/
sound/usb/card.c:               len = strlcpy(card-&gt;longname, s, sizeof(card-&gt;longname));
sound/usb/mixer.c:      return strlcpy(buf, p-&gt;name, buflen);
sound/usb/mixer.c:                      return strlcpy(buf, p-&gt;names[index], buflen);

Miscellenea:

o Remove trailing whitespace in conversion of sound/core/hwdep.c

Link: https://lore.kernel.org/lkml/CAHk-=wgfRnXz0W3D37d01q3JFkr_i_uTL=V6A6G1oUZcprmknw@mail.gmail.com/

Signed-off-by: Joe Perches &lt;joe@perches.com&gt;
Acked-by: Mark Brown &lt;broonie@kernel.org&gt;
Link: https://lore.kernel.org/r/22b393d1790bb268769d0bab7bacf0866dcb0c14.camel@perches.com
Signed-off-by: Takashi Iwai &lt;tiwai@suse.de&gt;
</content>
</entry>
</feed>
