//{RT5631_STEREO_DAC_VOL_1 , 0x004C},
{RT5631_ADC_REC_MIXER , 0xb0f0},//Record Mixer source from Mic1 by default
{RT5631_ADC_CTRL_1 , 0x0006},//STEREO ADC CONTROL 1
- {RT5631_MIC_CTRL_2 , 0x6600},//0x8800},//0x5500}, //Mic1/Mic2 boost 40DB by default
+ {RT5631_MIC_CTRL_2 , 0x4400},//0x8800},//0x6600}, //Mic1/Mic2 boost 40DB by default
{RT5631_PWR_MANAG_ADD1 , 0x93e0},
#if RT5631_ALC_ADC_FUNC_ENA
break;
case SND_SOC_BIAS_STANDBY:
- rt5631_write_mask(codec, RT5631_PWR_MANAG_ADD2, 0,
- PWR_MICBIAS1_VOL | PWR_MICBIAS2_VOL);
+ // rt5631_write_mask(codec, RT5631_PWR_MANAG_ADD2, 0,
+ // PWR_MICBIAS1_VOL | PWR_MICBIAS2_VOL);
+ printk("standby rt5631\n");
+ rt5631_write(codec, RT5631_PWR_MANAG_ADD1, 0x0000);
+ rt5631_write(codec, RT5631_PWR_MANAG_ADD2, 0x0000);
+ rt5631_write(codec, RT5631_PWR_MANAG_ADD3, 0x0000);
+ rt5631_write(codec, RT5631_PWR_MANAG_ADD4, 0x0000);
break;
case SND_SOC_BIAS_OFF:
struct rt5631_priv *rt5631 = snd_soc_codec_get_drvdata(codec);
unsigned int val;
int ret;
-
- DBG("%s..............\n", __func__);
ret = snd_soc_codec_set_cache_io(codec, 8, 16, SND_SOC_I2C);
if (ret != 0) {
dev_err(codec->dev, "Failed to set cache I/O: %d\n", ret);
return;
if (!substream->runtime)
return;
+ switch(result)
+ {
+ case RK29_RES_OK:
+ DBG("::%s----%d RK29_RES_OK\n",__FUNCTION__,__LINE__);
+ break;
+ case RK29_RES_ERR:
+ DBG("::%s----%d RK29_RES_ERR\n",__FUNCTION__,__LINE__);
+ break;
+ case RK29_RES_ABORT:
+ DBG("Enter::%s----%d RK29_RES_ABORT \n",__FUNCTION__,__LINE__);
+ return;
+ }
prtd = substream->runtime->private_data;
+ if(!(prtd->state & ST_RUNNING))
+ return;
DBG("Enter::%s----%d, substream=%p, prtd=%p\n",__FUNCTION__,__LINE__, substream, prtd);
if (substream){
snd_pcm_period_elapsed(substream);
.stream_name = "RT5631 PCM",
.codec_name = "RT5631.0-001a",
.platform_name = "rockchip-audio",
+#if defined(CONFIG_SND_RK29_SOC_I2S_8CH)
.cpu_dai_name = "rk29_i2s.0",
+#elif defined(CONFIG_SND_RK29_SOC_I2S_2CH)
+ .cpu_dai_name = "rk29_i2s.1",
+#else
+ .cpu_dai_name = "rk29_i2s.2",
+#endif
.codec_dai_name = "RT5631 HiFi",
.init = rk29_rt5631_init,
.ops = &rk29_ops,