当前位置: 首页>>代码示例>>C++>>正文


C++ s3cdbg函数代码示例

本文整理汇总了C++中s3cdbg函数的典型用法代码示例。如果您正苦于以下问题:C++ s3cdbg函数的具体用法?C++ s3cdbg怎么用?C++ s3cdbg使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了s3cdbg函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: s3c_i2s_v50_set_fmt

/*
 * Set S3C24xx I2S DAI format
 */
static int s3c_i2s_v50_set_fmt(struct snd_soc_dai *cpu_dai,
		unsigned int fmt)
{
	u32 iismod;

	s3cdbg("Entered %s: fmt = %d\n", __FUNCTION__, fmt);

	iismod = readl(s5pc1xx_i2s.regs + S3C64XX_IIS0MOD);

	return 0;

}
开发者ID:ZhizhouTian,项目名称:s3c-linux,代码行数:15,代码来源:s5pc100-i2s-v50.c

示例2: s5p_pcm_trigger

static int s5p_pcm_trigger(struct snd_pcm_substream *substream, int cmd)
{
	struct s5p_runtime_data *prtd = substream->runtime->private_data;
	int ret = 0;

	s3cdbg("Entered %s\n", __FUNCTION__);

	spin_lock(&prtd->lock);

	switch (cmd) {
	case SNDRV_PCM_TRIGGER_RESUME:
		if(s3c_pcm_pdat.lp_mode){
			prtd->state |= ST_RUNNING;
			s3ci2s_func->dma_ctrl(S3C_I2SDMA_RESUME);
			break;
		}
		s5p_pcm_enqueue(substream);
	case SNDRV_PCM_TRIGGER_START:
	case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
		prtd->state |= ST_RUNNING;
		if(s3c_pcm_pdat.lp_mode)
		   s3ci2s_func->dma_ctrl(S3C_I2SDMA_START);
		else
		   s3c2410_dma_ctrl(prtd->params->channel, S3C2410_DMAOP_START);
		break;

	case SNDRV_PCM_TRIGGER_SUSPEND:
		if(s3c_pcm_pdat.lp_mode){
		   prtd->state &= ~ST_RUNNING;
		   s3ci2s_func->dma_ctrl(S3C_I2SDMA_SUSPEND);
		   break;
		}
		if(prtd->dma_loaded)
		   prtd->dma_loaded--; /* we may never get buffdone callback */
	case SNDRV_PCM_TRIGGER_STOP:
	case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
		prtd->state &= ~ST_RUNNING;
		if(s3c_pcm_pdat.lp_mode)
		   s3ci2s_func->dma_ctrl(S3C_I2SDMA_STOP);
		else
		   s3c2410_dma_ctrl(prtd->params->channel, S3C2410_DMAOP_STOP);
		break;

	default:
		ret = -EINVAL;
		break;
	}

	spin_unlock(&prtd->lock);

	return ret;
}
开发者ID:rubensollie,项目名称:Eclair-Kernel,代码行数:52,代码来源:s3c-pcm-lp.c

示例3: s5pc1xx_snd_rxctrl

static void s5pc1xx_snd_rxctrl(int on)
{
	u32 iisfcon;
	u32 iiscon;
	u32 iismod;

	s3cdbg("Entered %s: on = %d\n", __FUNCTION__, on);

	iisfcon = readl(s5pc1xx_i2s.regs + S3C64XX_IIS0FIC);
	iiscon  = readl(s5pc1xx_i2s.regs + S3C64XX_IIS0CON);
	iismod  = readl(s5pc1xx_i2s.regs + S3C64XX_IIS0MOD);

	s3cdbg("r: IISCON: %x IISMOD: %x IISFCON: %x\n", iiscon, iismod, iisfcon);

	if (on) {
		iiscon |= S3C64XX_IIS0CON_I2SACTIVE;

		writel(iismod,  s5pc1xx_i2s.regs + S3C64XX_IIS0MOD);
		writel(iisfcon, s5pc1xx_i2s.regs + S3C64XX_IIS0FIC);
		writel(iiscon,  s5pc1xx_i2s.regs + S3C64XX_IIS0CON);
	} else {
		/* note, we have to disable the FIFOs otherwise bad things
		 * seem to happen when the DMA stops. According to the
		 * Samsung supplied kernel, this should allow the DMA
		 * engine and FIFOs to reset. If this isn't allowed, the
		 * DMA engine will simply freeze randomly.
		 */

		iiscon &= ~S3C64XX_IIS0CON_I2SACTIVE;
		iismod &= ~S3C64XX_IIS0MOD_RXMODE;

		writel(iisfcon, s5pc1xx_i2s.regs + S3C64XX_IIS0FIC);
		writel(iiscon,  s5pc1xx_i2s.regs + S3C64XX_IIS0CON);
		writel(iismod,  s5pc1xx_i2s.regs + S3C64XX_IIS0MOD);

	}
	s3cdbg("w: IISCON: %x IISMOD: %x IISFCON: %x\n", iiscon, iismod, iisfcon);
}
开发者ID:ZhizhouTian,项目名称:s3c-linux,代码行数:38,代码来源:s5pc100-i2s-v50.c

示例4: spdif_remove

/* power down chip */
static int spdif_remove(struct platform_device *pdev)
{
	
	struct snd_soc_device *socdev = platform_get_drvdata(pdev);
	struct snd_soc_codec *codec = socdev->codec;

	s3cdbg("Entered %s\n", __FUNCTION__);
	
	snd_soc_free_pcms(socdev);
	//snd_soc_dapm_free(socdev);
	kfree(codec->private_data);
	kfree(codec);
	return 0;
}
开发者ID:mhgazz,项目名称:Android-Eclair-Kernel-Source-v2.6.29.6,代码行数:15,代码来源:smdkc110_spdif.c

示例5: s3c_i2s_probe

static int s3c_i2s_probe(struct platform_device *pdev)
{
	s3cdbg("Entered %s\n", __FUNCTION__);

#if defined CONFIG_SND_SOC_I2S_V32
	s3c24xx_i2s.regs = ioremap(S3C2450_PA_IIS_1, 0x100);
	if (s3c24xx_i2s.regs == NULL)
		return -ENXIO;
#elif defined CONFIG_SND_SOC_I2S_V40
	s3c24xx_i2s.regs = ioremap(S3C2410_PA_IIS, 0x100);
	if (s3c24xx_i2s.regs == NULL)
		return -ENXIO;
#endif

	s3c24xx_i2s.iis_clk=clk_get(&pdev->dev, "iis");
	if (s3c24xx_i2s.iis_clk == NULL) {
		s3cdbg("failed to get iis_clock\n");
		return -ENODEV;
	}
	clk_enable(s3c24xx_i2s.iis_clk);

	return 0;
}
开发者ID:maliyu,项目名称:SOM2416,代码行数:23,代码来源:s3c2450-i2s.c

示例6: s5p_pcm_enqueue

/* s5p_pcm_enqueue
 *
 * place a dma buffer onto the queue for the dma system
 * to handle.
 */
static void s5p_pcm_enqueue(struct snd_pcm_substream *substream)
{
	struct s5p_runtime_data *prtd = substream->runtime->private_data;
	dma_addr_t pos = prtd->dma_pos;
	unsigned long len = prtd->dma_period;
	int ret;

	s3cdbg("Entered %s\n", __FUNCTION__);

	/* By Jung */

	s3cdbg("dma_loaded: %d\n",prtd->dma_loaded);

	if ((pos + len) > prtd->dma_end) {
		len  = prtd->dma_end - pos;
		s3cdbg(KERN_DEBUG "%s: corrected dma len %ld\n", __FUNCTION__, len);
	}

	s3cdbg("enqing at %x, %d bytes\n", pos, len);
	ret = s3c2410_dma_enqueue(prtd->params->channel, substream, pos, len);

	prtd->dma_pos = pos;
}
开发者ID:rubensollie,项目名称:Eclair-Kernel,代码行数:28,代码来源:s3c-pcm-lp.c

示例7: s3c24xx_pcm_close

static int s3c24xx_pcm_close(struct snd_pcm_substream *substream)
{
	struct snd_pcm_runtime *runtime = substream->runtime;
	struct s3c24xx_runtime_data *prtd = runtime->private_data;

	s3cdbg("Entered %s, prtd = %p\n", __FUNCTION__, prtd);

	if (prtd)
		kfree(prtd);
	else
		printk("s3c24xx_pcm_close called with prtd == NULL\n");

	return 0;
}
开发者ID:argentinos,项目名称:o2droid,代码行数:14,代码来源:s3c-pcm.c

示例8: s3c24xx_pcm_pointer

static snd_pcm_uframes_t 
	s3c24xx_pcm_pointer(struct snd_pcm_substream *substream)
{
	struct snd_pcm_runtime *runtime = substream->runtime;
	struct s3c24xx_runtime_data *prtd = runtime->private_data;
	unsigned long res;

	s3cdbg("Entered %s\n", __FUNCTION__);

	spin_lock(&prtd->lock);

#if defined (CONFIG_CPU_S3C6400) || defined (CONFIG_CPU_S3C6410)
	if (substream->stream == SNDRV_PCM_STREAM_CAPTURE)  
		res = prtd->dma_pos - prtd->dma_start;
	else 
		res = prtd->dma_pos - prtd->dma_start;	
#else
	if (substream->stream == SNDRV_PCM_STREAM_CAPTURE)
		res = dst - prtd->dma_start;
	else
		res = src - prtd->dma_start;
#endif

	spin_unlock(&prtd->lock);

	/* we seem to be getting the odd error from the pcm library due
	 * to out-of-bounds pointers. this is maybe due to the dma engine
	 * not having loaded the new values for the channel before being
	 * callled... (todo - fix )
	 */
	
	/* Playback mode */	
	if(substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {	
		if (res >= (snd_pcm_lib_buffer_bytes(substream) * ANDROID_BUF_NUM)) {
			if (res == (snd_pcm_lib_buffer_bytes(substream) * ANDROID_BUF_NUM))
				res = 0;
		}
	}

	/* Capture mode */	
	else {	
		if (res >= (snd_pcm_lib_buffer_bytes(substream))) {
			if (res == (snd_pcm_lib_buffer_bytes(substream)))
				res = 0;
		}
	}

	return bytes_to_frames(substream->runtime, res);
}
开发者ID:mik9,项目名称:i5700-leshak-kernel,代码行数:49,代码来源:s3c-pcm-sol.c

示例9: s5p_pcm_hw_free_nm

static int s5p_pcm_hw_free_nm(struct snd_pcm_substream *substream)
{
	struct s5p_runtime_data *prtd = substream->runtime->private_data;

	s3cdbg("Entered %s\n", __FUNCTION__);

	/* TODO - do we need to ensure DMA flushed */
	snd_pcm_set_runtime_buffer(substream, NULL);

	if (prtd->params) {
		s3c2410_dma_free(prtd->params->channel, prtd->params->client);
		prtd->params = NULL;
	}

	return 0;
}
开发者ID:rubensollie,项目名称:Eclair-Kernel,代码行数:16,代码来源:s3c-pcm-lp.c

示例10: adau1761_dapm_mic_event

static int adau1761_dapm_mic_event(struct snd_soc_dapm_widget *w,
	struct snd_kcontrol *k, int event)
{
	struct snd_soc_codec	*codec = w->codec;
	struct adau1761_priv	*cpriv = codec->private_data;
//	adau1761_platform_t	*pdata = cpriv->pdata;
	s3cdbg("%s(%d) event=%d\n", __func__, __LINE__, event);
	if (SND_SOC_DAPM_EVENT_ON(event)) {
//		pdata->mic_stdby_n( 1 );
	} else if (SND_SOC_DAPM_EVENT_OFF(event)) {
//		pdata->mic_stdby_n( 0 );
	} else {
		printk("%s(%d): Unknown event #%d\n", __func__, __LINE__, event);
	}
	return 0;
}
开发者ID:kzlin129,项目名称:tt-gpl,代码行数:16,代码来源:cordoba_adau1761.c

示例11: s3c24xx_pcm_preallocate_dma_buffer

static int s3c24xx_pcm_preallocate_dma_buffer(struct snd_pcm *pcm, int stream)
{
	struct snd_pcm_substream *substream = pcm->streams[stream].substream;
	struct snd_dma_buffer *buf = &substream->dma_buffer;
	size_t size = s3c24xx_pcm_hardware.buffer_bytes_max;

	s3cdbg("Entered %s\n", __FUNCTION__);

	buf->dev.type = SNDRV_DMA_TYPE_DEV;
	buf->dev.dev = pcm->card->dev;
	buf->private_data = NULL;
	buf->area = dma_alloc_writecombine(pcm->card->dev, size,
					   &buf->addr, GFP_KERNEL);
	if (!buf->area)
		return -ENOMEM;
	buf->bytes = size;
	return 0;
}
开发者ID:mik9,项目名称:i5700-leshak-kernel,代码行数:18,代码来源:s3c-pcm-sol.c

示例12: s3c24xx_snd_lrsync

/*
 * Wait for the LR signal to allow synchronisation to the L/R clock
 * from the codec. May only be needed for slave mode.
 */
static int s3c24xx_snd_lrsync(void)
{
	u32 iiscon;
	unsigned long timeout = jiffies + msecs_to_jiffies(5);

	s3cdbg("Entered %s\n", __FUNCTION__);

	while (1) {
		iiscon = readl(s3c24xx_i2s.regs + S3C64XX_IIS0CON);
		if (iiscon & S3C64XX_IISCON_LRINDEX)
			break;

		if (timeout < jiffies)
			return -ETIMEDOUT;
	}

	return 0;
}
开发者ID:Astinj,项目名称:I5700-kernel-2.6.32.9,代码行数:22,代码来源:s3c6410-i2s-v32.c

示例13: s5p_pcm_mmap

static int s5p_pcm_mmap(struct snd_pcm_substream *substream,
	struct vm_area_struct *vma)
{
	struct snd_pcm_runtime *runtime = substream->runtime;
	unsigned long size, offset;
	int ret;

	s3cdbg("Entered %s\n", __FUNCTION__);

	if(s3c_pcm_pdat.lp_mode){
		/* From snd_pcm_lib_mmap_iomem */
		vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
		vma->vm_flags |= VM_IO;
		size = vma->vm_end - vma->vm_start;
		offset = vma->vm_pgoff << PAGE_SHIFT;
		ret = io_remap_pfn_range(vma, vma->vm_start,
				(runtime->dma_addr + offset) >> PAGE_SHIFT,
				size, vma->vm_page_prot);
	}else{
开发者ID:rubensollie,项目名称:Eclair-Kernel,代码行数:19,代码来源:s3c-pcm-lp.c

示例14: s3c_i2s_set_fmt

/*
 * Set S3C24xx I2S DAI format
 */
static int s3c_i2s_set_fmt(struct snd_soc_dai *cpu_dai,
		unsigned int fmt)
{
#if 0
	u32 iismod;

	s3cdbg("Entered %s: fmt = %d\n", __FUNCTION__, fmt);

	iismod = readl(s3c24xx_i2s.regs + S3C64XX_IIS0MOD);

	switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
	case SND_SOC_DAIFMT_CBM_CFM:
#if !defined (CONFIG_CPU_S3C6400) && !defined (CONFIG_CPU_S3C6410)
		iismod |= S3C64XX_IISMOD_SLAVE;
#else
		iismod |= S3C2410_IISMOD_MASTER;
#endif
		break;
	case SND_SOC_DAIFMT_CBS_CFS:
		break;
	default:
		return -EINVAL;
	}

	switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) {
	case SND_SOC_DAIFMT_LEFT_J:
#if !defined (CONFIG_CPU_S3C6400) && !defined (CONFIG_CPU_S3C6410)
		iismod |= S3C2410_IISMOD_MSB;
#else
		iismod |= S3C_IIS0MOD_MSB;
#endif
		break;
	case SND_SOC_DAIFMT_I2S:
		break;
	default:
		return -EINVAL;
	}

	writel(iismod, s3c24xx_i2s.regs + S3C64XX_IIS0MOD);
#endif
	return 0;

}
开发者ID:Astinj,项目名称:I5700-kernel-2.6.32.9,代码行数:46,代码来源:s3c6410-i2s-v32.c

示例15: s5p_pcm_pointer

static snd_pcm_uframes_t 
	s5p_pcm_pointer(struct snd_pcm_substream *substream)
{
	struct snd_pcm_runtime *runtime = substream->runtime;
	struct s5p_runtime_data *prtd = runtime->private_data;
	unsigned long res;
	dma_addr_t src, dst;

	spin_lock(&prtd->lock);

	if(s3c_pcm_pdat.lp_mode)
	   s3ci2s_func->dma_getpos(&src, &dst);
	
	/* By Jung */
	res = prtd->dma_pos - prtd->dma_start;

	spin_unlock(&prtd->lock);

	s3cdbg("Pointer %x %x\n", src, dst);

	/* we seem to be getting the odd error from the pcm library due
	 * to out-of-bounds pointers. this is maybe due to the dma engine
	 * not having loaded the new values for the channel before being
	 * callled... (todo - fix )
	 */
	
	/* By Jung */
	if(substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
		if (res >= snd_pcm_lib_buffer_bytes(substream) * ANDROID_BUF_NUM) {
			if (res == snd_pcm_lib_buffer_bytes(substream) * ANDROID_BUF_NUM)
				res = 0;
		}
	} else {
		if (res >= snd_pcm_lib_buffer_bytes(substream)) {
			if (res == snd_pcm_lib_buffer_bytes(substream))
				res = 0;
		}
	}

	return bytes_to_frames(substream->runtime, res);
}
开发者ID:rubensollie,项目名称:Eclair-Kernel,代码行数:41,代码来源:s3c-pcm-lp.c


注:本文中的s3cdbg函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。