本文整理汇总了C++中snd_power_change_state函数的典型用法代码示例。如果您正苦于以下问题:C++ snd_power_change_state函数的具体用法?C++ snd_power_change_state怎么用?C++ snd_power_change_state使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了snd_power_change_state函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: loopback_resume
static int loopback_resume(struct device *pdev)
{
struct snd_card *card = dev_get_drvdata(pdev);
snd_power_change_state(card, SNDRV_CTL_POWER_D0);
return 0;
}
开发者ID:3null,项目名称:linux,代码行数:7,代码来源:aloop.c
示例2: oxygen_pci_suspend
int oxygen_pci_suspend(struct pci_dev *pci, pm_message_t state)
{
struct snd_card *card = pci_get_drvdata(pci);
struct oxygen *chip = card->private_data;
unsigned int i, saved_interrupt_mask;
snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
for (i = 0; i < PCM_COUNT; ++i)
if (chip->streams[i])
snd_pcm_suspend(chip->streams[i]);
if (chip->model.suspend)
chip->model.suspend(chip);
spin_lock_irq(&chip->reg_lock);
saved_interrupt_mask = chip->interrupt_mask;
chip->interrupt_mask = 0;
oxygen_write16(chip, OXYGEN_DMA_STATUS, 0);
oxygen_write16(chip, OXYGEN_INTERRUPT_MASK, 0);
spin_unlock_irq(&chip->reg_lock);
synchronize_irq(chip->irq);
flush_scheduled_work();
chip->interrupt_mask = saved_interrupt_mask;
pci_disable_device(pci);
pci_save_state(pci);
pci_set_power_state(pci, pci_choose_state(pci, state));
return 0;
}
开发者ID:458941968,项目名称:mini2440-kernel-2.6.29,代码行数:31,代码来源:oxygen_lib.c
示例3: snd_dummy_resume
static int snd_dummy_resume(struct platform_device *pdev)
{
struct snd_card *card = platform_get_drvdata(pdev);
snd_power_change_state(card, SNDRV_CTL_POWER_D0);
return 0;
}
开发者ID:325116067,项目名称:semc-qsd8x50,代码行数:7,代码来源:dummy.c
示例4: oxygen_pci_resume
int oxygen_pci_resume(struct pci_dev *pci)
{
struct snd_card *card = pci_get_drvdata(pci);
struct oxygen *chip = card->private_data;
unsigned int i;
pci_set_power_state(pci, PCI_D0);
pci_restore_state(pci);
if (pci_enable_device(pci) < 0) {
snd_printk(KERN_ERR "cannot reenable device");
snd_card_disconnect(card);
return -EIO;
}
pci_set_master(pci);
oxygen_write16(chip, OXYGEN_DMA_STATUS, 0);
oxygen_write16(chip, OXYGEN_INTERRUPT_MASK, 0);
for (i = 0; i < OXYGEN_IO_SIZE; ++i)
if (is_bit_set(registers_to_restore, i))
oxygen_write8(chip, i, chip->saved_registers._8[i]);
if (chip->has_ac97_0)
oxygen_restore_ac97(chip, 0);
if (chip->has_ac97_1)
oxygen_restore_ac97(chip, 1);
if (chip->model.resume)
chip->model.resume(chip);
oxygen_write16(chip, OXYGEN_INTERRUPT_MASK, chip->interrupt_mask);
snd_power_change_state(card, SNDRV_CTL_POWER_D0);
return 0;
}
开发者ID:458941968,项目名称:mini2440-kernel-2.6.29,代码行数:33,代码来源:oxygen_lib.c
示例5: snd_cs5535audio_suspend
int snd_cs5535audio_suspend(struct pci_dev *pci, pm_message_t state)
{
struct snd_card *card = pci_get_drvdata(pci);
struct cs5535audio *cs5535au = card->private_data;
int i;
snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
snd_pcm_suspend_all(cs5535au->pcm);
snd_ac97_suspend(cs5535au->ac97);
for (i = 0; i < NUM_CS5535AUDIO_DMAS; i++) {
struct cs5535audio_dma *dma = &cs5535au->dmas[i];
if (dma && dma->substream)
dma->saved_prd = dma->ops->read_prd(cs5535au);
}
/* save important regs, then disable aclink in hw */
snd_cs5535audio_stop_hardware(cs5535au);
if (pci_save_state(pci)) {
printk(KERN_ERR "cs5535audio: pci_save_state failed!\n");
return -EIO;
}
pci_disable_device(pci);
pci_set_power_state(pci, pci_choose_state(pci, state));
return 0;
}
开发者ID:johnny,项目名称:CobraDroidBeta,代码行数:25,代码来源:cs5535audio_pm.c
示例6: snd_emu10k1_suspend
static int snd_emu10k1_suspend(struct device *dev)
{
struct pci_dev *pci = to_pci_dev(dev);
struct snd_card *card = dev_get_drvdata(dev);
struct snd_emu10k1 *emu = card->private_data;
snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
emu->suspend = 1;
snd_pcm_suspend_all(emu->pcm);
snd_pcm_suspend_all(emu->pcm_mic);
snd_pcm_suspend_all(emu->pcm_efx);
snd_pcm_suspend_all(emu->pcm_multi);
snd_pcm_suspend_all(emu->pcm_p16v);
snd_ac97_suspend(emu->ac97);
snd_emu10k1_efx_suspend(emu);
snd_emu10k1_suspend_regs(emu);
if (emu->card_capabilities->ca0151_chip)
snd_p16v_suspend(emu);
snd_emu10k1_done(emu);
pci_disable_device(pci);
pci_save_state(pci);
pci_set_power_state(pci, PCI_D3hot);
return 0;
}
开发者ID:jgroen,项目名称:rtt_tests,代码行数:30,代码来源:emu10k1.c
示例7: snd_emu10k1_resume
static int snd_emu10k1_resume(struct device *dev)
{
struct pci_dev *pci = to_pci_dev(dev);
struct snd_card *card = dev_get_drvdata(dev);
struct snd_emu10k1 *emu = card->private_data;
pci_set_power_state(pci, PCI_D0);
pci_restore_state(pci);
if (pci_enable_device(pci) < 0) {
printk(KERN_ERR "emu10k1: pci_enable_device failed, "
"disabling device\n");
snd_card_disconnect(card);
return -EIO;
}
pci_set_master(pci);
snd_emu10k1_resume_init(emu);
snd_emu10k1_efx_resume(emu);
snd_ac97_resume(emu->ac97);
snd_emu10k1_resume_regs(emu);
if (emu->card_capabilities->ca0151_chip)
snd_p16v_resume(emu);
emu->suspend = 0;
snd_power_change_state(card, SNDRV_CTL_POWER_D0);
return 0;
}
开发者ID:jgroen,项目名称:rtt_tests,代码行数:29,代码来源:emu10k1.c
示例8: nm256_resume
static int nm256_resume(struct pci_dev *pci)
{
struct snd_card *card = pci_get_drvdata(pci);
struct nm256 *chip = card->private_data;
int i;
/* Perform a full reset on the hardware */
pci_restore_state(pci);
pci_enable_device(pci);
snd_nm256_init_chip(chip);
/* restore ac97 */
snd_ac97_resume(chip->ac97);
for (i = 0; i < 2; i++) {
struct nm256_stream *s = &chip->streams[i];
if (s->substream && s->suspended) {
spin_lock_irq(&chip->reg_lock);
snd_nm256_set_format(chip, s, s->substream);
spin_unlock_irq(&chip->reg_lock);
}
}
snd_power_change_state(card, SNDRV_CTL_POWER_D0);
return 0;
}
开发者ID:jameshilliard,项目名称:actiontec_opensrc_mi424wr-rev-e-f_fw-20-10-7-5,代码行数:26,代码来源:nm256.c
示例9: snd_atiixp_suspend
/*
* power management
*/
static int snd_atiixp_suspend(struct device *dev)
{
struct pci_dev *pci = to_pci_dev(dev);
struct snd_card *card = dev_get_drvdata(dev);
struct atiixp *chip = card->private_data;
int i;
snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
for (i = 0; i < NUM_ATI_PCMDEVS; i++)
if (chip->pcmdevs[i]) {
struct atiixp_dma *dma = &chip->dmas[i];
if (dma->substream && dma->running)
dma->saved_curptr = readl(chip->remap_addr +
dma->ops->dt_cur);
snd_pcm_suspend_all(chip->pcmdevs[i]);
}
for (i = 0; i < NUM_ATI_CODECS; i++)
snd_ac97_suspend(chip->ac97[i]);
snd_atiixp_aclink_down(chip);
snd_atiixp_chip_stop(chip);
pci_disable_device(pci);
pci_save_state(pci);
pci_set_power_state(pci, PCI_D3hot);
return 0;
}
开发者ID:3null,项目名称:linux,代码行数:29,代码来源:atiixp.c
示例10: snd_atiixp_resume
static int snd_atiixp_resume(struct device *dev)
{
struct snd_card *card = dev_get_drvdata(dev);
struct atiixp *chip = card->private_data;
int i;
snd_atiixp_aclink_reset(chip);
snd_atiixp_chip_start(chip);
for (i = 0; i < NUM_ATI_CODECS; i++)
snd_ac97_resume(chip->ac97[i]);
for (i = 0; i < NUM_ATI_PCMDEVS; i++)
if (chip->pcmdevs[i]) {
struct atiixp_dma *dma = &chip->dmas[i];
if (dma->substream && dma->suspended) {
dma->ops->enable_dma(chip, 1);
dma->substream->ops->prepare(dma->substream);
writel((u32)dma->desc_buf.addr | ATI_REG_LINKPTR_EN,
chip->remap_addr + dma->ops->llp_offset);
writel(dma->saved_curptr, chip->remap_addr +
dma->ops->dt_cur);
}
}
snd_power_change_state(card, SNDRV_CTL_POWER_D0);
return 0;
}
开发者ID:19Dan01,项目名称:linux,代码行数:28,代码来源:atiixp.c
示例11: snd_ad1816a_pnp_resume
static int snd_ad1816a_pnp_resume(struct pnp_card_link *pcard)
{
struct snd_card *card = pnp_get_card_drvdata(pcard);
snd_ad1816a_resume(card->private_data);
snd_power_change_state(card, SNDRV_CTL_POWER_D0);
return 0;
}
开发者ID:AD5GB,项目名称:kernel_n5_3.10-experimental,代码行数:8,代码来源:ad1816a.c
示例12: snd_ad1816a_pnp_suspend
static int snd_ad1816a_pnp_suspend(struct pnp_card_link *pcard,
pm_message_t state)
{
struct snd_card *card = pnp_get_card_drvdata(pcard);
snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
snd_ad1816a_suspend(card->private_data);
return 0;
}
开发者ID:AD5GB,项目名称:kernel_n5_3.10-experimental,代码行数:9,代码来源:ad1816a.c
示例13: snd_als300_suspend
static int snd_als300_suspend(struct device *dev)
{
struct snd_card *card = dev_get_drvdata(dev);
struct snd_als300 *chip = card->private_data;
snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
snd_ac97_suspend(chip->ac97);
return 0;
}
开发者ID:Anjali05,项目名称:linux,代码行数:9,代码来源:als300.c
示例14: snd_es968_pnp_resume
static int snd_es968_pnp_resume(struct pnp_card_link *pcard)
{
struct snd_card *card = pnp_get_card_drvdata(pcard);
struct snd_es1688 *chip = card->private_data;
snd_es1688_reset(chip);
snd_power_change_state(card, SNDRV_CTL_POWER_D0);
return 0;
}
开发者ID:33d,项目名称:linux-2.6.21-hh20,代码行数:9,代码来源:es1688.c
示例15: snd_ad1848_resume
static int snd_ad1848_resume(struct device *dev, unsigned int n)
{
struct snd_card *card = dev_get_drvdata(dev);
struct snd_ad1848 *chip = card->private_data;
chip->resume(chip);
snd_power_change_state(card, SNDRV_CTL_POWER_D0);
return 0;
}
开发者ID:3sOx,项目名称:asuswrt-merlin,代码行数:9,代码来源:ad1848.c
示例16: snd_ad1848_suspend
static int snd_ad1848_suspend(struct device *dev, unsigned int n, pm_message_t state)
{
struct snd_card *card = dev_get_drvdata(dev);
struct snd_ad1848 *chip = card->private_data;
snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
chip->suspend(chip);
return 0;
}
开发者ID:3sOx,项目名称:asuswrt-merlin,代码行数:9,代码来源:ad1848.c
示例17: snd_sgalaxy_suspend
static int snd_sgalaxy_suspend(struct platform_device *pdev, pm_message_t state)
{
struct snd_card *card = platform_get_drvdata(pdev);
struct snd_ad1848 *chip = card->private_data;
snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
chip->suspend(chip);
return 0;
}
开发者ID:jameshilliard,项目名称:actiontec_opensrc_mi424wr-rev-e-f_fw-20-10-7-5,代码行数:9,代码来源:sgalaxy.c
示例18: snd_dummy_suspend
static int snd_dummy_suspend(struct platform_device *pdev, pm_message_t state)
{
struct snd_card *card = platform_get_drvdata(pdev);
struct snd_dummy *dummy = card->private_data;
snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
snd_pcm_suspend_all(dummy->pcm);
return 0;
}
开发者ID:325116067,项目名称:semc-qsd8x50,代码行数:9,代码来源:dummy.c
示例19: snd_cs4231_suspend
static int snd_cs4231_suspend(struct platform_device *dev, pm_message_t state)
{
struct snd_card *card;
struct snd_cs4231 *chip;
card = platform_get_drvdata(dev);
snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
chip = card->private_data;
chip->suspend(chip);
return 0;
}
开发者ID:FatSunHYS,项目名称:OSCourseDesign,代码行数:10,代码来源:cs4231.c
示例20: snd_cs4231_resume
static int snd_cs4231_resume(struct platform_device *dev)
{
struct snd_card *card;
struct snd_cs4231 *chip;
card = platform_get_drvdata(dev);
chip = card->private_data;
chip->resume(chip);
snd_power_change_state(card, SNDRV_CTL_POWER_D0);
return 0;
}
开发者ID:FatSunHYS,项目名称:OSCourseDesign,代码行数:10,代码来源:cs4231.c
注:本文中的snd_power_change_state函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论