Lines Matching refs:pci

378 	struct pci_dev *pci;  member
415 MODULE_DEVICE_TABLE(pci, snd_via82xx_ids);
426 struct pci_dev *pci, in build_via_table() argument
436 if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(chip->pci), in build_via_table()
462 dev_err(&pci->dev, "too much table size!\n"); in build_via_table()
497 struct pci_dev *pci) in clean_via_table() argument
939 err = build_via_table(viadev, substream, chip->pci, in snd_via82xx_hw_params()
957 clean_via_table(viadev, substream, chip->pci); in snd_via82xx_hw_free()
1474 snd_dma_pci_data(chip->pci), in snd_via8233_pcm_new()
1498 snd_dma_pci_data(chip->pci), in snd_via8233_pcm_new()
1541 snd_dma_pci_data(chip->pci), in snd_via8233a_pcm_new()
1567 snd_dma_pci_data(chip->pci), in snd_via8233a_pcm_new()
1597 snd_dma_pci_data(chip->pci), in snd_via686_pcm_new()
1662 pci_read_config_byte(chip->pci, VIA8233_SPDIF_CTRL, &val); in snd_via8233_dxs3_spdif_get()
1673 pci_read_config_byte(chip->pci, VIA8233_SPDIF_CTRL, &oval); in snd_via8233_dxs3_spdif_put()
1680 pci_write_config_byte(chip->pci, VIA8233_SPDIF_CTRL, val); in snd_via8233_dxs3_spdif_put()
1916 ac97.pci = chip->pci; in snd_via82xx_mixer_new()
1957 gameport_set_phys(gp, "pci%s/gameport0", pci_name(chip->pci)); in snd_via686_create_gameport()
1958 gameport_set_dev_parent(gp, &chip->pci->dev); in snd_via686_create_gameport()
1964 pci_write_config_byte(chip->pci, VIA_FUNC_ENABLE, *legacy); in snd_via686_create_gameport()
2044 pci_read_config_byte(chip->pci, VIA8233_SPDIF_CTRL, &val); in snd_via8233_init_misc()
2047 pci_write_config_byte(chip->pci, VIA8233_SPDIF_CTRL, val); in snd_via8233_init_misc()
2065 pci_write_config_dword(chip->pci, 0x18, mpu_port | 0x01); in snd_via686_init_misc()
2070 mpu_port = pci_resource_start(chip->pci, 2); in snd_via686_init_misc()
2100 pci_write_config_byte(chip->pci, VIA_FUNC_ENABLE, legacy); in snd_via686_init_misc()
2101 pci_write_config_byte(chip->pci, VIA_PNP_CONTROL, legacy_cfg); in snd_via686_init_misc()
2114 pci_write_config_byte(chip->pci, VIA_FUNC_ENABLE, legacy); in snd_via686_init_misc()
2164 pci_write_config_byte(chip->pci, VIA_FUNC_ENABLE, 0); in snd_via82xx_chip_init()
2166 pci_read_config_byte(chip->pci, VIA_ACLINK_STAT, &pval); in snd_via82xx_chip_init()
2169 pci_write_config_byte(chip->pci, VIA_ACLINK_CTRL, in snd_via82xx_chip_init()
2175 pci_write_config_byte(chip->pci, VIA_ACLINK_CTRL, 0x00); in snd_via82xx_chip_init()
2179 pci_write_config_byte(chip->pci, VIA_ACLINK_CTRL, in snd_via82xx_chip_init()
2185 pci_write_config_byte(chip->pci, VIA_ACLINK_CTRL, VIA_ACLINK_CTRL_INIT); in snd_via82xx_chip_init()
2191 pci_read_config_byte(chip->pci, VIA_ACLINK_CTRL, &pval); in snd_via82xx_chip_init()
2195 pci_write_config_byte(chip->pci, VIA_ACLINK_CTRL, VIA_ACLINK_CTRL_INIT); in snd_via82xx_chip_init()
2202 pci_read_config_byte(chip->pci, VIA_ACLINK_STAT, &pval); in snd_via82xx_chip_init()
2234 pci_write_config_byte(chip->pci, VIA_FM_NMI_CTRL, 0); in snd_via82xx_chip_init()
2243 struct pci_dev *pci; in snd_via82xx_chip_init() local
2244 pci = pci_get_device(0x1106, 0x3068, NULL); /* MC97 */ in snd_via82xx_chip_init()
2245 if (pci) { in snd_via82xx_chip_init()
2247 pci_read_config_byte(pci, 0x44, &data); in snd_via82xx_chip_init()
2248 pci_write_config_byte(pci, 0x44, data | 0x40); in snd_via82xx_chip_init()
2249 pci_dev_put(pci); in snd_via82xx_chip_init()
2288 pci_read_config_byte(chip->pci, VIA8233_SPDIF_CTRL, &chip->spdif_ctrl_saved); in snd_via82xx_suspend()
2306 pci_write_config_dword(chip->pci, 0x18, chip->mpu_port_saved | 0x01); in snd_via82xx_resume()
2307 pci_write_config_byte(chip->pci, VIA_FUNC_ENABLE, chip->legacy_saved); in snd_via82xx_resume()
2308 pci_write_config_byte(chip->pci, VIA_PNP_CONTROL, chip->legacy_cfg_saved); in snd_via82xx_resume()
2310 pci_write_config_byte(chip->pci, VIA8233_SPDIF_CTRL, chip->spdif_ctrl_saved); in snd_via82xx_resume()
2344 pci_release_regions(chip->pci); in snd_via82xx_free()
2348 pci_write_config_byte(chip->pci, VIA_FUNC_ENABLE, chip->old_legacy); in snd_via82xx_free()
2349 pci_write_config_byte(chip->pci, VIA_PNP_CONTROL, chip->old_legacy_cfg); in snd_via82xx_free()
2351 pci_disable_device(chip->pci); in snd_via82xx_free()
2363 struct pci_dev *pci, in snd_via82xx_create() argument
2375 if ((err = pci_enable_device(pci)) < 0) in snd_via82xx_create()
2379 pci_disable_device(pci); in snd_via82xx_create()
2390 chip->pci = pci; in snd_via82xx_create()
2393 pci_read_config_byte(pci, VIA_FUNC_ENABLE, &chip->old_legacy); in snd_via82xx_create()
2394 pci_read_config_byte(pci, VIA_PNP_CONTROL, &chip->old_legacy_cfg); in snd_via82xx_create()
2395 pci_write_config_byte(chip->pci, VIA_FUNC_ENABLE, in snd_via82xx_create()
2398 if ((err = pci_request_regions(pci, card->driver)) < 0) { in snd_via82xx_create()
2400 pci_disable_device(pci); in snd_via82xx_create()
2403 chip->port = pci_resource_start(pci, 0); in snd_via82xx_create()
2404 if (request_irq(pci->irq, in snd_via82xx_create()
2409 dev_err(card->dev, "unable to grab IRQ %d\n", pci->irq); in snd_via82xx_create()
2413 chip->irq = pci->irq; in snd_via82xx_create()
2431 pci_set_master(pci); in snd_via82xx_create()
2500 static int check_dxs_list(struct pci_dev *pci, int revision) in check_dxs_list() argument
2504 w = snd_pci_quirk_lookup(pci, dxs_whitelist); in check_dxs_list()
2506 dev_dbg(&pci->dev, "DXS white list for %s found\n", in check_dxs_list()
2518 dev_info(&pci->dev, "Assuming DXS channels with 48k fixed sample rate.\n"); in check_dxs_list()
2519 dev_info(&pci->dev, " Please try dxs_support=5 option\n"); in check_dxs_list()
2520 dev_info(&pci->dev, " and report if it works on your machine.\n"); in check_dxs_list()
2521 dev_info(&pci->dev, " For more details, read ALSA-Configuration.txt.\n"); in check_dxs_list()
2525 static int snd_via82xx_probe(struct pci_dev *pci, in snd_via82xx_probe() argument
2534 err = snd_card_new(&pci->dev, index, id, THIS_MODULE, 0, &card); in snd_via82xx_probe()
2542 sprintf(card->shortname, "VIA 82C686A/B rev%x", pci->revision); in snd_via82xx_probe()
2547 sprintf(card->shortname, "VIA 823x rev%x", pci->revision); in snd_via82xx_probe()
2549 if (pci->revision == via823x_cards[i].revision) { in snd_via82xx_probe()
2557 dxs_support = check_dxs_list(pci, pci->revision); in snd_via82xx_probe()
2568 else if (pci->revision >= VIA_REV_8237) in snd_via82xx_probe()
2579 if ((err = snd_via82xx_create(card, pci, chip_type, pci->revision, in snd_via82xx_probe()
2625 pci_set_drvdata(pci, card); in snd_via82xx_probe()
2633 static void snd_via82xx_remove(struct pci_dev *pci) in snd_via82xx_remove() argument
2635 snd_card_free(pci_get_drvdata(pci)); in snd_via82xx_remove()