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


C++ snd_pcm_lib_free_pages函数代码示例

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


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

示例1: lx_pcm_hw_free

static int lx_pcm_hw_free(struct snd_pcm_substream *substream)
{
	struct lx6464es *chip = snd_pcm_substream_chip(substream);
	int err = 0;
	int is_capture = (substream->stream == SNDRV_PCM_STREAM_CAPTURE);

	dev_dbg(chip->card->dev, "->lx_pcm_hw_free\n");
	mutex_lock(&chip->setup_mutex);

	if (chip->hardware_running[is_capture]) {
		err = lx_hardware_stop(chip, substream);
		if (err < 0) {
			dev_err(chip->card->dev, "failed to stop hardware. "
				   "Error code %d\n", err);
			goto exit;
		}

		err = lx_hardware_close(chip, substream);
		if (err < 0) {
			dev_err(chip->card->dev, "failed to close hardware. "
				   "Error code %d\n", err);
			goto exit;
		}

		chip->hardware_running[is_capture] = 0;
	}

	err = snd_pcm_lib_free_pages(substream);

	if (is_capture)
		chip->capture_stream.stream = 0;
	else
		chip->playback_stream.stream = 0;

exit:
	mutex_unlock(&chip->setup_mutex);
	return err;
}
开发者ID:AkyZero,项目名称:wrapfs-latest,代码行数:38,代码来源:lx6464es.c

示例2: snd_vortex_pcm_hw_free

/* hw_free callback */
static int snd_vortex_pcm_hw_free(struct snd_pcm_substream *substream)
{
	vortex_t *chip = snd_pcm_substream_chip(substream);
	stream_t *stream = (stream_t *) (substream->runtime->private_data);

	spin_lock_irq(&chip->lock);
	// Delete audio routes.
	if (VORTEX_PCM_TYPE(substream->pcm) != VORTEX_PCM_WT) {
		if (stream != NULL)
			vortex_adb_allocroute(chip, stream->dma,
					      stream->nr_ch, stream->dir,
					      stream->type);
	}
#ifndef CHIP_AU8810
	else {
		if (stream != NULL)
			vortex_wt_allocroute(chip, stream->dma, 0);
	}
#endif
	substream->runtime->private_data = NULL;
	spin_unlock_irq(&chip->lock);

	return snd_pcm_lib_free_pages(substream);
}
开发者ID:rrowicki,项目名称:Chrono_Kernel-1,代码行数:25,代码来源:au88x0_pcm.c

示例3: skl_substream_free_pages

static int skl_substream_free_pages(struct hdac_bus *bus,
				struct snd_pcm_substream *substream)
{
	return snd_pcm_lib_free_pages(substream);
}
开发者ID:AK101111,项目名称:linux,代码行数:5,代码来源:skl-pcm.c

示例4: snd_als300_pcm_hw_free

static int snd_als300_pcm_hw_free(struct snd_pcm_substream *substream)
{
	return snd_pcm_lib_free_pages(substream);
}
开发者ID:AlexShiLucky,项目名称:linux,代码行数:4,代码来源:als300.c

示例5: bf5xx_pcm_hw_free

static int bf5xx_pcm_hw_free(struct snd_pcm_substream *substream)
{
	snd_pcm_lib_free_pages(substream);

	return 0;
}
开发者ID:AnadoluPanteri,项目名称:kernel-plus-harmattan,代码行数:6,代码来源:bf5xx-i2s-pcm.c

示例6: snd_p16v_pcm_hw_free_capture

/* hw_free callback */
static int snd_p16v_pcm_hw_free_capture(struct snd_pcm_substream *substream)
{
	return snd_pcm_lib_free_pages(substream);
}
开发者ID:ReneNyffenegger,项目名称:linux,代码行数:5,代码来源:p16v.c

示例7: snd_ice1712_hw_free

static int snd_ice1712_hw_free(struct snd_pcm_substream *substream)
{
	return snd_pcm_lib_free_pages(substream);
}
开发者ID:goooooodman,项目名称:linux,代码行数:4,代码来源:ice1712.c

示例8: substream_free_pages

static int substream_free_pages(struct azx *chip,
				struct snd_pcm_substream *substream)
{
	return snd_pcm_lib_free_pages(substream);
}
开发者ID:513855417,项目名称:linux,代码行数:5,代码来源:hda_tegra.c

示例9: sst_platform_pcm_hw_free

static int sst_platform_pcm_hw_free(struct snd_pcm_substream *substream)
{
	return snd_pcm_lib_free_pages(substream);
}
开发者ID:33d,项目名称:linux-2.6.21-hh20,代码行数:4,代码来源:sst_platform.c

示例10: nuc900_dma_hw_free

static int nuc900_dma_hw_free(struct snd_pcm_substream *substream)
{
	snd_pcm_lib_free_pages(substream);
	return 0;
}
开发者ID:020gzh,项目名称:linux,代码行数:5,代码来源:nuc900-pcm.c

示例11: snd_intelmad_hw_free

static int snd_intelmad_hw_free(struct snd_pcm_substream *substream)
{
	pr_debug("snd_intelmad_hw_free called\n");
	return snd_pcm_lib_free_pages(substream);
}
开发者ID:119-org,项目名称:hi3518-osdrv,代码行数:5,代码来源:intelmid.c

示例12: snd_bcm2835_pcm_hw_free

/* hw_free callback */
static int snd_bcm2835_pcm_hw_free(struct snd_pcm_substream *substream)
{
	audio_info(" .. IN\n");
	return snd_pcm_lib_free_pages(substream);
}
开发者ID:AshishNamdev,项目名称:linux,代码行数:6,代码来源:bcm2835-pcm.c

示例13: minivosc_hw_free

static int minivosc_hw_free(struct snd_pcm_substream *ss)
{
	dbg("%s", __func__);
	return snd_pcm_lib_free_pages(ss);
}
开发者ID:bluegum,项目名称:maxivosc,代码行数:5,代码来源:minivosc.c

示例14: mtk_uldlloopback_pcm_hw_free

static int mtk_uldlloopback_pcm_hw_free(struct snd_pcm_substream *substream)
{
    PRINTK_AUDDRV("mtk_uldlloopback_pcm_hw_free \n");
    return snd_pcm_lib_free_pages(substream);
}
开发者ID:Jlsmily,项目名称:android_kernel_meilan2,代码行数:5,代码来源:mt_soc_pcm_uldlloopback.c

示例15: snd_mixart_kill_ref_pipe


//.........这里部分代码省略.........
	if(err < 0) {
		mutex_unlock(&mgr->setup_mutex);
		return err;
	}

	/* allocate buffer */
	err = snd_pcm_lib_malloc_pages(subs, params_buffer_bytes(hw));

	if (err > 0) {
		struct mixart_bufferinfo *bufferinfo;
		int i = (chip->chip_idx * MIXART_MAX_STREAM_PER_CARD) + (stream->pcm_number * (MIXART_PLAYBACK_STREAMS+MIXART_CAPTURE_STREAMS)) + subs->number;
		if( subs->stream == SNDRV_PCM_STREAM_CAPTURE ) {
			i += MIXART_PLAYBACK_STREAMS; /* in array capture is behind playback */
		}
		
		bufferinfo = (struct mixart_bufferinfo *)chip->mgr->bufferinfo.area;
		bufferinfo[i].buffer_address = subs->runtime->dma_addr;
		bufferinfo[i].available_length = subs->runtime->dma_bytes;
		/* bufferinfo[i].buffer_id  is already defined */

		snd_printdd("snd_mixart_hw_params(pcm %d) : dma_addr(%x) dma_bytes(%x) subs-number(%d)\n", i,
				bufferinfo[i].buffer_address,
				bufferinfo[i].available_length,
				subs->number);
	}
	mutex_unlock(&mgr->setup_mutex);

	return err;
}

static int snd_mixart_hw_free(struct snd_pcm_substream *subs)
{
	struct snd_mixart *chip = snd_pcm_substream_chip(subs);
	snd_pcm_lib_free_pages(subs);
	mixart_sync_nonblock_events(chip->mgr);
	return 0;
}



/*
 *  TODO CONFIGURATION SPACE for all pcms, mono pcm must update channels_max
 */
static struct snd_pcm_hardware snd_mixart_analog_caps =
{
	.info             = ( SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
			      SNDRV_PCM_INFO_MMAP_VALID |
			      SNDRV_PCM_INFO_PAUSE),
	.formats	  = ( SNDRV_PCM_FMTBIT_U8 |
			      SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S16_BE |
			      SNDRV_PCM_FMTBIT_S24_3LE | SNDRV_PCM_FMTBIT_S24_3BE |
			      SNDRV_PCM_FMTBIT_FLOAT_LE | SNDRV_PCM_FMTBIT_FLOAT_BE ),
	.rates            = SNDRV_PCM_RATE_CONTINUOUS | SNDRV_PCM_RATE_8000_48000,
	.rate_min         = 8000,
	.rate_max         = 48000,
	.channels_min     = 1,
	.channels_max     = 2,
	.buffer_bytes_max = (32*1024),
	.period_bytes_min = 256,                  /* 256 frames U8 mono*/
	.period_bytes_max = (16*1024),
	.periods_min      = 2,
	.periods_max      = (32*1024/256),
};

static struct snd_pcm_hardware snd_mixart_digital_caps =
{
开发者ID:458941968,项目名称:mini2440-kernel-2.6.29,代码行数:67,代码来源:mixart.c


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