forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-09-20 cf4ce59b3b70238352c7f1729f0f7223214828ad
kernel/sound/pci/ymfpci/ymfpci_main.c
....@@ -1,21 +1,7 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * Copyright (c) by Jaroslav Kysela <perex@perex.cz>
34 * Routines for control of YMF724/740/744/754 chips
4
- *
5
- * This program is free software; you can redistribute it and/or modify
6
- * it under the terms of the GNU General Public License as published by
7
- * the Free Software Foundation; either version 2 of the License, or
8
- * (at your option) any later version.
9
- *
10
- * This program 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 program; if not, write to the Free Software
17
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18
- *
195 */
206
217 #include <linux/delay.h>
....@@ -136,14 +122,14 @@
136122 }
137123 }
138124
139
-static u32 def_rate[8] = {
125
+static const u32 def_rate[8] = {
140126 100, 2000, 8000, 11025, 16000, 22050, 32000, 48000
141127 };
142128
143129 static u32 snd_ymfpci_calc_lpfK(u32 rate)
144130 {
145131 u32 i;
146
- static u32 val[8] = {
132
+ static const u32 val[8] = {
147133 0x00570000, 0x06AA0000, 0x18B20000, 0x20930000,
148134 0x2B9A0000, 0x35A10000, 0x3EAA0000, 0x40000000
149135 };
....@@ -159,7 +145,7 @@
159145 static u32 snd_ymfpci_calc_lpfQ(u32 rate)
160146 {
161147 u32 i;
162
- static u32 val[8] = {
148
+ static const u32 val[8] = {
163149 0x35280000, 0x34A70000, 0x32020000, 0x31770000,
164150 0x31390000, 0x31C90000, 0x33D00000, 0x40000000
165151 };
....@@ -306,7 +292,8 @@
306292 struct snd_ymfpci_pcm *ypcm;
307293 u32 pos, delta;
308294
309
- if ((ypcm = voice->ypcm) == NULL)
295
+ ypcm = voice->ypcm;
296
+ if (!ypcm)
310297 return;
311298 if (ypcm->substream == NULL)
312299 return;
....@@ -414,7 +401,7 @@
414401 kctl = chip->pcm_mixer[substream->number].ctl;
415402 kctl->vd[0].access |= SNDRV_CTL_ELEM_ACCESS_INACTIVE;
416403 }
417
- /* fall through */
404
+ fallthrough;
418405 case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
419406 case SNDRV_PCM_TRIGGER_SUSPEND:
420407 chip->ctrl_playback[ypcm->voices[0]->number + 1] = 0;
....@@ -601,7 +588,7 @@
601588
602589 static int snd_ymfpci_ac3_init(struct snd_ymfpci *chip)
603590 {
604
- if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(chip->pci),
591
+ if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, &chip->pci->dev,
605592 4096, &chip->ac3_tmp_base) < 0)
606593 return -ENOMEM;
607594
....@@ -642,9 +629,8 @@
642629 struct snd_ymfpci_pcm *ypcm = runtime->private_data;
643630 int err;
644631
645
- if ((err = snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params))) < 0)
646
- return err;
647
- if ((err = snd_ymfpci_pcm_voice_alloc(ypcm, params_channels(hw_params))) < 0)
632
+ err = snd_ymfpci_pcm_voice_alloc(ypcm, params_channels(hw_params));
633
+ if (err < 0)
648634 return err;
649635 return 0;
650636 }
....@@ -661,7 +647,6 @@
661647
662648 /* wait, until the PCI operations are not finished */
663649 snd_ymfpci_irq_wait(chip);
664
- snd_pcm_lib_free_pages(substream);
665650 if (ypcm->voices[1]) {
666651 snd_ymfpci_voice_free(chip, ypcm->voices[1]);
667652 ypcm->voices[1] = NULL;
....@@ -697,19 +682,13 @@
697682 return 0;
698683 }
699684
700
-static int snd_ymfpci_capture_hw_params(struct snd_pcm_substream *substream,
701
- struct snd_pcm_hw_params *hw_params)
702
-{
703
- return snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params));
704
-}
705
-
706685 static int snd_ymfpci_capture_hw_free(struct snd_pcm_substream *substream)
707686 {
708687 struct snd_ymfpci *chip = snd_pcm_substream_chip(substream);
709688
710689 /* wait, until the PCI operations are not finished */
711690 snd_ymfpci_irq_wait(chip);
712
- return snd_pcm_lib_free_pages(substream);
691
+ return 0;
713692 }
714693
715694 static int snd_ymfpci_capture_prepare(struct snd_pcm_substream *substream)
....@@ -955,7 +934,8 @@
955934 struct snd_ymfpci_pcm *ypcm;
956935 int err;
957936
958
- if ((err = snd_ymfpci_playback_open_1(substream)) < 0)
937
+ err = snd_ymfpci_playback_open_1(substream);
938
+ if (err < 0)
959939 return err;
960940 ypcm = runtime->private_data;
961941 ypcm->output_front = 1;
....@@ -977,7 +957,8 @@
977957 struct snd_ymfpci_pcm *ypcm;
978958 int err;
979959
980
- if ((err = snd_ymfpci_playback_open_1(substream)) < 0)
960
+ err = snd_ymfpci_playback_open_1(substream);
961
+ if (err < 0)
981962 return err;
982963 ypcm = runtime->private_data;
983964 ypcm->output_front = 0;
....@@ -1005,7 +986,8 @@
1005986 struct snd_ymfpci_pcm *ypcm;
1006987 int err;
1007988
1008
- if ((err = snd_ymfpci_playback_open_1(substream)) < 0)
989
+ err = snd_ymfpci_playback_open_1(substream);
990
+ if (err < 0)
1009991 return err;
1010992 ypcm = runtime->private_data;
1011993 ypcm->output_front = 0;
....@@ -1126,7 +1108,6 @@
11261108 static const struct snd_pcm_ops snd_ymfpci_playback_ops = {
11271109 .open = snd_ymfpci_playback_open,
11281110 .close = snd_ymfpci_playback_close,
1129
- .ioctl = snd_pcm_lib_ioctl,
11301111 .hw_params = snd_ymfpci_playback_hw_params,
11311112 .hw_free = snd_ymfpci_playback_hw_free,
11321113 .prepare = snd_ymfpci_playback_prepare,
....@@ -1137,8 +1118,6 @@
11371118 static const struct snd_pcm_ops snd_ymfpci_capture_rec_ops = {
11381119 .open = snd_ymfpci_capture_rec_open,
11391120 .close = snd_ymfpci_capture_close,
1140
- .ioctl = snd_pcm_lib_ioctl,
1141
- .hw_params = snd_ymfpci_capture_hw_params,
11421121 .hw_free = snd_ymfpci_capture_hw_free,
11431122 .prepare = snd_ymfpci_capture_prepare,
11441123 .trigger = snd_ymfpci_capture_trigger,
....@@ -1150,7 +1129,8 @@
11501129 struct snd_pcm *pcm;
11511130 int err;
11521131
1153
- if ((err = snd_pcm_new(chip->card, "YMFPCI", device, 32, 1, &pcm)) < 0)
1132
+ err = snd_pcm_new(chip->card, "YMFPCI", device, 32, 1, &pcm);
1133
+ if (err < 0)
11541134 return err;
11551135 pcm->private_data = chip;
11561136
....@@ -1162,8 +1142,8 @@
11621142 strcpy(pcm->name, "YMFPCI");
11631143 chip->pcm = pcm;
11641144
1165
- snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
1166
- snd_dma_pci_data(chip->pci), 64*1024, 256*1024);
1145
+ snd_pcm_set_managed_buffer_all(pcm, SNDRV_DMA_TYPE_DEV,
1146
+ &chip->pci->dev, 64*1024, 256*1024);
11671147
11681148 return snd_pcm_add_chmap_ctls(pcm, SNDRV_PCM_STREAM_PLAYBACK,
11691149 snd_pcm_std_chmaps, 2, 0, NULL);
....@@ -1172,8 +1152,6 @@
11721152 static const struct snd_pcm_ops snd_ymfpci_capture_ac97_ops = {
11731153 .open = snd_ymfpci_capture_ac97_open,
11741154 .close = snd_ymfpci_capture_close,
1175
- .ioctl = snd_pcm_lib_ioctl,
1176
- .hw_params = snd_ymfpci_capture_hw_params,
11771155 .hw_free = snd_ymfpci_capture_hw_free,
11781156 .prepare = snd_ymfpci_capture_prepare,
11791157 .trigger = snd_ymfpci_capture_trigger,
....@@ -1185,7 +1163,8 @@
11851163 struct snd_pcm *pcm;
11861164 int err;
11871165
1188
- if ((err = snd_pcm_new(chip->card, "YMFPCI - PCM2", device, 0, 1, &pcm)) < 0)
1166
+ err = snd_pcm_new(chip->card, "YMFPCI - PCM2", device, 0, 1, &pcm);
1167
+ if (err < 0)
11891168 return err;
11901169 pcm->private_data = chip;
11911170
....@@ -1197,8 +1176,8 @@
11971176 chip->device_id == PCI_DEVICE_ID_YAMAHA_754 ? "Direct Recording" : "AC'97");
11981177 chip->pcm2 = pcm;
11991178
1200
- snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
1201
- snd_dma_pci_data(chip->pci), 64*1024, 256*1024);
1179
+ snd_pcm_set_managed_buffer_all(pcm, SNDRV_DMA_TYPE_DEV,
1180
+ &chip->pci->dev, 64*1024, 256*1024);
12021181
12031182 return 0;
12041183 }
....@@ -1206,7 +1185,6 @@
12061185 static const struct snd_pcm_ops snd_ymfpci_playback_spdif_ops = {
12071186 .open = snd_ymfpci_playback_spdif_open,
12081187 .close = snd_ymfpci_playback_spdif_close,
1209
- .ioctl = snd_pcm_lib_ioctl,
12101188 .hw_params = snd_ymfpci_playback_hw_params,
12111189 .hw_free = snd_ymfpci_playback_hw_free,
12121190 .prepare = snd_ymfpci_playback_prepare,
....@@ -1219,7 +1197,8 @@
12191197 struct snd_pcm *pcm;
12201198 int err;
12211199
1222
- if ((err = snd_pcm_new(chip->card, "YMFPCI - IEC958", device, 1, 0, &pcm)) < 0)
1200
+ err = snd_pcm_new(chip->card, "YMFPCI - IEC958", device, 1, 0, &pcm);
1201
+ if (err < 0)
12231202 return err;
12241203 pcm->private_data = chip;
12251204
....@@ -1230,8 +1209,8 @@
12301209 strcpy(pcm->name, "YMFPCI - IEC958");
12311210 chip->pcm_spdif = pcm;
12321211
1233
- snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
1234
- snd_dma_pci_data(chip->pci), 64*1024, 256*1024);
1212
+ snd_pcm_set_managed_buffer_all(pcm, SNDRV_DMA_TYPE_DEV,
1213
+ &chip->pci->dev, 64*1024, 256*1024);
12351214
12361215 return 0;
12371216 }
....@@ -1239,7 +1218,6 @@
12391218 static const struct snd_pcm_ops snd_ymfpci_playback_4ch_ops = {
12401219 .open = snd_ymfpci_playback_4ch_open,
12411220 .close = snd_ymfpci_playback_4ch_close,
1242
- .ioctl = snd_pcm_lib_ioctl,
12431221 .hw_params = snd_ymfpci_playback_hw_params,
12441222 .hw_free = snd_ymfpci_playback_hw_free,
12451223 .prepare = snd_ymfpci_playback_prepare,
....@@ -1260,7 +1238,8 @@
12601238 struct snd_pcm *pcm;
12611239 int err;
12621240
1263
- if ((err = snd_pcm_new(chip->card, "YMFPCI - Rear", device, 1, 0, &pcm)) < 0)
1241
+ err = snd_pcm_new(chip->card, "YMFPCI - Rear", device, 1, 0, &pcm);
1242
+ if (err < 0)
12641243 return err;
12651244 pcm->private_data = chip;
12661245
....@@ -1271,8 +1250,8 @@
12711250 strcpy(pcm->name, "YMFPCI - Rear PCM");
12721251 chip->pcm_4ch = pcm;
12731252
1274
- snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
1275
- snd_dma_pci_data(chip->pci), 64*1024, 256*1024);
1253
+ snd_pcm_set_managed_buffer_all(pcm, SNDRV_DMA_TYPE_DEV,
1254
+ &chip->pci->dev, 64*1024, 256*1024);
12761255
12771256 return snd_pcm_add_chmap_ctls(pcm, SNDRV_PCM_STREAM_PLAYBACK,
12781257 surround_map, 2, 0, NULL);
....@@ -1618,7 +1597,7 @@
16181597 .put = snd_ymfpci_put_dup4ch,
16191598 };
16201599
1621
-static struct snd_kcontrol_new snd_ymfpci_controls[] = {
1600
+static const struct snd_kcontrol_new snd_ymfpci_controls[] = {
16221601 {
16231602 .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
16241603 .name = "Wave Playback Volume",
....@@ -1810,12 +1789,13 @@
18101789 struct snd_pcm_substream *substream;
18111790 unsigned int idx;
18121791 int err;
1813
- static struct snd_ac97_bus_ops ops = {
1792
+ static const struct snd_ac97_bus_ops ops = {
18141793 .write = snd_ymfpci_codec_write,
18151794 .read = snd_ymfpci_codec_read,
18161795 };
18171796
1818
- if ((err = snd_ac97_bus(chip->card, 0, &ops, chip, &chip->ac97_bus)) < 0)
1797
+ err = snd_ac97_bus(chip->card, 0, &ops, chip, &chip->ac97_bus);
1798
+ if (err < 0)
18191799 return err;
18201800 chip->ac97_bus->private_free = snd_ymfpci_mixer_free_ac97_bus;
18211801 chip->ac97_bus->no_vra = 1; /* YMFPCI doesn't need VRA */
....@@ -1823,7 +1803,8 @@
18231803 memset(&ac97, 0, sizeof(ac97));
18241804 ac97.private_data = chip;
18251805 ac97.private_free = snd_ymfpci_mixer_free_ac97;
1826
- if ((err = snd_ac97_mixer(chip->ac97_bus, &ac97, &chip->ac97)) < 0)
1806
+ err = snd_ac97_mixer(chip->ac97_bus, &ac97, &chip->ac97);
1807
+ if (err < 0)
18271808 return err;
18281809
18291810 /* to be sure */
....@@ -1831,7 +1812,8 @@
18311812 AC97_EA_VRA|AC97_EA_VRM, 0);
18321813
18331814 for (idx = 0; idx < ARRAY_SIZE(snd_ymfpci_controls); idx++) {
1834
- if ((err = snd_ctl_add(chip->card, snd_ctl_new1(&snd_ymfpci_controls[idx], chip))) < 0)
1815
+ err = snd_ctl_add(chip->card, snd_ctl_new1(&snd_ymfpci_controls[idx], chip));
1816
+ if (err < 0)
18351817 return err;
18361818 }
18371819 if (chip->ac97->ext_id & AC97_EI_SDAC) {
....@@ -1844,27 +1826,37 @@
18441826 /* add S/PDIF control */
18451827 if (snd_BUG_ON(!chip->pcm_spdif))
18461828 return -ENXIO;
1847
- if ((err = snd_ctl_add(chip->card, kctl = snd_ctl_new1(&snd_ymfpci_spdif_default, chip))) < 0)
1829
+ kctl = snd_ctl_new1(&snd_ymfpci_spdif_default, chip);
1830
+ err = snd_ctl_add(chip->card, kctl);
1831
+ if (err < 0)
18481832 return err;
18491833 kctl->id.device = chip->pcm_spdif->device;
1850
- if ((err = snd_ctl_add(chip->card, kctl = snd_ctl_new1(&snd_ymfpci_spdif_mask, chip))) < 0)
1834
+ kctl = snd_ctl_new1(&snd_ymfpci_spdif_mask, chip);
1835
+ err = snd_ctl_add(chip->card, kctl);
1836
+ if (err < 0)
18511837 return err;
18521838 kctl->id.device = chip->pcm_spdif->device;
1853
- if ((err = snd_ctl_add(chip->card, kctl = snd_ctl_new1(&snd_ymfpci_spdif_stream, chip))) < 0)
1839
+ kctl = snd_ctl_new1(&snd_ymfpci_spdif_stream, chip);
1840
+ err = snd_ctl_add(chip->card, kctl);
1841
+ if (err < 0)
18541842 return err;
18551843 kctl->id.device = chip->pcm_spdif->device;
18561844 chip->spdif_pcm_ctl = kctl;
18571845
18581846 /* direct recording source */
1859
- if (chip->device_id == PCI_DEVICE_ID_YAMAHA_754 &&
1860
- (err = snd_ctl_add(chip->card, kctl = snd_ctl_new1(&snd_ymfpci_drec_source, chip))) < 0)
1861
- return err;
1847
+ if (chip->device_id == PCI_DEVICE_ID_YAMAHA_754) {
1848
+ kctl = snd_ctl_new1(&snd_ymfpci_drec_source, chip);
1849
+ err = snd_ctl_add(chip->card, kctl);
1850
+ if (err < 0)
1851
+ return err;
1852
+ }
18621853
18631854 /*
18641855 * shared rear/line-in
18651856 */
18661857 if (rear_switch) {
1867
- if ((err = snd_ctl_add(chip->card, snd_ctl_new1(&snd_ymfpci_rear_shared, chip))) < 0)
1858
+ err = snd_ctl_add(chip->card, snd_ctl_new1(&snd_ymfpci_rear_shared, chip));
1859
+ if (err < 0)
18681860 return err;
18691861 }
18701862
....@@ -1877,7 +1869,8 @@
18771869 kctl->id.device = chip->pcm->device;
18781870 kctl->id.subdevice = idx;
18791871 kctl->private_value = (unsigned long)substream;
1880
- if ((err = snd_ctl_add(chip->card, kctl)) < 0)
1872
+ err = snd_ctl_add(chip->card, kctl);
1873
+ if (err < 0)
18811874 return err;
18821875 chip->pcm_mixer[idx].left = 0x8000;
18831876 chip->pcm_mixer[idx].right = 0x8000;
....@@ -1938,7 +1931,7 @@
19381931 return 0;
19391932 }
19401933
1941
-static struct snd_timer_hardware snd_ymfpci_timer_hw = {
1934
+static const struct snd_timer_hardware snd_ymfpci_timer_hw = {
19421935 .flags = SNDRV_TIMER_HW_AUTO,
19431936 .resolution = 10417, /* 1 / 96 kHz = 10.41666...us */
19441937 .ticks = 0x10000,
....@@ -1958,7 +1951,8 @@
19581951 tid.card = chip->card->number;
19591952 tid.device = device;
19601953 tid.subdevice = 0;
1961
- if ((err = snd_timer_new(chip->card, "YMFPCI", &tid, &timer)) >= 0) {
1954
+ err = snd_timer_new(chip->card, "YMFPCI", &tid, &timer);
1955
+ if (err >= 0) {
19621956 strcpy(timer->name, "YMFPCI timer");
19631957 timer->private_data = chip;
19641958 timer->hw = snd_ymfpci_timer_hw;
....@@ -1985,11 +1979,7 @@
19851979
19861980 static int snd_ymfpci_proc_init(struct snd_card *card, struct snd_ymfpci *chip)
19871981 {
1988
- struct snd_info_entry *entry;
1989
-
1990
- if (! snd_card_proc_new(card, "ymfpci", &entry))
1991
- snd_info_set_text_ops(entry, chip, snd_ymfpci_proc_read);
1992
- return 0;
1982
+ return snd_card_ro_proc_new(card, "ymfpci", chip, snd_ymfpci_proc_read);
19931983 }
19941984
19951985 /*
....@@ -2126,7 +2116,7 @@
21262116 chip->work_size;
21272117 /* work_ptr must be aligned to 256 bytes, but it's already
21282118 covered with the kernel page allocation mechanism */
2129
- if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(chip->pci),
2119
+ if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, &chip->pci->dev,
21302120 size, &chip->work_ptr) < 0)
21312121 return -ENOMEM;
21322122 ptr = chip->work_ptr.area;
....@@ -2174,7 +2164,7 @@
21742164 chip->work_base = ptr;
21752165 chip->work_base_addr = ptr_addr;
21762166
2177
- snd_BUG_ON(ptr + chip->work_size !=
2167
+ snd_BUG_ON(ptr + PAGE_ALIGN(chip->work_size) !=
21782168 chip->work_ptr.area + chip->work_ptr.bytes);
21792169
21802170 snd_ymfpci_writel(chip, YDSXGR_PLAYCTRLBASE, chip->bank_base_playback_addr);
....@@ -2268,7 +2258,7 @@
22682258 }
22692259
22702260 #ifdef CONFIG_PM_SLEEP
2271
-static int saved_regs_index[] = {
2261
+static const int saved_regs_index[] = {
22722262 /* spdif */
22732263 YDSXGR_SPDIFOUTCTRL,
22742264 YDSXGR_SPDIFOUTSTATUS,
....@@ -2304,10 +2294,6 @@
23042294 unsigned int i;
23052295
23062296 snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
2307
- snd_pcm_suspend_all(chip->pcm);
2308
- snd_pcm_suspend_all(chip->pcm2);
2309
- snd_pcm_suspend_all(chip->pcm_spdif);
2310
- snd_pcm_suspend_all(chip->pcm_4ch);
23112297 snd_ac97_suspend(chip->ac97);
23122298 for (i = 0; i < YDSXGR_NUM_SAVED_REGS; i++)
23132299 chip->saved_regs[i] = snd_ymfpci_readl(chip, saved_regs_index[i]);
....@@ -2365,14 +2351,15 @@
23652351 {
23662352 struct snd_ymfpci *chip;
23672353 int err;
2368
- static struct snd_device_ops ops = {
2354
+ static const struct snd_device_ops ops = {
23692355 .dev_free = snd_ymfpci_dev_free,
23702356 };
23712357
23722358 *rchip = NULL;
23732359
23742360 /* enable PCI device */
2375
- if ((err = pci_enable_device(pci)) < 0)
2361
+ err = pci_enable_device(pci);
2362
+ if (err < 0)
23762363 return err;
23772364
23782365 chip = kzalloc(sizeof(*chip), GFP_KERNEL);
....@@ -2391,11 +2378,12 @@
23912378 chip->device_id = pci->device;
23922379 chip->rev = pci->revision;
23932380 chip->reg_area_phys = pci_resource_start(pci, 0);
2394
- chip->reg_area_virt = ioremap_nocache(chip->reg_area_phys, 0x8000);
2381
+ chip->reg_area_virt = ioremap(chip->reg_area_phys, 0x8000);
23952382 pci_set_master(pci);
23962383 chip->src441_used = -1;
23972384
2398
- if ((chip->res_reg_area = request_mem_region(chip->reg_area_phys, 0x8000, "YMFPCI")) == NULL) {
2385
+ chip->res_reg_area = request_mem_region(chip->reg_area_phys, 0x8000, "YMFPCI");
2386
+ if (!chip->res_reg_area) {
23992387 dev_err(chip->card->dev,
24002388 "unable to grab memory region 0x%lx-0x%lx\n",
24012389 chip->reg_area_phys, chip->reg_area_phys + 0x8000 - 1);
....@@ -2409,6 +2397,7 @@
24092397 goto free_chip;
24102398 }
24112399 chip->irq = pci->irq;
2400
+ card->sync_irq = chip->irq;
24122401
24132402 snd_ymfpci_aclink_reset(pci);
24142403 if (snd_ymfpci_codec_ready(chip, 0) < 0) {