Changeset 629 for GPL/branches/uniaud32-next/alsa-kernel/pci/cs4281.c
- Timestamp:
- Jan 4, 2021, 10:15:17 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GPL/branches/uniaud32-next/alsa-kernel/pci/cs4281.c
r615 r629 784 784 } 785 785 786 static int snd_cs4281_hw_params(struct snd_pcm_substream *substream,787 struct snd_pcm_hw_params *hw_params)788 {789 return snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params));790 }791 792 static int snd_cs4281_hw_free(struct snd_pcm_substream *substream)793 {794 return snd_pcm_lib_free_pages(substream);795 }796 797 786 static int snd_cs4281_playback_prepare(struct snd_pcm_substream *substream) 798 787 { … … 942 931 .open = snd_cs4281_playback_open, 943 932 .close = snd_cs4281_playback_close, 944 .ioctl = snd_pcm_lib_ioctl,945 .hw_params = snd_cs4281_hw_params,946 .hw_free = snd_cs4281_hw_free,947 933 .prepare = snd_cs4281_playback_prepare, 948 934 .trigger = snd_cs4281_trigger, … … 953 939 .open = snd_cs4281_capture_open, 954 940 .close = snd_cs4281_capture_close, 955 .ioctl = snd_pcm_lib_ioctl,956 .hw_params = snd_cs4281_hw_params,957 .hw_free = snd_cs4281_hw_free,958 941 .prepare = snd_cs4281_capture_prepare, 959 942 .trigger = snd_cs4281_trigger, … … 978 961 chip->pcm = pcm; 979 962 980 snd_pcm_ lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,981 snd_dma_pci_data(chip->pci),64*1024, 512*1024);963 snd_pcm_set_managed_buffer_all(pcm, SNDRV_DMA_TYPE_DEV, &chip->pci->dev, 964 64*1024, 512*1024); 982 965 983 966 return 0; … … 1085 1068 struct snd_ac97_template ac97; 1086 1069 int err; 1087 static struct snd_ac97_bus_ops ops = {1070 static const struct snd_ac97_bus_ops ops = { 1088 1071 .write = snd_cs4281_ac97_write, 1089 1072 .read = snd_cs4281_ac97_read, … … 1150 1133 } 1151 1134 1152 static struct snd_info_entry_ops snd_cs4281_proc_ops_BA0 = {1135 static const struct snd_info_entry_ops snd_cs4281_proc_ops_BA0 = { 1153 1136 .read = snd_cs4281_BA0_read, 1154 1137 }; 1155 1138 1156 static struct snd_info_entry_ops snd_cs4281_proc_ops_BA1 = {1139 static const struct snd_info_entry_ops snd_cs4281_proc_ops_BA1 = { 1157 1140 .read = snd_cs4281_BA1_read, 1158 1141 }; … … 1289 1272 snd_cs4281_free_gameport(chip); 1290 1273 1291 if (chip->irq >= 0)1292 synchronize_irq(chip->irq);1293 1294 1274 /* Mask interrupts */ 1295 1275 snd_cs4281_pokeBA0(chip, BA0_HIMR, 0x7fffffff); … … 1328 1308 unsigned int tmp; 1329 1309 int err; 1330 static struct snd_device_ops ops = {1310 static const struct snd_device_ops ops = { 1331 1311 .dev_free = snd_cs4281_dev_free, 1332 1312 }; … … 1373 1353 } 1374 1354 chip->irq = pci->irq; 1355 card->sync_irq = chip->irq; 1375 1356 1376 1357 tmp = snd_cs4281_chip_init(chip); … … 1621 1602 BA0_HISR_DMA(2) | 1622 1603 BA0_HISR_DMA(3))); 1623 synchronize_irq(chip->irq);1624 1604 1625 1605 return 0; … … 1963 1943 #ifdef CONFIG_PM_SLEEP 1964 1944 1965 static int saved_regs[SUSPEND_REGISTERS] = {1945 static const int saved_regs[SUSPEND_REGISTERS] = { 1966 1946 BA0_JSCTL, 1967 1947 BA0_GPIOR,
Note:
See TracChangeset
for help on using the changeset viewer.