本文整理汇总了C++中snd_card_disconnect函数的典型用法代码示例。如果您正苦于以下问题:C++ snd_card_disconnect函数的具体用法?C++ snd_card_disconnect怎么用?C++ snd_card_disconnect使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了snd_card_disconnect函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: snd_cs5535audio_resume
int snd_cs5535audio_resume(struct pci_dev *pci)
{
struct snd_card *card = pci_get_drvdata(pci);
struct cs5535audio *cs5535au = card->private_data;
u32 tmp;
int timeout;
int i;
pci_set_power_state(pci, PCI_D0);
if (pci_restore_state(pci) < 0) {
printk(KERN_ERR "cs5535audio: pci_restore_state failed, "
"disabling device\n");
snd_card_disconnect(card);
return -EIO;
}
if (pci_enable_device(pci) < 0) {
printk(KERN_ERR "cs5535audio: pci_enable_device failed, "
"disabling device\n");
snd_card_disconnect(card);
return -EIO;
}
pci_set_master(pci);
/* set LNK_WRM_RST to reset AC link */
cs_writel(cs5535au, ACC_CODEC_CNTL, ACC_CODEC_CNTL_LNK_WRM_RST);
timeout = 50;
do {
tmp = cs_readl(cs5535au, ACC_CODEC_STATUS);
if (tmp & PRM_RDY_STS)
break;
udelay(1);
} while (--timeout);
if (!timeout)
snd_printk(KERN_ERR "Failure getting AC Link ready\n");
/* set up rate regs, dma. actual initiation is done in trig */
for (i = 0; i < NUM_CS5535AUDIO_DMAS; i++) {
struct cs5535audio_dma *dma = &cs5535au->dmas[i];
if (dma && dma->substream) {
dma->substream->ops->prepare(dma->substream);
dma->ops->setup_prd(cs5535au, dma->saved_prd);
}
}
/* we depend on ac97 to perform the codec power up */
snd_ac97_resume(cs5535au->ac97);
snd_power_change_state(card, SNDRV_CTL_POWER_D0);
return 0;
}
开发者ID:johnny,项目名称:CobraDroidBeta,代码行数:52,代码来源:cs5535audio_pm.c
示例2: line6_disconnect
/*
Line 6 device disconnected.
*/
void line6_disconnect(struct usb_interface *interface)
{
struct usb_line6 *line6 = usb_get_intfdata(interface);
struct usb_device *usbdev = interface_to_usbdev(interface);
if (!line6)
return;
if (WARN_ON(usbdev != line6->usbdev))
return;
if (line6->urb_listen != NULL)
line6_stop_listen(line6);
snd_card_disconnect(line6->card);
if (line6->line6pcm)
line6_pcm_disconnect(line6->line6pcm);
if (line6->disconnect)
line6->disconnect(line6);
dev_info(&interface->dev, "Line 6 %s now disconnected\n",
line6->properties->name);
/* make sure the device isn't destructed twice: */
usb_set_intfdata(interface, NULL);
snd_card_free_when_closed(line6->card);
}
开发者ID:020gzh,项目名称:linux,代码行数:31,代码来源:driver.c
示例3: 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
示例4: vxpocket_detach
static void vxpocket_detach(dev_link_t *link)
{
struct snd_vxpocket *vxp;
vx_core_t *chip;
dev_link_t **linkp;
if (! link)
return;
vxp = link->priv;
chip = (vx_core_t *)vxp;
card_alloc &= ~(1 << vxp->index);
/* Remove the interface data from the linked list */
for (linkp = &dev_list; *linkp; linkp = &(*linkp)->next)
if (*linkp == link) {
*linkp = link->next;
break;
}
chip->chip_status |= VX_STAT_IS_STALE; /* to be sure */
snd_card_disconnect(chip->card);
vxpocket_release(link);
snd_card_free_in_thread(chip->card);
}
开发者ID:BackupTheBerlios,项目名称:tew632-brp-svn,代码行数:25,代码来源:vxpocket.c
示例5: snd_mpu401_pnp_remove
static void __devexit snd_mpu401_pnp_remove(struct pnp_dev *dev)
{
struct snd_card *card = (struct snd_card *) pnp_get_drvdata(dev);
snd_card_disconnect(card);
snd_card_free_when_closed(card);
}
开发者ID:StephenMacras,项目名称:dsl-n55u-bender,代码行数:7,代码来源:mpu401.c
示例6: 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
示例7: sscape_pnp_remove
static void __devexit sscape_pnp_remove(struct pnp_card_link * pcard)
{
snd_card_t *card = (snd_card_t *) pnp_get_card_drvdata(pcard);
pnp_set_card_drvdata(pcard, NULL);
snd_card_disconnect(card);
snd_card_free_in_thread(card);
}
开发者ID:BackupTheBerlios,项目名称:tuxap,代码行数:8,代码来源:sscape.c
示例8: efw_remove
static void efw_remove(struct fw_unit *unit)
{
struct snd_efw *efw = dev_get_drvdata(&unit->device);
snd_efw_stream_destroy_duplex(efw);
snd_efw_transaction_remove_instance(efw);
snd_card_disconnect(efw->card);
snd_card_free_when_closed(efw->card);
}
开发者ID:mikuhatsune001,项目名称:linux2.6.32,代码行数:10,代码来源:fireworks.c
示例9: line6_cleanup_audio
/*
Cleanup the Line6 USB audio system.
*/
void line6_cleanup_audio(struct usb_line6 *line6)
{
struct snd_card *card = line6->card;
if (card == NULL)
return;
snd_card_disconnect(card);
snd_card_free(card);
line6->card = NULL;
}
开发者ID:12rafael,项目名称:jellytimekernel,代码行数:14,代码来源:audio.c
示例10: snd_pdacf_detach
/*
* snd_pdacf_detach - detach callback for cs
*/
static void snd_pdacf_detach(struct pcmcia_device *link)
{
struct snd_pdacf *chip = link->priv;
snd_printdd(KERN_DEBUG "pdacf_detach called\n");
if (chip->chip_status & PDAUDIOCF_STAT_IS_CONFIGURED)
snd_pdacf_powerdown(chip);
chip->chip_status |= PDAUDIOCF_STAT_IS_STALE; /* to be sure */
snd_card_disconnect(chip->card);
snd_card_free_in_thread(chip->card);
}
开发者ID:BackupTheBerlios,项目名称:arp2-svn,代码行数:15,代码来源:pdaudiocf.c
示例11: oxfw_remove
static void oxfw_remove(struct fw_unit *unit)
{
struct snd_oxfw *oxfw = dev_get_drvdata(&unit->device);
snd_card_disconnect(oxfw->card);
snd_oxfw_stream_destroy_simplex(oxfw, &oxfw->rx_stream);
if (oxfw->has_output)
snd_oxfw_stream_destroy_simplex(oxfw, &oxfw->tx_stream);
snd_card_free_when_closed(oxfw->card);
}
开发者ID:383530895,项目名称:linux,代码行数:12,代码来源:oxfw.c
示例12: snd_pdacf_detach
/*
* snd_pdacf_detach - detach callback for cs
*/
static void snd_pdacf_detach(struct pcmcia_device *p_dev)
{
dev_link_t *link = dev_to_instance(p_dev);
struct snd_pdacf *chip = link->priv;
snd_printdd(KERN_DEBUG "pdacf_detach called\n");
if (chip->chip_status & PDAUDIOCF_STAT_IS_CONFIGURED)
snd_pdacf_powerdown(chip);
chip->chip_status |= PDAUDIOCF_STAT_IS_STALE; /* to be sure */
snd_card_disconnect(chip->card);
snd_card_free_when_closed(chip->card);
}
开发者ID:canalplus,项目名称:r7oss,代码行数:16,代码来源:pdaudiocf-2.6.16.c
示例13: snd_vx222_resume
static int snd_vx222_resume(struct pci_dev *pci)
{
struct snd_card *card = pci_get_drvdata(pci);
struct snd_vx222 *vx = card->private_data;
pci_set_power_state(pci, PCI_D0);
pci_restore_state(pci);
if (pci_enable_device(pci) < 0) {
printk(KERN_ERR "vx222: pci_enable_device failed, "
"disabling device\n");
snd_card_disconnect(card);
return -EIO;
}
pci_set_master(pci);
return snd_vx_resume(&vx->core);
}
开发者ID:12rafael,项目名称:jellytimekernel,代码行数:16,代码来源:vx222.c
示例14: snd_bebob_remove
static void snd_bebob_remove(struct fw_unit *unit)
{
struct snd_bebob *bebob = dev_get_drvdata(&unit->device);
/* this is for firmware bootloader */
if (bebob == NULL)
goto end;
snd_bebob_destroy_pcm_devices(bebob);
snd_card_disconnect(bebob->card);
snd_card_free_when_closed(bebob->card);
end:
return;
}
开发者ID:jdekozak,项目名称:snd-firewire-improve,代码行数:16,代码来源:bebob.c
示例15: snd_mpu401_acpi_remove
static int __devexit snd_mpu401_acpi_remove(struct acpi_device *device,
int type)
{
snd_card_t *card;
if (!device)
return -EINVAL;
card = (snd_card_t *)acpi_driver_data(device);
if (!card)
return -EINVAL;
snd_card_disconnect(card);
snd_card_free_in_thread(card);
acpi_driver_data(device) = NULL;
return 0;
}
开发者ID:FelipeFernandes1988,项目名称:Alice-1121-Modem,代码行数:16,代码来源:mpu401.c
示例16: vxpocket_detach
static void vxpocket_detach(struct pcmcia_device *link)
{
struct snd_vxpocket *vxp;
struct vx_core *chip;
if (! link)
return;
vxp = link->priv;
chip = (struct vx_core *)vxp;
card_alloc &= ~(1 << vxp->index);
chip->chip_status |= VX_STAT_IS_STALE; /* to be sure */
snd_card_disconnect(chip->card);
vxpocket_release(link);
snd_card_free_when_closed(chip->card);
}
开发者ID:1yankeedt,项目名称:D710BST_FL24_Kernel,代码行数:17,代码来源:vxpocket.c
示例17: usb6fire_chip_abort
static void usb6fire_chip_abort(struct sfire_chip *chip)
{
if (chip) {
if (chip->pcm)
usb6fire_pcm_abort(chip);
if (chip->midi)
usb6fire_midi_abort(chip);
if (chip->comm)
usb6fire_comm_abort(chip);
if (chip->control)
usb6fire_control_abort(chip);
if (chip->card) {
snd_card_disconnect(chip->card);
snd_card_free_when_closed(chip->card);
chip->card = NULL;
}
}
}
开发者ID:AD5GB,项目名称:kernel_n5_3.10-experimental,代码行数:18,代码来源:chip.c
示例18: bcd2000_disconnect
static void bcd2000_disconnect(struct usb_interface *interface)
{
struct bcd2000 *bcd2k = usb_get_intfdata(interface);
if (!bcd2k)
return;
mutex_lock(&devices_mutex);
/* make sure that userspace cannot create new requests */
snd_card_disconnect(bcd2k->card);
bcd2000_free_usb_related_resources(bcd2k, interface);
clear_bit(bcd2k->card_index, devices_used);
snd_card_free_when_closed(bcd2k->card);
mutex_unlock(&devices_mutex);
}
开发者ID:mikuhatsune001,项目名称:linux2.6.32,代码行数:20,代码来源:bcd2000.c
示例19: snd_pdacf_detach
/*
* snd_pdacf_detach - detach callback for cs
*/
static void snd_pdacf_detach(dev_link_t *link)
{
pdacf_t *chip = link->priv;
snd_printdd(KERN_DEBUG "pdacf_detach called\n");
/* Remove the interface data from the linked list */
{
dev_link_t **linkp;
/* Locate device structure */
for (linkp = &dev_list; *linkp; linkp = &(*linkp)->next)
if (*linkp == link)
break;
if (*linkp)
*linkp = link->next;
}
if (chip->chip_status & PDAUDIOCF_STAT_IS_CONFIGURED)
snd_pdacf_powerdown(chip);
chip->chip_status |= PDAUDIOCF_STAT_IS_STALE; /* to be sure */
snd_card_disconnect(chip->card);
snd_card_free_in_thread(chip->card);
}
开发者ID:Dronevery,项目名称:JetsonTK1-kernel,代码行数:24,代码来源:pdaudiocf.c
示例20: nm256_resume
static int nm256_resume(struct device *dev)
{
struct pci_dev *pci = to_pci_dev(dev);
struct snd_card *card = dev_get_drvdata(dev);
struct nm256 *chip = card->private_data;
int i;
/* Perform a full reset on the hardware */
chip->in_resume = 1;
pci_set_power_state(pci, PCI_D0);
pci_restore_state(pci);
if (pci_enable_device(pci) < 0) {
printk(KERN_ERR "nm256: pci_enable_device failed, "
"disabling device\n");
snd_card_disconnect(card);
return -EIO;
}
pci_set_master(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);
chip->in_resume = 0;
return 0;
}
开发者ID:ARMWorks,项目名称:FA_2451_Linux_Kernel,代码行数:38,代码来源:nm256.c
注:本文中的snd_card_disconnect函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论