• Takashi Sakamoto's avatar
    ALSA: firewire-lib/dice/speakers: Add common PCM constraints for AMDTP streams · 7b2d99fa
    Takashi Sakamoto authored
    This commit adds common PCM constraints according to current firewire-lib
    implementation.
    
    1.Maximum width for each sample is limited by 24.
    AM824 in IEC 61883-6 can deliver 24bit data.
    
    2. Minimum time for period is 5msec.
    Apply the old value. For shorter latency, further works are needed.
    
    3. In blocking mode, frames per period/buffer is aligned to 32.
    Each packet can include some frames depending on its sampling rate. In
    blocking mode, the number equals to SYT_INTERVAL. Currently firewire-lib
    can schedule snd_pcm_period_elapsed() for each packet. So, for accurate
    PCM interrupt, the number of frames per period/buffer should be aligned
    to SYT_INTERVAL.
    Currently firewire-lib is lack of better rules to achieve this. So LCM of
    each value of SYT_INTERVALs (=32) is applied. This can be improved for
    further work.
    
    [Fixed the compile error due to the missing "&" by tiwai]
    Signed-off-by: default avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
    Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
    7b2d99fa
dice.c 36.5 KB