All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 00/13] ALSA: dice: use cache of stream formats to generate PCM rules/constraints
@ 2018-04-29  6:50 Takashi Sakamoto
  2018-04-29  6:50 ` [PATCH v2 01/13] ALSA: dice: add cache of stream formats Takashi Sakamoto
                   ` (12 more replies)
  0 siblings, 13 replies; 21+ messages in thread
From: Takashi Sakamoto @ 2018-04-29  6:50 UTC (permalink / raw)
  To: clemens, tiwai; +Cc: alsa-devel, ffado-devel

Hi,

This patchset updates my previous one:

[alsa-devel] [PATCH 00/11] ALSA: dice: use cache of stream formats to generate PCM rules/constraints
http://mailman.alsa-project.org/pipermail/alsa-devel/2018-April/134983.html

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.

Changes from v1:
 - rename members for the channel cache.
 - add minor refactoring.
 - fix a bug that sampling transmission frequency is not changed via
   ALSA PCM interface.
 - fix a bug that current stream formats are reused after changing
   sampling transmission frequency.

[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 (13):
  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: 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: use cache of stream format to check running stream
  ALSA: dice: add a helper function to restart all of available streams
  ALSA: dice: enable to change current sampling transmission frequency
  ALSA: dice: use stream formats to add MIDI substreams
  ALSA: dice: use cache for PCM constraints and rules
  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    | 172 ++++++++++++++++++++
 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       | 273 ++++++++++++++++++++++++--------
 sound/firewire/dice/dice-tcelectronic.c | 100 ++++++++++++
 sound/firewire/dice/dice.c              | 139 ++++++++++------
 sound/firewire/dice/dice.h              |  17 +-
 10 files changed, 867 insertions(+), 208 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

^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2018-05-01  9:25 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-29  6:50 [PATCH v2 00/13] ALSA: dice: use cache of stream formats to generate PCM rules/constraints Takashi Sakamoto
2018-04-29  6:50 ` [PATCH v2 01/13] ALSA: dice: add cache of stream formats Takashi Sakamoto
2018-04-29  6:50 ` [PATCH v2 02/13] ALSA: dice: add 'firewire' directory for proc nodes Takashi Sakamoto
2018-04-29  6:50 ` [PATCH v2 03/13] ALSA: dice: add proc node for stream formation Takashi Sakamoto
2018-04-30 15:12   ` Takashi Iwai
2018-05-01  3:06     ` Takashi Sakamoto
2018-04-29  6:50 ` [PATCH v2 04/13] ALSA: dice: cache stream formats at current mode of sampling transmission frequency Takashi Sakamoto
2018-04-30 15:10   ` Takashi Iwai
2018-05-01  3:02     ` Takashi Sakamoto
2018-05-01  6:54       ` Takashi Iwai
2018-05-01  9:14         ` Takashi Sakamoto
2018-05-01  9:25           ` Takashi Iwai
2018-04-29  6:50 ` [PATCH v2 05/13] ALSA: dice: add parameters of stream formats for models produced by TC Electronic Takashi Sakamoto
2018-04-29  6:50 ` [PATCH v2 06/13] ALSA: dice: add parameters of stream formats for models produced by Alesis Takashi Sakamoto
2018-04-29  6:50 ` [PATCH v2 07/13] ALSA: dice: use extended protocol to detect available stream formats Takashi Sakamoto
2018-04-29  6:50 ` [PATCH v2 08/13] ALSA: dice: use cache of stream format to check running stream Takashi Sakamoto
2018-04-29  6:50 ` [PATCH v2 09/13] ALSA: dice: add a helper function to restart all of available streams Takashi Sakamoto
2018-04-29  6:50 ` [PATCH v2 10/13] ALSA: dice: enable to change current sampling transmission frequency Takashi Sakamoto
2018-04-29  6:50 ` [PATCH v2 11/13] ALSA: dice: use stream formats to add MIDI substreams Takashi Sakamoto
2018-04-29  6:50 ` [PATCH v2 12/13] ALSA: dice: use cache for PCM constraints and rules Takashi Sakamoto
2018-04-29  6:50 ` [PATCH v2 13/13] ALSA: dice: remove local frag of force_two_pcms Takashi Sakamoto

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.