Changeset 629 for GPL/branches/uniaud32-next/alsa-kernel/pci/sonicvibes.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/sonicvibes.c
r615 r629 682 682 } 683 683 684 static int snd_sonicvibes_hw_params(struct snd_pcm_substream *substream,685 struct snd_pcm_hw_params *hw_params)686 {687 return snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params));688 }689 690 static int snd_sonicvibes_hw_free(struct snd_pcm_substream *substream)691 {692 return snd_pcm_lib_free_pages(substream);693 }694 695 684 static int snd_sonicvibes_playback_prepare(struct snd_pcm_substream *substream) 696 685 { … … 847 836 .open = snd_sonicvibes_playback_open, 848 837 .close = snd_sonicvibes_playback_close, 849 .ioctl = snd_pcm_lib_ioctl,850 .hw_params = snd_sonicvibes_hw_params,851 .hw_free = snd_sonicvibes_hw_free,852 838 .prepare = snd_sonicvibes_playback_prepare, 853 839 .trigger = snd_sonicvibes_playback_trigger, … … 858 844 .open = snd_sonicvibes_capture_open, 859 845 .close = snd_sonicvibes_capture_close, 860 .ioctl = snd_pcm_lib_ioctl,861 .hw_params = snd_sonicvibes_hw_params,862 .hw_free = snd_sonicvibes_hw_free,863 846 .prepare = snd_sonicvibes_capture_prepare, 864 847 .trigger = snd_sonicvibes_capture_trigger, … … 884 867 sonic->pcm = pcm; 885 868 886 snd_pcm_ lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,887 snd_dma_pci_data(sonic->pci), 64*1024, 128*1024);869 snd_pcm_set_managed_buffer_all(pcm, SNDRV_DMA_TYPE_DEV, 870 &sonic->pci->dev, 64*1024, 128*1024); 888 871 889 872 return 0; … … 1068 1051 } 1069 1052 1070 static struct snd_kcontrol_new snd_sonicvibes_controls[] = {1053 static const struct snd_kcontrol_new snd_sonicvibes_controls[] = { 1071 1054 SONICVIBES_DOUBLE("Capture Volume", 0, SV_IREG_LEFT_ADC, SV_IREG_RIGHT_ADC, 0, 0, 15, 0), 1072 1055 SONICVIBES_DOUBLE("Aux Playback Switch", 0, SV_IREG_LEFT_AUX1, SV_IREG_RIGHT_AUX1, 7, 7, 1, 1), … … 1167 1150 1168 1151 #ifdef SUPPORT_JOYSTICK 1169 static struct snd_kcontrol_new snd_sonicvibes_game_control =1152 static const struct snd_kcontrol_new snd_sonicvibes_game_control = 1170 1153 SONICVIBES_SINGLE("Joystick Speed", 0, SV_IREG_GAME_PORT, 1, 15, 0); 1171 1154 … … 1239 1222 unsigned int dmaa, dmac; 1240 1223 int err; 1241 static struct snd_device_ops ops = {1224 static const struct snd_device_ops ops = { 1242 1225 .dev_free = snd_sonicvibes_dev_free, 1243 1226 }; … … 1285 1268 } 1286 1269 sonic->irq = pci->irq; 1270 card->sync_irq = sonic->irq; 1287 1271 1288 1272 pci_read_config_dword(pci, 0x40, &dmaa); … … 1392 1376 */ 1393 1377 1394 static struct snd_kcontrol_new snd_sonicvibes_midi_controls[] = {1378 static const struct snd_kcontrol_new snd_sonicvibes_midi_controls[] = { 1395 1379 SONICVIBES_SINGLE("SonicVibes Wave Source RAM", 0, SV_IREG_WAVE_SOURCE, 0, 1, 0), 1396 1380 SONICVIBES_SINGLE("SonicVibes Wave Source RAM+ROM", 0, SV_IREG_WAVE_SOURCE, 1, 1, 0),
Note:
See TracChangeset
for help on using the changeset viewer.