Changeset 777 for GPL/trunk/alsa-kernel/pci/cmipci.c
- Timestamp:
- Apr 21, 2025, 7:17:25 PM (4 months ago)
- Location:
- GPL/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
GPL/trunk
- Property svn:mergeinfo changed
/GPL/branches/uniaud32-exp merged: 766-767,770-771,773-774
- Property svn:mergeinfo changed
-
GPL/trunk/alsa-kernel/pci/cmipci.c
r772 r777 496 496 spinlock_t reg_lock; 497 497 498 #ifdef CONFIG_PM_SLEEP499 498 unsigned int saved_regs[0x20]; 500 499 unsigned char saved_mixers[0x20]; 501 #endif502 500 }; 503 501 … … 1582 1580 }; 1583 1581 1584 static const unsigned int rate_constraints[] = { 5512, 8000, 11025, 16000, 22050,1585 32000, 44100, 48000, 88200, 96000, 128000 };1586 static const struct snd_pcm_hw_constraint_list hw_constraints_rates = {1587 .count = ARRAY_SIZE(rate_constraints),1588 .list = rate_constraints,1589 .mask = 0,1590 };1591 1592 1582 /* 1593 1583 * check device open/close … … 1661 1651 runtime->hw.rate_max = 96000; 1662 1652 } else if (cm->chip_version == 55) { 1663 err = snd_pcm_hw_constraint_list(runtime, 0, 1664 SNDRV_PCM_HW_PARAM_RATE, &hw_constraints_rates); 1665 if (err < 0) 1666 return err; 1667 runtime->hw.rates |= SNDRV_PCM_RATE_KNOT; 1653 runtime->hw.rates |= SNDRV_PCM_RATE_88200 | 1654 SNDRV_PCM_RATE_96000 | 1655 SNDRV_PCM_RATE_128000; 1668 1656 runtime->hw.rate_max = 128000; 1669 1657 } … … 1687 1675 runtime->hw.rates = SNDRV_PCM_RATE_44100 | SNDRV_PCM_RATE_48000; 1688 1676 } else if (cm->chip_version == 55) { 1689 err = snd_pcm_hw_constraint_list(runtime, 0, 1690 SNDRV_PCM_HW_PARAM_RATE, &hw_constraints_rates); 1691 if (err < 0) 1692 return err; 1693 runtime->hw.rates |= SNDRV_PCM_RATE_KNOT; 1677 runtime->hw.rates |= SNDRV_PCM_RATE_88200 | 1678 SNDRV_PCM_RATE_96000 | 1679 SNDRV_PCM_RATE_128000; 1694 1680 runtime->hw.rate_max = 128000; 1695 1681 } … … 1727 1713 runtime->hw.rate_max = 96000; 1728 1714 } else if (cm->chip_version == 55) { 1729 err = snd_pcm_hw_constraint_list(runtime, 0, 1730 SNDRV_PCM_HW_PARAM_RATE, &hw_constraints_rates); 1731 if (err < 0) 1732 return err; 1733 runtime->hw.rates |= SNDRV_PCM_RATE_KNOT; 1715 runtime->hw.rates |= SNDRV_PCM_RATE_88200 | 1716 SNDRV_PCM_RATE_96000 | 1717 SNDRV_PCM_RATE_128000; 1734 1718 runtime->hw.rate_max = 128000; 1735 1719 } … … 3281 3265 } 3282 3266 3283 #ifdef CONFIG_PM_SLEEP3284 3267 /* 3285 3268 * power management … … 3345 3328 } 3346 3329 3347 static SIMPLE_DEV_PM_OPS(snd_cmipci_pm, snd_cmipci_suspend, snd_cmipci_resume); 3348 #define SND_CMIPCI_PM_OPS &snd_cmipci_pm 3349 #else 3350 #define SND_CMIPCI_PM_OPS NULL 3351 #endif /* CONFIG_PM_SLEEP */ 3330 static DEFINE_SIMPLE_DEV_PM_OPS(snd_cmipci_pm, snd_cmipci_suspend, snd_cmipci_resume); 3352 3331 3353 3332 static struct pci_driver cmipci_driver = { … … 3356 3335 .probe = snd_cmipci_probe, 3357 3336 .driver = { 3358 .pm = SND_CMIPCI_PM_OPS,3337 .pm = &snd_cmipci_pm, 3359 3338 }, 3360 3339 };
Note:
See TracChangeset
for help on using the changeset viewer.