alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [RFT][PATCH 0/4] ALSA: dice: enabled to handle several streams
@ 2016-03-05 11:58 Takashi Sakamoto
  2016-03-05 11:58 ` [PATCH 1/4] ALSA: dice: have two sets of isochronous resources/streams Takashi Sakamoto
                   ` (3 more replies)
  0 siblings, 4 replies; 18+ messages in thread
From: Takashi Sakamoto @ 2016-03-05 11:58 UTC (permalink / raw)
  To: clemens, tiwai; +Cc: alsa-devel, stefanr, ffado-devel

Hi,

This patchset adds support for whole available isochronous streams to ALSA
dice driver. As a result, for some models, additional PCM substreams are
available via subdevice of ALSA PCM character device. In configuration space
of alsa-lib, it's represented like 'hw:0,0,1'(card/device/subdevice).

It's soon in the last week of this developing cycle, while I hope to finish
my work for ALSA dice driver by this patchset. Unfortunately, this patchset
adds huge changes and includes possibilities of regression. I'm happy to
receive your reports to test with any of your Dice units.

For testers, I push whole patches to 'dice-several-streams' branch in my
private repository. The changed driver is available from this branch. I
recommend to use DKMS to maintain the driver, instead of installing by your
own.
https://github.com/takaswie/snd-firewire-improve/tree/dice-several-streams

To check whether your units support several isochronous streams, please
read output from /proc/asound/cardX/dice. When seeing 'tx1' (input) or
'rx1' (output), the additional subdevices are available. For example,

$ arecord -l
...
card 1: Pro26000f5a [Pro26-000f5a], device 0: DICE [Pro26-000f5a]
  Subdevices: 2/2
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1

In above case, you can use two subdevices for PCM capture, thus:
 * arecord -D plughw:1,0,0 file1.wav
 * arecord -D plughw:1,0,1 file2.wav

In the middle of next week, I plan to post this patchset again for
merging. So it's nice to test till then.


Regards

Takashi Sakamoto (4):
  ALSA: dice: have two sets of isochronous resources/streams
  ALSA: dice: handle whole available isochronous streams
  ALSA: dice: handle several PCM substreams when any isochronous streams
    are available
  ALSA: dice: force to add two pcm devices for listed models

 sound/firewire/dice/dice-midi.c   |   8 +-
 sound/firewire/dice/dice-pcm.c    | 110 +++++++----
 sound/firewire/dice/dice-stream.c | 400 ++++++++++++++++++++++++--------------
 sound/firewire/dice/dice.c        |  41 ++++
 sound/firewire/dice/dice.h        |  33 +++-
 5 files changed, 401 insertions(+), 191 deletions(-)

-- 
2.7.0

^ permalink raw reply	[flat|nested] 18+ messages in thread
* [PATCH 0/4] ALSA: dice: enable to handle several streams
@ 2016-03-07 13:35 Takashi Sakamoto
  2016-03-07 13:35 ` [PATCH 2/4] ALSA: dice: handle whole available isochronous streams Takashi Sakamoto
  0 siblings, 1 reply; 18+ messages in thread
From: Takashi Sakamoto @ 2016-03-07 13:35 UTC (permalink / raw)
  To: clemens, tiwai; +Cc: alsa-devel, stefanr, ffado-devel

Hi,

This patchset updates my previous RFT, and goes for merging.
[alsa-devel] [RFT][PATCH 0/4] ALSA: dice: enabled to handle several streams
http://mailman.alsa-project.org/pipermail/alsa-devel/2016-March/105387.html

For the previous one, Stefan Richter worked as a tester with his devices
(Focusrite Saffire Pro 24 and 40), while current patchset includes changes
related to userspace interface. Therefore, I don't add Tested-by.


In previous one, ALSA dice driver uses subdevice for userspace to access
any PCM substreams. On the other hand, the design of PCM subdevice leaves
a bit cumbersome for userspace to handle several subdevices simultaneously
in one process. These PCM substreams on a batch of AMDTP streams and it's
better for ALSA dice driver to enable one process to handle them with
simpler way.

Based on this concept, this patchset adds PCM character devices, instead of
PCM subdevice. Thus, userspace applications can utilize PCM substreams via
individual PCM character devices. In configuration space of alsa-lib, via
'hw:0,0' and 'hw:0,1' if available, like:

$ arecord -l
...
card 1: Pro26000f5a [Pro26-000f5a], device 0: DICE [Pro26-000f5a]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: Pro26000f5a [Pro26-000f5a], device 1: DICE [Pro26-000f5a]
  Subdevices: 1/1
  Subdevice #0: subdevice #0


For the other parts, there's no code changes. Therefore, Stefan's result
still has meanings.

Changes:
 * Add additional PCM character device instead of PCM subdevice
 * Correct string entries to force-pcm
 * Improve comments

Takashi Sakamoto (4):
  ALSA: dice: have two sets of isochronous resources/streams
  ALSA: dice: handle whole available isochronous streams
  ALSA: dice: handle several PCM substreams when any isochronous streams
    are available
  ALSA: dice: force to add two pcm devices for listed models

 sound/firewire/dice/dice-midi.c   |   8 +-
 sound/firewire/dice/dice-pcm.c    | 147 +++++++++-----
 sound/firewire/dice/dice-stream.c | 398 ++++++++++++++++++++++++--------------
 sound/firewire/dice/dice.c        |  41 ++++
 sound/firewire/dice/dice.h        |  33 +++-
 5 files changed, 424 insertions(+), 203 deletions(-)

-- 
2.7.0

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

end of thread, other threads:[~2016-04-14 21:30 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-05 11:58 [RFT][PATCH 0/4] ALSA: dice: enabled to handle several streams Takashi Sakamoto
2016-03-05 11:58 ` [PATCH 1/4] ALSA: dice: have two sets of isochronous resources/streams Takashi Sakamoto
2016-03-05 11:58 ` [PATCH 2/4] ALSA: dice: handle whole available isochronous streams Takashi Sakamoto
2016-03-05 14:47   ` Stefan Richter
2016-03-05 11:58 ` [PATCH 3/4] ALSA: dice: handle several PCM substreams when any isochronous streams are available Takashi Sakamoto
2016-03-05 11:58 ` [PATCH 4/4] ALSA: dice: force to add two pcm devices for listed models Takashi Sakamoto
2016-03-05 15:07   ` Stefan Richter
2016-03-06 12:39     ` Takashi Sakamoto
2016-03-06 22:55       ` Stefan Richter
2016-03-07  0:24         ` Stefan Richter
2016-03-07  2:57           ` Takashi Sakamoto
     [not found]           ` <56DCEF78.2080107@sakamocchi.jp>
     [not found]             ` <20160307144306.39f60537@kant>
2016-03-07 14:19               ` Takashi Sakamoto
     [not found]               ` <56DD8D1B.5040903@sakamocchi.jp>
2016-04-09 16:34                 ` Stefan Richter
2016-04-09 16:45                   ` [FFADO-devel] " Gordon Scott
2016-04-12 14:25                   ` Takashi Sakamoto
2016-04-14 21:30                     ` Stefan Richter
  -- strict thread matches above, loose matches on Subject: below --
2016-03-07 13:35 [PATCH 0/4] ALSA: dice: enable to handle several streams Takashi Sakamoto
2016-03-07 13:35 ` [PATCH 2/4] ALSA: dice: handle whole available isochronous streams Takashi Sakamoto
2016-03-09 15:29   ` Takashi Iwai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).