bool i2s_rx_status;
};
+#define I2S_CLR_ERROR_COUNT 10// check I2S_CLR reg
+
#if defined (CONFIG_RK_HDMI) && defined (CONFIG_SND_RK_SOC_HDMI_I2S)
extern int hdmi_get_hotplug(void);
#else
{
u32 opr, xfer, clr;
unsigned long flags;
- int is_need_delay = false;
+ bool is_need_delay = false;
+ int clr_error_count = I2S_CLR_ERROR_COUNT;
spin_lock_irqsave(&lock, flags);
spin_unlock_irqrestore(&lock, flags);
- if (is_need_delay)
- udelay(1);
+ if (is_need_delay){
+ while(readl(&(pheadi2s->I2S_CLR)) && clr_error_count){
+ udelay(1);
+ clr_error_count --;
+ if(clr_error_count == 0)
+ printk("%s: i2s clr reg warning =%d",__FUNCTION__,readl(&(pheadi2s->I2S_CLR)));
+ }
+ }
}
static void rockchip_snd_rxctrl(struct rk30_i2s_info *i2s, int on)
{
u32 opr, xfer, clr;
unsigned long flags;
- int is_need_delay = false;
+ bool is_need_delay = false;
+ int clr_error_count = I2S_CLR_ERROR_COUNT;
spin_lock_irqsave(&lock, flags);
}
spin_unlock_irqrestore(&lock, flags);
-
- if (is_need_delay)
- udelay(1);
+#ifdef CONFIG_SND_SOC_RT5631
+//bard 7-16 s
+ schedule_delayed_work(&rt5631_delay_cap,HZ/4);
+//bard 7-16 e
+#endif
+ if (is_need_delay){
+ while(readl(&(pheadi2s->I2S_CLR)) && clr_error_count){
+ udelay(1);
+ clr_error_count --;
+ if(clr_error_count == 0)
+ printk("%s: i2s clr reg warning =%d",__FUNCTION__,readl(&(pheadi2s->I2S_CLR)));
+ }
+ }
}
/*
break;
}
+// writel((16<<24) |(16<<18)|(16<<12)|(16<<6)|16, &(pheadi2s->I2S_FIFOLR));
dmarc = readl(&(pheadi2s->I2S_DMACR));
if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)