From: qjb Date: Fri, 21 Mar 2014 13:52:33 +0000 (+0800) Subject: rk32 sound rt3224 : playback support X-Git-Tag: firefly_0821_release~5913 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=648aa9a55d0ad676dc1d7166c73282c5e062f883;p=firefly-linux-kernel-4.4.55.git rk32 sound rt3224 : playback support --- diff --git a/arch/arm/boot/dts/rk3288-tb.dts b/arch/arm/boot/dts/rk3288-tb.dts index ce73edb78c83..37d08b5fde86 100755 --- a/arch/arm/boot/dts/rk3288-tb.dts +++ b/arch/arm/boot/dts/rk3288-tb.dts @@ -136,6 +136,16 @@ //bitclock-master; //frame-master; }; + dai1 { + audio-codec = <&rt3261>; + i2s-controller = <&i2s>; + format = "i2s"; + //continuous-clock; + //bitclock-inversion; + //frame-inversion; + //bitclock-master; + //frame-master; + }; }; }; @@ -294,7 +304,7 @@ rt3261: rt3261@1c { compatible = "rt3261"; reg = <0x1c>; - codec-en-gpio = <0>;//sdk default high level + // codec-en-gpio = <0>;//sdk default high level spk-num= <2>; modem-input-mode = <1>; lout-to-modem_mode = <1>; diff --git a/arch/arm/configs/rockchip_defconfig b/arch/arm/configs/rockchip_defconfig index ead5dc04d49d..684dee66fec1 100755 --- a/arch/arm/configs/rockchip_defconfig +++ b/arch/arm/configs/rockchip_defconfig @@ -370,6 +370,7 @@ CONFIG_SND_USB_AUDIO=y CONFIG_SND_SOC=y CONFIG_SND_RK_SOC=y CONFIG_SND_RK_SOC_HDMI_I2S=y +CONFIG_SND_RK_SOC_RT3224=y CONFIG_HID_BATTERY_STRENGTH=y CONFIG_HIDRAW=y CONFIG_UHID=y diff --git a/sound/soc/codecs/rt3261.h b/sound/soc/codecs/rt3261.h index a462a7f56a3f..589199cee1b0 100755 --- a/sound/soc/codecs/rt3261.h +++ b/sound/soc/codecs/rt3261.h @@ -2151,7 +2151,7 @@ struct rt3261_priv { bool dsp_play_pass; bool dsp_rec_pass; - unsigned int codec_en_gpio; + int codec_en_gpio; unsigned int modem_is_open; unsigned int spk_num; diff --git a/sound/soc/rockchip/rk30_i2s.c b/sound/soc/rockchip/rk30_i2s.c index cdf195949afa..08d7df0e78f4 100755 --- a/sound/soc/rockchip/rk30_i2s.c +++ b/sound/soc/rockchip/rk30_i2s.c @@ -540,6 +540,7 @@ static int rockchip_i2s_probe(struct platform_device *pdev) ret = PTR_ERR(i2s->i2s_clk); goto err; } + clk_set_rate(i2s->i2s_clk, 12288000); clk_set_rate(i2s->i2s_clk, 11289600); clk_prepare_enable(i2s->i2s_clk); @@ -547,6 +548,7 @@ static int rockchip_i2s_probe(struct platform_device *pdev) if(IS_ERR(i2s->i2s_mclk) ) { printk("This platfrom have not i2s_mclk,no need to set i2s_mclk.\n"); }else{ + clk_set_rate(i2s->i2s_mclk, 12288000); clk_set_rate(i2s->i2s_mclk, 11289600); clk_prepare_enable(i2s->i2s_mclk); }