[alsa-devel] [PATCH 00/11] ALSA: dice: use cache of stream formats to generate PCM rules/constraints
Takashi Sakamoto
o-takashi at sakamocchi.jp
Wed Apr 25 01:42:23 CEST 2018
Hi,
Once, ALSA dice driver cached stream formats to generate PCM
constraints/rules. The cache is created by changing current
sampling transmission frequency step by step directly at unit
probing process. This feature was dropped because it changes
state of clock on target device thus it's against users'
expectation[1].
However this is not necessarily convenient because reconfiguration
of sampling rate is not available.
TC Applied Technologies (TCAT) has extended protocol for DICE
interface, a.k.a EAP (Extended Application Protocol). In this
extension, drivers can retrieve information of stream formats
without changing state of target unit. Fortunately, this protocol
is supported widely by many models.
This patchset regain the cache to generate PCM constraints/rules
by using this protocol. Userspace applications can reconfigure
sampling rate via ALSA PCM interface.
For units which doesn't support the extension, available set of
sampling rate is still restricted at current sampling transmission
frequency. This is also inconvenient and this patchset introduces a
solution.
Structure for unit entry (struct ieee1394_device_id) has a member
for unit-specific data. This patchset uses it for callback function
to handle hard-coded stream format. In this time, I adopt this way
for some known models produced by TC Electronic and Alesis. If users
find their models still have restrictions in a point of available
sampling transmission frequency, it's preferable to work for this
way.
[1] [alsa-devel] [PATCH 0/6 v2] ALSA: dice: constrain PCM substreams to current sampling transfer frequency
http://mailman.alsa-project.org/pipermail/alsa-devel/2016-February/104065.html
[2] [alsa-devel] [PATCH] ALSA: dice: fix OUI for TC group
http://mailman.alsa-project.org/pipermail/alsa-devel/2018-April/134804.html
Takashi Sakamoto (11):
ALSA: dice: add cache of stream formats
ALSA: dice: add 'firewire' directory for proc nodes
ALSA: dice: add proc node for stream formation
ALSA: dice: cache stream formats at current mode of sampling
transmission frequency
ALSA: dice: enable to change current sampling transmission frequency
ALSA: dice: use cache for PCM constraints and rules
ALSA: dice: use stream formats to add MIDI substreams
ALSA: dice: add parameters of stream formats for models produced by TC
Electronic
ALSA: dice: add parameters of stream formats for models produced by
Alesis
ALSA: dice: use extended protocol to detect available stream formats
ALSA: dice: remove local frag of force_two_pcms
sound/firewire/dice/Makefile | 3 +-
sound/firewire/dice/dice-alesis.c | 48 +++++++
sound/firewire/dice/dice-extension.c | 155 +++++++++++++++++++++
sound/firewire/dice/dice-midi.c | 23 +---
sound/firewire/dice/dice-pcm.c | 230 ++++++++++++++++++++++----------
sound/firewire/dice/dice-proc.c | 70 +++++++++-
sound/firewire/dice/dice-stream.c | 116 +++++++++++++++-
sound/firewire/dice/dice-tcelectronic.c | 100 ++++++++++++++
sound/firewire/dice/dice.c | 137 ++++++++++++-------
sound/firewire/dice/dice.h | 17 ++-
10 files changed, 753 insertions(+), 146 deletions(-)
create mode 100644 sound/firewire/dice/dice-alesis.c
create mode 100644 sound/firewire/dice/dice-extension.c
create mode 100644 sound/firewire/dice/dice-tcelectronic.c
--
2.14.1
More information about the Alsa-devel
mailing list