[alsa-devel] snd-bebob - Edirol FA66
Takashi Sakamoto
o-takashi at sakamocchi.jp
Wed Nov 8 05:49:17 CET 2017
Oops. I described based on renewal engine for which I'm working...
On Nov 8 2017 08:03, Takashi Sakamoto wrote:
> (CCed to alsa-devel)
>
> On Nov 8 2017 05:50, Pawel wrote:
> > In start thanks for your great work.
> > I have such card:
> >
> > 1 [FA66 ]: BeBoB - EDIROL FA-66
> > EDIROL EDIROL FA-66 (id:2, rev:1), GUID
> 0040ab0000c38ae5 at fw1.0, S400
> >
> >
> > .. which ffado drivers , I can start jack with low parameters like;
> > jackd -P82 -p128 -t5000 -u -dfirewire -dhw:FA66 -r96000 -p128 -n2
> >
> > .. but with alsa I need to use period value 3 and buffer size between
> 512 and 2048.
> > There are probably some hardcoded values in alsa driver.
>
> Edirol FA-66 uses DM1000 ASIC as communication engine. This ASIC is
> produced by BridgeCo. in its BeBoB solution. In this solution, IEC
> 61883-1/6 packet streaming is used to transfer audio/music data between
> units on IEEE 1394 bus and host driver.
>
> All of current implementation of drivers in ALSA firewire stack
> including BeBoB driver relies on ALSA packet streaming engine for IEC
> 61883-1/6. This engine runs with hardware interrupts from 1394OHCI host
> controllers. Interval of the interrupt is currently configured to every
> 16 interrupts. This mostly equals to 2 msec in actual time frame.
>
> In a view from ALSA PCM application, the 2 msec is corresponding to a
> period of PCM buffer. Thus, users can configure size of period over 2
> msec in any PCM substream. Actual value of the size of period is decided
> depending on used sampling frequency.
The above section is not for current implementation in upstream. The
hardware interrupt surely occurs per 2 msec (precisely including some
jitters), while the minimum size of period for PCM substream is actually
constrained to 5 msec, due to difference of unit of data transmission
between IEC 61883-1/6 and ALSA PCM interface.
The interval of interrupt is 2 msec, while unit of data transmission for
PCM frames doesn't exectly equal to 2 msec. For safe data handling, the
engine uses the same size of period as near 5 msec so that the interrupt
necessarily occurs between two elapses. For this mechanism, my report
helps your understanding[1] (be aware that it includes some obsoleted
contents).
> Furthermore, any interrupt-oriented driver requires 2 or more periods in
> PCM buffer. Therefore, users can configure size of buffer over multiples
> of 2 msec according to configured number of periods.
>
> That's current design of ALSA IEC 61883-1/6 engine and it's restriction.
[1] https://github.com/takaswie/alsa-firewire-report
Regards
Takashi Sakamoto
More information about the Alsa-devel
mailing list