rk32 sound rt3224 : playback support

This commit is contained in:
qjb
2014-03-21 21:52:33 +08:00
parent 739d8fd834
commit 648aa9a55d
4 changed files with 15 additions and 2 deletions

View File

@@ -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>;

View File

@@ -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

View File

@@ -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;

View File

@@ -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);
}