From 2f18c497f006543d8315b0d1f63f616bfe9aaa10 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=E9=82=B1=E5=BB=BA=E6=96=8C?= Date: Fri, 21 Dec 2012 17:49:18 +0800 Subject: [PATCH] =?utf8?q?rk3066=20i2s=20:=20add=20I2S0=20channels=20choos?= =?utf8?q?e=EF=BC=8Cdefault=20using=20two=20channels?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- sound/soc/rk29/Kconfig | 12 ++++++++++++ sound/soc/rk29/rk30_i2s.c | 8 +++++--- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/sound/soc/rk29/Kconfig b/sound/soc/rk29/Kconfig index 4bbf2e034aac..0f9602f08ffd 100755 --- a/sound/soc/rk29/Kconfig +++ b/sound/soc/rk29/Kconfig @@ -15,6 +15,18 @@ config SND_RK29_SOC_I2S_8CH depends on SND_RK29_SOC_I2S && !ARCH_RK3066B help This supports the use of the 8 Channel I2S interface on rk29 processors. + +if SND_RK29_SOC_I2S_8CH +choice + bool "Set I2S0 using the number of channels" + default SND_I2SO_USE_DOUBLE_CHANNELS + config SND_I2SO_USE_EIGHT_CHANNELS + tristate "I2S0 use 8 channels" + + config SND_I2SO_USE_DOUBLE_CHANNELS + tristate "I2S0 use 2 channels" +endchoice +endif config SND_RK29_SOC_I2S_2CH bool "Soc RK29 I2S 2 Channel support(I2S1)" diff --git a/sound/soc/rk29/rk30_i2s.c b/sound/soc/rk29/rk30_i2s.c index 9a2517de26e6..64e6b2c0c524 100755 --- a/sound/soc/rk29/rk30_i2s.c +++ b/sound/soc/rk29/rk30_i2s.c @@ -507,9 +507,11 @@ static int rockchip_i2s_dai_probe(struct snd_soc_dai *dai) rk30_mux_api_set(GPIO0B2_I2S8CHLRCKRX_NAME, GPIO0B_I2S_8CH_LRCK_RX); rk30_mux_api_set(GPIO0B3_I2S8CHLRCKTX_NAME, GPIO0B_I2S_8CH_LRCK_TX); rk30_mux_api_set(GPIO0B4_I2S8CHSDO0_NAME, GPIO0B_I2S_8CH_SDO0); - //rk30_mux_api_set(GPIO0B5_I2S8CHSDO1_NAME, GPIO0B_I2S_8CH_SDO1); - //rk30_mux_api_set(GPIO0B6_I2S8CHSDO2_NAME, GPIO0B_I2S_8CH_SDO2); - //rk30_mux_api_set(GPIO0B7_I2S8CHSDO3_NAME, GPIO0B_I2S_8CH_SDO3); + #ifdef SND_I2SO_USE_EIGHT_CHANNELS + rk30_mux_api_set(GPIO0B5_I2S8CHSDO1_NAME, GPIO0B_I2S_8CH_SDO1); + rk30_mux_api_set(GPIO0B6_I2S8CHSDO2_NAME, GPIO0B_I2S_8CH_SDO2); + rk30_mux_api_set(GPIO0B7_I2S8CHSDO3_NAME, GPIO0B_I2S_8CH_SDO3); + #endif break; case 1: rk30_mux_api_set(GPIO0C0_I2S12CHCLK_NAME, GPIO0C_I2S1_2CH_CLK); -- 2.34.1