Lines Matching refs:chip

72 	struct azx chip;
149 struct azx *chip = card->private_data;
150 struct hda_tegra *hda = container_of(chip, struct hda_tegra, chip);
152 if (chip && chip->running) {
154 azx_writew(chip, WAKEEN, azx_readw(chip, WAKEEN) |
157 azx_stop_chip(chip);
158 azx_enter_link_reset(chip);
168 struct azx *chip = card->private_data;
169 struct hda_tegra *hda = container_of(chip, struct hda_tegra, chip);
172 if (!chip->running) {
181 if (chip && chip->running) {
183 azx_init_chip(chip, 1);
185 azx_writew(chip, WAKEEN, azx_readw(chip, WAKEEN) &
207 struct azx *chip = device->device_data;
209 chip->bus.shutdown = 1;
218 struct azx *chip = device->device_data;
219 struct hda_tegra *hda = container_of(chip, struct hda_tegra, chip);
222 if (azx_bus(chip)->chip_init) {
223 azx_stop_all_streams(chip);
224 azx_stop_chip(chip);
227 azx_free_stream_pages(chip);
228 azx_free_streams(chip);
229 snd_hdac_bus_exit(azx_bus(chip));
234 static int hda_tegra_init_chip(struct azx *chip, struct platform_device *pdev)
236 struct hda_tegra *hda = container_of(chip, struct hda_tegra, chip);
237 struct hdac_bus *bus = azx_bus(chip);
254 static int hda_tegra_first_init(struct azx *chip, struct platform_device *pdev)
256 struct hda_tegra *hda = container_of(chip, struct hda_tegra, chip);
257 struct hdac_bus *bus = azx_bus(chip);
258 struct snd_card *card = chip->card;
268 err = hda_tegra_init_chip(chip, pdev);
272 err = devm_request_irq(chip->card->dev, irq_id, azx_interrupt,
273 IRQF_SHARED, KBUILD_MODNAME, chip);
275 dev_err(chip->card->dev,
304 gcap = azx_readw(chip, GCAP);
307 chip->align_buffer_size = 1;
312 chip->capture_streams = (gcap >> 8) & 0x0f;
313 chip->playback_streams = (gcap >> 12) & 0x0f;
314 if (!chip->playback_streams && !chip->capture_streams) {
316 chip->playback_streams = NUM_PLAYBACK_SD;
317 chip->capture_streams = NUM_CAPTURE_SD;
319 chip->capture_index_offset = 0;
320 chip->playback_index_offset = chip->capture_streams;
321 chip->num_streams = chip->playback_streams + chip->capture_streams;
324 err = azx_init_streams(chip);
330 err = azx_alloc_stream_pages(chip);
337 /* initialize chip */
338 azx_init_chip(chip, 1);
355 chip->bus.core.sdo_limit = 16;
395 struct azx *chip;
398 chip = &hda->chip;
400 mutex_init(&chip->open_mutex);
401 chip->card = card;
402 chip->ops = &hda_tegra_ops;
403 chip->driver_caps = driver_caps;
404 chip->driver_type = driver_caps & 0xff;
405 chip->dev_index = 0;
406 INIT_LIST_HEAD(&chip->pcm_list);
408 chip->codec_probe_mask = -1;
410 chip->single_cmd = false;
411 chip->snoop = true;
415 err = azx_bus_init(chip, NULL);
419 chip->bus.core.sync_write = 0;
420 chip->bus.core.needs_damn_long_delay = 1;
421 chip->bus.core.aligned_mmio = 1;
423 err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, chip, &ops);
445 struct azx *chip;
453 chip = &hda->chip;
479 card->private_data = chip;
484 if (!azx_has_pm_runtime(chip))
499 struct azx *chip = &hda->chip;
504 err = hda_tegra_first_init(chip, pdev);
509 err = azx_probe_codecs(chip, 8);
513 err = azx_codec_configure(chip);
517 err = snd_card_register(chip->card);
521 chip->running = 1;
522 snd_hda_set_power_save(&chip->bus, power_save * 1000);
542 struct azx *chip;
546 chip = card->private_data;
547 if (chip && chip->running)
548 azx_stop_chip(chip);