.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * C-Media CMI8788 driver - main driver module |
---|
3 | 4 | * |
---|
4 | 5 | * Copyright (c) Clemens Ladisch <clemens@ladisch.de> |
---|
5 | | - * |
---|
6 | | - * |
---|
7 | | - * This driver is free software; you can redistribute it and/or modify |
---|
8 | | - * it under the terms of the GNU General Public License, version 2. |
---|
9 | | - * |
---|
10 | | - * This driver is distributed in the hope that it will be useful, |
---|
11 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
12 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
13 | | - * GNU General Public License for more details. |
---|
14 | | - * |
---|
15 | | - * You should have received a copy of the GNU General Public License |
---|
16 | | - * along with this driver; if not, write to the Free Software |
---|
17 | | - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
---|
18 | 6 | */ |
---|
19 | 7 | |
---|
20 | 8 | #include <linux/delay.h> |
---|
.. | .. |
---|
244 | 232 | |
---|
245 | 233 | static void oxygen_proc_init(struct oxygen *chip) |
---|
246 | 234 | { |
---|
247 | | - struct snd_info_entry *entry; |
---|
248 | | - |
---|
249 | | - if (!snd_card_proc_new(chip->card, "oxygen", &entry)) |
---|
250 | | - snd_info_set_text_ops(entry, chip, oxygen_proc_read); |
---|
| 235 | + snd_card_ro_proc_new(chip->card, "oxygen", chip, oxygen_proc_read); |
---|
251 | 236 | } |
---|
252 | 237 | |
---|
253 | 238 | static const struct pci_device_id * |
---|
.. | .. |
---|
373 | 358 | for (i = 0; i < 8; ++i) |
---|
374 | 359 | chip->dac_volume[i] = chip->model.dac_volume_min; |
---|
375 | 360 | chip->dac_mute = 1; |
---|
376 | | - chip->spdif_playback_enable = 1; |
---|
| 361 | + chip->spdif_playback_enable = 0; |
---|
377 | 362 | chip->spdif_bits = OXYGEN_SPDIF_C | OXYGEN_SPDIF_ORIGINAL | |
---|
378 | 363 | (IEC958_AES1_CON_PCM_CODER << OXYGEN_SPDIF_CATEGORY_SHIFT); |
---|
379 | 364 | chip->spdif_pcm_bits = chip->spdif_bits; |
---|
.. | .. |
---|
676 | 661 | goto err_card; |
---|
677 | 662 | } |
---|
678 | 663 | chip->irq = pci->irq; |
---|
| 664 | + card->sync_irq = chip->irq; |
---|
679 | 665 | |
---|
680 | 666 | strcpy(card->driver, chip->model.chip); |
---|
681 | 667 | strcpy(card->shortname, chip->model.shortname); |
---|
.. | .. |
---|
744 | 730 | { |
---|
745 | 731 | struct snd_card *card = dev_get_drvdata(dev); |
---|
746 | 732 | struct oxygen *chip = card->private_data; |
---|
747 | | - unsigned int i, saved_interrupt_mask; |
---|
| 733 | + unsigned int saved_interrupt_mask; |
---|
748 | 734 | |
---|
749 | 735 | snd_power_change_state(card, SNDRV_CTL_POWER_D3hot); |
---|
750 | | - |
---|
751 | | - for (i = 0; i < PCM_COUNT; ++i) |
---|
752 | | - snd_pcm_suspend(chip->streams[i]); |
---|
753 | 736 | |
---|
754 | 737 | if (chip->model.suspend) |
---|
755 | 738 | chip->model.suspend(chip); |
---|
.. | .. |
---|
761 | 744 | oxygen_write16(chip, OXYGEN_INTERRUPT_MASK, 0); |
---|
762 | 745 | spin_unlock_irq(&chip->reg_lock); |
---|
763 | 746 | |
---|
764 | | - synchronize_irq(chip->irq); |
---|
765 | 747 | flush_work(&chip->spdif_input_bits_work); |
---|
766 | 748 | flush_work(&chip->gpio_work); |
---|
767 | 749 | chip->interrupt_mask = saved_interrupt_mask; |
---|