ALSA: oxfw: Change the way to make PCM rules/constraints
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>
Mon, 8 Dec 2014 15:10:42 +0000 (00:10 +0900)
committerTakashi Iwai <tiwai@suse.de>
Wed, 10 Dec 2014 09:47:37 +0000 (10:47 +0100)
commit5cd1d3f47a6321612a51ab88ffe8ef65120fcbe0
treef2f537e9ec9185754441c37f7896788a76795312
parent5b59d8098d2a3fa8ea4ad07b96f62c00c3b3e8d3
ALSA: oxfw: Change the way to make PCM rules/constraints

In previous commit, this driver can get to know stream formations at
each supported sampling rates. This commit uses it to make PCM
rules/constraints and obsoletes hard-coded rules/constraints.

For this purpose, this commit adds 'struct snd_oxfw_stream_formation' and
snd_oxfw_stream_parse_format() to parse data channel formation of data
block.

According to datasheet of OXFW970/971, they support 32.0kHz to 196.0kHz.

As long as developers investigate, some devices are confirmed to have
several formats for the same sampling rate.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Acked-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/firewire/oxfw/oxfw-pcm.c
sound/firewire/oxfw/oxfw-stream.c
sound/firewire/oxfw/oxfw.c
sound/firewire/oxfw/oxfw.h