greybus: gb-audio: Set I2S Configuration according to ASOC requests
Currently, the audio driver unconditionally sets the I2S
configuration to have a sample rate of 48KHz, two channels,
16 bits per channel, in little endian order. Make this
more flexible by setting the I2S configuration according to
the arguments passed to the PCM 'hw_params' callback.
To accomplish this, query for the supported I2S configurations
at Greybus protocol init time and save them in the 'snd_dev'
structure. When the 'hw_params' callback is called, compare its
arguments to the table of supported configurations. If there is
a match, set the I2S connection accordingly.
Signed-off-by: Mark A. Greer <mgreer@animalcreek.com>
Acked-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>