23 Aug, 2020
1 commit
-
Avid Adrenaline is reported that ALSA firewire-digi00x driver is bound to.
However, as long as he investigated, the design of this model is hardly
similar to the one of Digi 00x family. It's better to exclude the model
from modalias of ALSA firewire-digi00x driver.This commit changes device entries so that the model is excluded.
$ python3 crpp < ~/git/am-config-rom/misc/avid-adrenaline.img
ROM header and bus information block
-----------------------------------------------------------------
400 04203a9c bus_info_length 4, crc_length 32, crc 15004
404 31333934 bus_name "1394"
408 e064a002 irmc 1, cmc 1, isc 1, bmc 0, cyc_clk_acc 100, max_rec 10 (2048)
40c 00a07e01 company_id 00a07e |
410 00085257 device_id 0100085257 | EUI-64 00a07e0100085257root directory
-----------------------------------------------------------------
414 0005d08c directory_length 5, crc 53388
418 0300a07e vendor
41c 8100000c --> descriptor leaf at 44c
420 0c008380 node capabilities
424 8d000002 --> eui-64 leaf at 42c
428 d1000004 --> unit directory at 438eui-64 leaf at 42c
-----------------------------------------------------------------
42c 0002410f leaf_length 2, crc 16655
430 00a07e01 company_id 00a07e |
434 00085257 device_id 0100085257 | EUI-64 00a07e0100085257unit directory at 438
-----------------------------------------------------------------
438 0004d6c9 directory_length 4, crc 54985
43c 1200a02d specifier id: 1394 TA
440 13014001 version: Vender Unique and AV/C
444 17000001 model
448 81000009 --> descriptor leaf at 46cdescriptor leaf at 44c
-----------------------------------------------------------------
44c 00077205 leaf_length 7, crc 29189
450 00000000 textual descriptor
454 00000000 minimal ASCII
458 41766964 "Avid"
45c 20546563 " Tec"
460 686e6f6c "hnol"
464 6f677900 "ogy"
468 00000000descriptor leaf at 46c
-----------------------------------------------------------------
46c 000599a5 leaf_length 5, crc 39333
470 00000000 textual descriptor
474 00000000 minimal ASCII
478 41647265 "Adre"
47c 6e616c69 "nali"
480 6e650000 "ne"Reported-by: Simon Wood
Fixes: 9edf723fd858 ("ALSA: firewire-digi00x: add skeleton for Digi 002/003 family")
Cc: # 4.4+
Signed-off-by: Takashi Sakamoto
Link: https://lore.kernel.org/r/20200823075545.56305-1-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai
06 Mar, 2020
1 commit
-
KBUILD_MODNAME is available to name kernel modules according to its object
name. This commit uses the macro instead of string for name field of
struct driver since drivers in ALSA firewire stack have the same name of
each object name.Signed-off-by: Takashi Sakamoto
Link: https://lore.kernel.org/r/20200306135229.11659-1-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai
11 Dec, 2019
2 commits
-
All the PCM ioctl ops of ALSA FireWire drivers do nothing but calling
the default handler.Now PCM core accepts NULL as the default ioctl ops(*), so let's drop
altogether.(*) commit fc033cbf6fb7 ("ALSA: pcm: Allow NULL ioctl ops")
Acked-by: Takashi Sakamoto
Link: https://lore.kernel.org/r/20191210061145.24641-6-tiwai@suse.de
Signed-off-by: Takashi Iwai -
Clean up the drivers with the new managed buffer allocation API.
The superfluous snd_pcm_lib_malloc_pages() and
snd_pcm_lib_free_pages() calls are dropped.Acked-by: Takashi Sakamoto
Link: https://lore.kernel.org/r/20191209192422.23902-1-tiwai@suse.de
Signed-off-by: Takashi Iwai
06 Nov, 2019
1 commit
-
The recent change (*) in the ALSA memalloc core allows us to drop the
special vmalloc-specific allocation and page handling. This patch
coverts to the common code.
(*) 1fe7f397cfe2: ALSA: memalloc: Add vmalloc buffer allocation
support
7e8edae39fd1: ALSA: pcm: Handle special page mapping in the
default mmap handlerLink: https://lore.kernel.org/r/20191105151856.10785-11-tiwai@suse.de
Signed-off-by: Takashi Iwai
19 Oct, 2019
3 commits
-
Some devices have a quirk to postpone transmission of isoc packet for
several dozen or hundred isoc cycles since configured to transmit.
Furthermore, some devices have a quirk to transmit isoc packet with
discontinued data of its header.In 1394 OHCI specification, software allows to start isoc context with
certain isoc cycle. Linux firewire subsystem has kernel API to use it
as well.This commit uses the functionality of 1394 OHCI controller to handle
the quirks. At present, this feature is convenient to ALSA bebob and
fireface driver. As a result, some devices can be safely handled, as
long as I know:
- MAudio FireWire solo
- MAudio ProFire Lightbridge
- MAudio FireWire 410
- Roland FA-66Signed-off-by: Takashi Sakamoto
Link: https://lore.kernel.org/r/20191018061911.24909-7-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai -
An isoc context for AMDTP stream is flushed to queue packet
by a call of pcm.ack. This commit extends this for AMDTP
domain.Signed-off-by: Takashi Sakamoto
Link: https://lore.kernel.org/r/20191018061911.24909-4-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai -
An isoc context for AMDTP stream is flushed to queue packet
by a call of pcm.pointer. This commit extends this for AMDTP
domain.Signed-off-by: Takashi Sakamoto
Link: https://lore.kernel.org/r/20191018061911.24909-3-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai
18 Oct, 2019
2 commits
-
This commit allows ALSA firewire-digi00x driver to share PCM buffer
size for both capture and playback PCM substream. When AMDTP domain
starts for one of the PCM substream, buffer size of the PCM substream
is stores to AMDTP domain structure. Some AMDTP streams have already
run with the buffer size when another PCM substream starts, therefore
the PCM substream has a constraint to its buffer size.Signed-off-by: Takashi Sakamoto
Link: https://lore.kernel.org/r/20191017155424.885-7-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai -
The number of packets in packet buffer has been fixed number (=48) since
first commit of ALSA IEC 61883-1/6 packet streaming engine.This commit allows the engine to use variable number of packets in the
buffer. The size is calculated by a parameter in AMDTP domain structure
surely to store the number of events in the packets of buffer. Although
the value of parameter is expected to come from 'period size' parameter
of PCM substream, at present 48 is still used.Signed-off-by: Takashi Sakamoto
Link: https://lore.kernel.org/r/20191017155424.885-2-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai
17 Oct, 2019
2 commits
-
In current implementation, when opening a PCM substream, it's needed to
check whether the opposite PCM substream runs. This is to assign
effectual constraints (e.g. sampling rate) to opened PCM substream.The number of PCM substreams and MIDI substreams on AMDTP streams in
domain is recorded in own structure. Usage of this count is an
alternative of the above check. This is better because the count is
incremented in pcm.hw_params earlier than pcm.trigger.This idea has one issue because it's incremented for MIDI substreams as
well. In current implementation, for a case that any MIDI substream run
and a PCM substream is going to start, PCM application to start the PCM
substream can decide hardware parameters by restart packet streaming.
Just checking the substream count can brings regression.Now AMDTP domain structure has a member for the size of PCM period in
PCM substream which starts AMDTP streams in domain. When the value has
zero and the substream count is greater than 1, it means that any MIDI
substream starts AMDTP streams in domain. Usage of the value can resolve
the above issue.This commit replaces the check with the substream count and the value for
the size of PCM period.I note that DOT AMDTP protocol has a quirk to use different transmission
method of IEC 61883-6 for tx/rx streams; non-blocking in tx stream and
blocking in rx stream. Although the difference of transmission method
between tx/rx streams precisely brings different timing for a certain
amount of events due to their different calculation for data blocks per
packet, it's possible to approximate enough amount of events mostly has
the same timing. Actually current ALSA IEC 61883-1/6 engine uses large
amount of data blocks for each hardware IRQ (=16 packets).Signed-off-by: Takashi Sakamoto
Link: https://lore.kernel.org/r/20191007110532.30270-15-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai -
This commit is a preparation to share the size of PCM period between
PCM substreams on AMDTP streams in the same domain. At this time,
the size of PCM period in PCM substream which starts AMDTP streams in the
same domain is recorded.Signed-off-by: Takashi Sakamoto
Link: https://lore.kernel.org/r/20191007110532.30270-7-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai
06 Aug, 2019
2 commits
-
This commit adds AMDTP domain support for ALSA firewire-digi00x driver.
Signed-off-by: Takashi Sakamoto
Signed-off-by: Takashi Iwai -
This commit is a preparation to support AMDTP domain.
Signed-off-by: Takashi Sakamoto
Signed-off-by: Takashi Iwai
22 Jul, 2019
5 commits
-
This commit changes each of data block processing layer so that it
receives list of packet descriptor.Signed-off-by: Takashi Sakamoto
Signed-off-by: Takashi Iwai -
This is code refactoring for DOT data block processing layer so that
it can receive list of packet descriptor.Signed-off-by: Takashi Sakamoto
Signed-off-by: Takashi Iwai -
This commit changes signature of callback function to call data block
processing layer with packet descriptor. At present, the layer is called
per packet.Signed-off-by: Takashi Sakamoto
Signed-off-by: Takashi Iwai -
In a previous commit, the variable passed from packet streaming layer
for syt variable is useless. This commit obsoletes it.In my future work, the syt information is passed to data block processing
layer by another way.Signed-off-by: Takashi Sakamoto
Signed-off-by: Takashi Iwai -
This is a preparation for future commit that 'struct
amdtp_stream.data_block_count' does not represent the value of
data block count for current data block.However, data block count is required for calculation of sequence index
in sequence-multiplied data channel. Some of data block processing layer
require it; e.g. for AM824 data block.This commit passes data block count to the processing layer.
Signed-off-by: Takashi Sakamoto
Signed-off-by: Takashi Iwai
08 Jul, 2019
1 commit
-
…/sound into for-linus
ASoC: Updates for v5.3
This is a very big update, mainly thanks to Morimoto-san's refactoring
work and some fairly large new drivers.- Lots more work on moving towards a component based framework from
Morimoto-san.
- Support for force disconnecting muxes from Jerome Brunet.
- New drivers for Cirrus Logic CS47L35, CS47L85 and CS47L90, Conexant
CX2072X, Realtek RT1011 and RT1308.Signed-off-by: Takashi Iwai <tiwai@suse.de>
07 Jul, 2019
1 commit
-
…ror path of rawmidi interface
In IEC 61883-6, several types of sampling data can be multiplexed into
payload of common isochronous packet (CIP). For typical audio and music
units, PCM samples and MIDI messages are multiplexed into one packet
streaming.ALSA firewire-digi00x driver allows applications of rawmidi interface to
start packet streaming for transmission of MIDI messages. However at
error path, the reference count of stream functionality is not operated
correctly. This can brings a bug that packet streaming is not stopped
when all referrers release the count.This commit fixes the bug.
Fixes: ae8ffbb26512 ("ALSA: firewire-digi00x: reserve/release isochronous resources in pcm.hw_params/hw_free callbacks")
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
21 Jun, 2019
1 commit
-
>From callbacks for pcm and rawmidi interfaces, the functions to stop
and release duplex streams are called at the same time. This commit
merges the two functions.Signed-off-by: Takashi Sakamoto
Signed-off-by: Takashi Iwai
11 Jun, 2019
7 commits
-
The pairs of pcm.hw_params callbacks and .hw_free callbacks for both
direction have no differences.This commit unifies the pairs.
Signed-off-by: Takashi Sakamoto
Signed-off-by: Takashi Iwai -
After bus reset, isochronous resource manager releases all of allocated
isochronous resources. The nodes to transfer isochronous packet should
request reallocation of the resources.However, between the bus-reset and invocation of 'struct fw_driver.update'
handler, ALSA PCM application can detect this situation by XRUN because
the target device cancelled to transmit packets once bus-reset occurs.Due to the above mechanism, ALSA fireface driver just stops packet
streaming in the update handler, thus pcm.prepare handler should
request the reallocation.This commit requests the reallocation in pcm.prepare callback when
bus generation is changed.Signed-off-by: Takashi Sakamoto
Signed-off-by: Takashi Iwai -
Once allocated, isochronous resources are available for packet
streaming, even if the streaming is cancelled. For this reason,
current implementation handles allocation of the resources and
starting packet streaming at the same time. However, this brings
complicated procedure to start packet streaming.This commit separates the allocation and starting. The allocation is
done in pcm.hw_params callback and available till pcm.hw_free callback.
Even if any XRUN occurs, pcm.prepare callback is done to restart
packet streaming without releasing/allocating the resources.There are two points to stop packet streaming; in pcm.hw_params and
pcm.prepare callbacks. The former point is a case that packet streaming
is already started for any MIDI substream then packet streaming is
requested with different sampling transfer frequency for any PCM
substream. The latter point is cases of any XRUN or packet queueing
error.Signed-off-by: Takashi Sakamoto
Signed-off-by: Takashi Iwai -
This commit is a part of preparation to perform allocation/release
of isochronous resources in pcm.hw_params/hw_free callbacks.All of models in Digidesign Digi00x family have the same formation of
data channels in isochronous packet for both directions. This commit
simplifies allocation of isochronous resources in this point.Signed-off-by: Takashi Sakamoto
Signed-off-by: Takashi Iwai -
This commit is a part of preparation to perform allocation/release
of isochronous resources in pcm.hw_params/hw_free callbacks.The caller of begin_session() calls finish_session() in its error path,
thus no need to call finish_session() in error path of begin_session().This commit simplifies error path of begin_session().
Signed-off-by: Takashi Sakamoto
Signed-off-by: Takashi Iwai -
This commit is a part of preparation to perform allocation/release
of isochronous resources in pcm.hw_params/hw_free callbacks.The operation to finish packet streaming corresponds to stopping
isochronous contexts. This commit applies code refactoring to
move codes to stop into a helper function to finish the session.Signed-off-by: Takashi Sakamoto
Signed-off-by: Takashi Iwai -
This commit is a part of preparation to perform allocation/release
of isochronous resources in pcm.hw_params/hw_free callbacks.The registration of isochronous channels is done just after allocation
of isochronous resources. This commit separates the registration just
before starting packet streaming.Signed-off-by: Takashi Sakamoto
Signed-off-by: Takashi Iwai
05 Jun, 2019
1 commit
-
Based on 1 normalized pattern(s):
licensed under the terms of the gnu general public license version 2
extracted by the scancode license scanner the SPDX license identifier
GPL-2.0-only
has been chosen to replace the boilerplate/reference in 88 file(s).
Signed-off-by: Thomas Gleixner
Reviewed-by: Alexios Zavras
Reviewed-by: Allison Randal
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190530000437.521539229@linutronix.de
Signed-off-by: Greg Kroah-Hartman
22 May, 2019
1 commit
-
Some parameters of struct amdtp_stream is dependent on direction.
This commit uses union for such parameters to distinguish from
common parameters.Signed-off-by: Takashi Sakamoto
Signed-off-by: Takashi Iwai
21 May, 2019
1 commit
-
Add SPDX license identifiers to all Make/Kconfig files which:
- Have no license information of any form
These files fall under the project license, GPL v2 only. The resulting SPDX
license identifier is:GPL-2.0-only
Signed-off-by: Thomas Gleixner
Signed-off-by: Greg Kroah-Hartman
07 Feb, 2019
1 commit
-
The calls of snd_info_register() are superfluous and should be avoided
at the procfs creation time. They are called at the end of the whole
initialization via snd_card_register(). This patch drops such
superfluous calls.Reviewed-by: Takashi Sakamoto
Tested-by: Takashi Sakamoto
Signed-off-by: Takashi Iwai
10 Oct, 2018
3 commits
-
In former commits, .private_free callback releases resources just for
data transmission. This release function can be called without the
resources are actually allocated in error paths.This commit applies a small refactoring to clean up codes in error
paths.Signed-off-by: Takashi Sakamoto
Signed-off-by: Takashi Iwai -
In a previous commit, drivers in ALSA firewire stack blocks .remove
callback of bus driver. This enables to release members of private
data in the callback after releasing device of sound card.This commit simplifies codes to release the members.
Signed-off-by: Takashi Sakamoto
Signed-off-by: Takashi Iwai -
At present, in .remove callback of bus driver just decrease reference
count of device for ALSA card instance. This delegates release of the
device to a process in which the last of ALSA character device is
released.On the other hand, the other drivers such as for devices on PCIe are
programmed to block .remove callback of bus driver till all of ALSA
character devices are released.For consistency of behaviour for whole drivers, this probably confuses
users. This commit takes drivers in ALSA firewire stack to imitate the
above behaviour.Signed-off-by: Takashi Sakamoto
Signed-off-by: Takashi Iwai
04 Oct, 2018
1 commit
-
At present, private data of each driver in ALSA firewire stack is
allocated/freed by kernel slab allocator for corresponding unit on
IEEE 1394 bus. In this case, resource-managed slab allocator is
available to release memory object automatically just before releasing
device structure for the unit. This idea can prevent runtime from
memory leak due to programming mistakes.This commit uses the allocator for the private data. These drivers
already use reference counter to maintain lifetime of device structure
for the unit by a pair of fw_unit_get()/fw_unit_put(). The private data
is safely released in a callback of 'struct snd_card.private_free().Signed-off-by: Takashi Sakamoto
Signed-off-by: Takashi Iwai
13 Sep, 2018
1 commit
-
Although private data of sound card instance is usually allocated in the
tail of the instance, drivers in ALSA firewire stack allocate the private
data before allocating the instance. In this case, the private data
should be released explicitly at .private_free callback of the instance.This commit fixes memory leak following to the above design.
Fixes: 86c8dd7f4da3 ('ALSA: firewire-digi00x: delayed registration of sound card')
Cc: # v4.7+
Signed-off-by: Takashi Sakamoto
Signed-off-by: Takashi Iwai
18 Jul, 2018
1 commit
-
snd_pcm_lib_mmap_vmalloc() was supposed to be implemented with
somewhat special for vmalloc handling, but in the end, this turned to
just the default handler, i.e. NULL. As the situation has never
changed over decades, let's rip it off.Reviewed-by: Takashi Sakamoto
Signed-off-by: Takashi Iwai
28 May, 2018
1 commit
-
Convert the S_ symbolic permissions to their octal equivalents as
using octal and not symbolic permissions is preferred by many as more
readable.see: https://lkml.org/lkml/2016/8/2/1945
Done with automated conversion via:
$ ./scripts/checkpatch.pl -f --types=SYMBOLIC_PERMS --fix-inplaceMiscellanea:
o Wrapped one multi-line call to a single line
Signed-off-by: Joe Perches
Acked-by: Vinod Koul
Signed-off-by: Takashi Iwai