本文整理汇总了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;
}
示例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);
}
示例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);
}
示例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);
}
示例5: bf5xx_pcm_hw_free
static int bf5xx_pcm_hw_free(struct snd_pcm_substream *substream)
{
snd_pcm_lib_free_pages(substream);
return 0;
}
示例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);
}
示例7: snd_ice1712_hw_free
static int snd_ice1712_hw_free(struct snd_pcm_substream *substream)
{
return snd_pcm_lib_free_pages(substream);
}
示例8: substream_free_pages
static int substream_free_pages(struct azx *chip,
struct snd_pcm_substream *substream)
{
return snd_pcm_lib_free_pages(substream);
}
示例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);
}
示例10: nuc900_dma_hw_free
static int nuc900_dma_hw_free(struct snd_pcm_substream *substream)
{
snd_pcm_lib_free_pages(substream);
return 0;
}
示例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);
}
示例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);
}
示例13: minivosc_hw_free
static int minivosc_hw_free(struct snd_pcm_substream *ss)
{
dbg("%s", __func__);
return snd_pcm_lib_free_pages(ss);
}
示例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);
}
示例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 =
{