nm256.c (8dd06ef34b6e2f41b29fbf5fc1663780f2524285) nm256.c (c0dbbdad4e11f86d3e16fec50682c840e18a8135)
1// SPDX-License-Identifier: GPL-2.0-or-later
2/*
3 * Driver for NeoMagic 256AV and 256ZX chipsets.
4 * Copyright (c) 2000 by Takashi Iwai <tiwai@suse.de>
5 *
6 * Based on nm256_audio.c OSS driver in linux kernel.
7 * The original author of OSS nm256 driver wishes to remain anonymous,
8 * so I just put my acknoledgment to him/her here.

--- 546 unchanged lines hidden (view full) ---

555
556 if (snd_BUG_ON(!s))
557 return -ENXIO;
558
559 spin_lock(&chip->reg_lock);
560 switch (cmd) {
561 case SNDRV_PCM_TRIGGER_RESUME:
562 s->suspended = 0;
1// SPDX-License-Identifier: GPL-2.0-or-later
2/*
3 * Driver for NeoMagic 256AV and 256ZX chipsets.
4 * Copyright (c) 2000 by Takashi Iwai <tiwai@suse.de>
5 *
6 * Based on nm256_audio.c OSS driver in linux kernel.
7 * The original author of OSS nm256 driver wishes to remain anonymous,
8 * so I just put my acknoledgment to him/her here.

--- 546 unchanged lines hidden (view full) ---

555
556 if (snd_BUG_ON(!s))
557 return -ENXIO;
558
559 spin_lock(&chip->reg_lock);
560 switch (cmd) {
561 case SNDRV_PCM_TRIGGER_RESUME:
562 s->suspended = 0;
563 /* fallthru */
563 fallthrough;
564 case SNDRV_PCM_TRIGGER_START:
565 if (! s->running) {
566 snd_nm256_playback_start(chip, s, substream);
567 s->running = 1;
568 }
569 break;
570 case SNDRV_PCM_TRIGGER_SUSPEND:
571 s->suspended = 1;
564 case SNDRV_PCM_TRIGGER_START:
565 if (! s->running) {
566 snd_nm256_playback_start(chip, s, substream);
567 s->running = 1;
568 }
569 break;
570 case SNDRV_PCM_TRIGGER_SUSPEND:
571 s->suspended = 1;
572 /* fallthru */
572 fallthrough;
573 case SNDRV_PCM_TRIGGER_STOP:
574 if (s->running) {
575 snd_nm256_playback_stop(chip);
576 s->running = 0;
577 }
578 break;
579 default:
580 err = -EINVAL;

--- 1078 unchanged lines hidden (view full) ---

1659 snd_pci_quirk_name(q));
1660 switch (q->value) {
1661 case NM_BLACKLISTED:
1662 dev_info(&pci->dev,
1663 "The device is blacklisted. Loading stopped\n");
1664 return -ENODEV;
1665 case NM_RESET_WORKAROUND_2:
1666 reset_workaround_2 = 1;
573 case SNDRV_PCM_TRIGGER_STOP:
574 if (s->running) {
575 snd_nm256_playback_stop(chip);
576 s->running = 0;
577 }
578 break;
579 default:
580 err = -EINVAL;

--- 1078 unchanged lines hidden (view full) ---

1659 snd_pci_quirk_name(q));
1660 switch (q->value) {
1661 case NM_BLACKLISTED:
1662 dev_info(&pci->dev,
1663 "The device is blacklisted. Loading stopped\n");
1664 return -ENODEV;
1665 case NM_RESET_WORKAROUND_2:
1666 reset_workaround_2 = 1;
1667 /* Fall-through */
1667 fallthrough;
1668 case NM_RESET_WORKAROUND:
1669 reset_workaround = 1;
1670 break;
1671 }
1672 }
1673
1674 err = snd_card_new(&pci->dev, index, id, THIS_MODULE, 0, &card);
1675 if (err < 0)

--- 82 unchanged lines hidden ---
1668 case NM_RESET_WORKAROUND:
1669 reset_workaround = 1;
1670 break;
1671 }
1672 }
1673
1674 err = snd_card_new(&pci->dev, index, id, THIS_MODULE, 0, &card);
1675 if (err < 0)

--- 82 unchanged lines hidden ---