From: Takashi Sakamoto Date: Fri, 25 Apr 2014 13:44:52 +0000 (+0900) Subject: ALSA: firewire-lib/dice/speakers: Add common PCM constraints for AMDTP streams X-Git-Tag: omap-for-v3.16/fixes-against-rc1~21^2~40^2~50 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7b2d99fa6b127707cf0d78feedbb3613aed4d576;p=pandora-kernel.git ALSA: firewire-lib/dice/speakers: Add common PCM constraints for AMDTP streams 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: Takashi Sakamoto Signed-off-by: Takashi Iwai --- Reading git-diff-tree failed