[ARM] tegra: tegra_i2s_audio: add support for downsampling to 16kHz

Signed-off-by: Iliyan Malchev <malchev@google.com>
This commit is contained in:
Iliyan Malchev 2010-08-24 13:40:26 -07:00 committed by Colin Cross
parent 7b284e782b
commit 71f142dd09

View File

@ -84,10 +84,11 @@ struct i2s_pio_stats {
u32 rx_fifo_read;
};
static const int divs_8000[] = { 5, 6, 6, 5 };
static const int divs_8000[] = { 5, 6, 6, 5 }; /* 8018.(18) Hz */
static const int divs_11025[] = { 4 };
static const int divs_22050[] = { 2 };
static const int divs_44100[] = { 1 };
static const int divs_16000[] = { 2, 3, 3, 3, 3, 3, 3, 2 }; /* 16036.(36) Hz */
/* per i2s controller */
struct audio_driver_state {
@ -1353,6 +1354,10 @@ static long tegra_audio_in_ioctl(struct file *file,
ads->in_divs = divs_11025;
ads->in_divs_len = ARRAY_SIZE(divs_11025);
break;
case 16000:
ads->in_divs = divs_16000;
ads->in_divs_len = ARRAY_SIZE(divs_16000);
break;
case 22050:
ads->in_divs = divs_22050;
ads->in_divs_len = ARRAY_SIZE(divs_22050);