aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-06-23 13:45:39 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-06-23 13:45:39 -0400
commitc488eef8154b36cce905624577183dc1fa8f6da0 (patch)
treee66d9e71e09d7213f9a35685283a5a65d11adfd1 /sound
parentcf9c1b92ae62ce71a8e861f02476724348defc6a (diff)
parent3f67f6693c82f1cb8edb233f9bd10fa06d27a193 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6: ALSA: hda - Make jack-plug notification selectable ALSA: ctxfi - Add PM support sound: seq_midi_event: fix decoding of (N)RPN events ALSA: hda - Add digital-mic support to ALC262 auto model ALSA: hda - Fix check of input source type for realtek codecs ALSA: hda - Add quirk for Sony VAIO Z21MN ALSA: hda - Get back Input Source for ALC262 toshiba-s06 model ALSA: hda - Fix unsigned comparison in patch_sigmatel.c ALSA: via82xx: add option to disable 500ms delay in snd_via82xx_codec_wait sound: fix check for return value in snd_pcm_hw_refine ALSA: ctxfi - Allow unknown PCI SSIDs ASoC: Blackfin: update the bf5xx_i2s_resume parameters ASoC: Blackfin: keep better track of SPORT configuration state
Diffstat (limited to 'sound')
-rw-r--r--sound/core/pcm_native.c2
-rw-r--r--sound/core/seq/seq_midi_event.c8
-rw-r--r--sound/pci/ctxfi/ctatc.c206
-rw-r--r--sound/pci/ctxfi/ctatc.h7
-rw-r--r--sound/pci/ctxfi/cthardware.h7
-rw-r--r--sound/pci/ctxfi/cthw20k1.c83
-rw-r--r--sound/pci/ctxfi/cthw20k2.c65
-rw-r--r--sound/pci/ctxfi/ctmixer.c92
-rw-r--r--sound/pci/ctxfi/ctmixer.h3
-rw-r--r--sound/pci/ctxfi/ctpcm.c4
-rw-r--r--sound/pci/ctxfi/xfi.c22
-rw-r--r--sound/pci/hda/Kconfig9
-rw-r--r--sound/pci/hda/patch_conexant.c4
-rw-r--r--sound/pci/hda/patch_realtek.c109
-rw-r--r--sound/pci/hda/patch_sigmatel.c10
-rw-r--r--sound/pci/via82xx.c6
-rw-r--r--sound/soc/blackfin/bf5xx-i2s.c10
17 files changed, 464 insertions, 183 deletions
diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c
index 84da3ba17c86..ac2150e0670d 100644
--- a/sound/core/pcm_native.c
+++ b/sound/core/pcm_native.c
@@ -320,7 +320,7 @@ int snd_pcm_hw_refine(struct snd_pcm_substream *substream,
320 snd_mask_max(&params->masks[SNDRV_PCM_HW_PARAM_CHANNELS])) { 320 snd_mask_max(&params->masks[SNDRV_PCM_HW_PARAM_CHANNELS])) {
321 changed = substream->ops->ioctl(substream, 321 changed = substream->ops->ioctl(substream,
322 SNDRV_PCM_IOCTL1_FIFO_SIZE, params); 322 SNDRV_PCM_IOCTL1_FIFO_SIZE, params);
323 if (params < 0) 323 if (changed < 0)
324 return changed; 324 return changed;
325 } 325 }
326 } 326 }
diff --git a/sound/core/seq/seq_midi_event.c b/sound/core/seq/seq_midi_event.c
index 8284f176a342..b5d6ea4904c0 100644
--- a/sound/core/seq/seq_midi_event.c
+++ b/sound/core/seq/seq_midi_event.c
@@ -504,10 +504,10 @@ static int extra_decode_xrpn(struct snd_midi_event *dev, unsigned char *buf,
504 if (dev->nostat && count < 12) 504 if (dev->nostat && count < 12)
505 return -ENOMEM; 505 return -ENOMEM;
506 cmd = MIDI_CMD_CONTROL|(ev->data.control.channel & 0x0f); 506 cmd = MIDI_CMD_CONTROL|(ev->data.control.channel & 0x0f);
507 bytes[0] = ev->data.control.param & 0x007f; 507 bytes[0] = (ev->data.control.param & 0x3f80) >> 7;
508 bytes[1] = (ev->data.control.param & 0x3f80) >> 7; 508 bytes[1] = ev->data.control.param & 0x007f;
509 bytes[2] = ev->data.control.value & 0x007f; 509 bytes[2] = (ev->data.control.value & 0x3f80) >> 7;
510 bytes[3] = (ev->data.control.value & 0x3f80) >> 7; 510 bytes[3] = ev->data.control.value & 0x007f;
511 if (cmd != dev->lastcmd && !dev->nostat) { 511 if (cmd != dev->lastcmd && !dev->nostat) {
512 if (count < 9) 512 if (count < 9)
513 return -ENOMEM; 513 return -ENOMEM;
diff --git a/sound/pci/ctxfi/ctatc.c b/sound/pci/ctxfi/ctatc.c
index b0adc8094009..a49c76647307 100644
--- a/sound/pci/ctxfi/ctatc.c
+++ b/sound/pci/ctxfi/ctatc.c
@@ -46,8 +46,6 @@ static struct snd_pci_quirk __devinitdata subsys_20k1_list[] = {
46 SND_PCI_QUIRK(PCI_VENDOR_ID_CREATIVE, 0x0031, "SB073x", CTSB073X), 46 SND_PCI_QUIRK(PCI_VENDOR_ID_CREATIVE, 0x0031, "SB073x", CTSB073X),
47 SND_PCI_QUIRK_MASK(PCI_VENDOR_ID_CREATIVE, 0xf000, 0x6000, 47 SND_PCI_QUIRK_MASK(PCI_VENDOR_ID_CREATIVE, 0xf000, 0x6000,
48 "UAA", CTUAA), 48 "UAA", CTUAA),
49 SND_PCI_QUIRK_VENDOR(PCI_VENDOR_ID_CREATIVE,
50 "Unknown", CT20K1_UNKNOWN),
51 { } /* terminator */ 49 { } /* terminator */
52}; 50};
53 51
@@ -67,13 +65,16 @@ static struct snd_pci_quirk __devinitdata subsys_20k2_list[] = {
67}; 65};
68 66
69static const char *ct_subsys_name[NUM_CTCARDS] = { 67static const char *ct_subsys_name[NUM_CTCARDS] = {
68 /* 20k1 models */
70 [CTSB055X] = "SB055x", 69 [CTSB055X] = "SB055x",
71 [CTSB073X] = "SB073x", 70 [CTSB073X] = "SB073x",
72 [CTSB0760] = "SB076x",
73 [CTUAA] = "UAA", 71 [CTUAA] = "UAA",
74 [CT20K1_UNKNOWN] = "Unknown", 72 [CT20K1_UNKNOWN] = "Unknown",
73 /* 20k2 models */
74 [CTSB0760] = "SB076x",
75 [CTHENDRIX] = "Hendrix", 75 [CTHENDRIX] = "Hendrix",
76 [CTSB0880] = "SB0880", 76 [CTSB0880] = "SB0880",
77 [CT20K2_UNKNOWN] = "Unknown",
77}; 78};
78 79
79static struct { 80static struct {
@@ -260,13 +261,8 @@ static int atc_pcm_playback_prepare(struct ct_atc *atc, struct ct_atc_pcm *apcm)
260 int device = apcm->substream->pcm->device; 261 int device = apcm->substream->pcm->device;
261 unsigned int pitch; 262 unsigned int pitch;
262 263
263 if (NULL != apcm->src) {
264 /* Prepared pcm playback */
265 return 0;
266 }
267
268 /* first release old resources */ 264 /* first release old resources */
269 atc->pcm_release_resources(atc, apcm); 265 atc_pcm_release_resources(atc, apcm);
270 266
271 /* Get SRC resource */ 267 /* Get SRC resource */
272 desc.multi = apcm->substream->runtime->channels; 268 desc.multi = apcm->substream->runtime->channels;
@@ -660,10 +656,7 @@ static int atc_pcm_capture_prepare(struct ct_atc *atc, struct ct_atc_pcm *apcm)
660 unsigned int pitch; 656 unsigned int pitch;
661 int mix_base = 0, imp_base = 0; 657 int mix_base = 0, imp_base = 0;
662 658
663 if (NULL != apcm->src) { 659 atc_pcm_release_resources(atc, apcm);
664 /* Prepared pcm capture */
665 return 0;
666 }
667 660
668 /* Get needed resources. */ 661 /* Get needed resources. */
669 err = atc_pcm_capture_get_resources(atc, apcm); 662 err = atc_pcm_capture_get_resources(atc, apcm);
@@ -866,7 +859,7 @@ spdif_passthru_playback_setup(struct ct_atc *atc, struct ct_atc_pcm *apcm)
866 struct dao *dao = container_of(atc->daios[SPDIFOO], struct dao, daio); 859 struct dao *dao = container_of(atc->daios[SPDIFOO], struct dao, daio);
867 unsigned int rate = apcm->substream->runtime->rate; 860 unsigned int rate = apcm->substream->runtime->rate;
868 unsigned int status; 861 unsigned int status;
869 int err; 862 int err = 0;
870 unsigned char iec958_con_fs; 863 unsigned char iec958_con_fs;
871 864
872 switch (rate) { 865 switch (rate) {
@@ -907,8 +900,7 @@ spdif_passthru_playback_prepare(struct ct_atc *atc, struct ct_atc_pcm *apcm)
907 int err; 900 int err;
908 int i; 901 int i;
909 902
910 if (NULL != apcm->src) 903 atc_pcm_release_resources(atc, apcm);
911 return 0;
912 904
913 /* Configure SPDIFOO and PLL to passthrough mode; 905 /* Configure SPDIFOO and PLL to passthrough mode;
914 * determine pll_rate. */ 906 * determine pll_rate. */
@@ -1115,32 +1107,20 @@ static int atc_spdif_out_passthru(struct ct_atc *atc, unsigned char state)
1115 return err; 1107 return err;
1116} 1108}
1117 1109
1118static int ct_atc_destroy(struct ct_atc *atc) 1110static int atc_release_resources(struct ct_atc *atc)
1119{ 1111{
1120 struct daio_mgr *daio_mgr; 1112 int i;
1121 struct dao *dao; 1113 struct daio_mgr *daio_mgr = NULL;
1122 struct dai *dai; 1114 struct dao *dao = NULL;
1123 struct daio *daio; 1115 struct dai *dai = NULL;
1124 struct sum_mgr *sum_mgr; 1116 struct daio *daio = NULL;
1125 struct src_mgr *src_mgr; 1117 struct sum_mgr *sum_mgr = NULL;
1126 struct srcimp_mgr *srcimp_mgr; 1118 struct src_mgr *src_mgr = NULL;
1127 struct srcimp *srcimp; 1119 struct srcimp_mgr *srcimp_mgr = NULL;
1128 struct ct_mixer *mixer; 1120 struct srcimp *srcimp = NULL;
1129 int i = 0; 1121 struct ct_mixer *mixer = NULL;
1130 1122
1131 if (NULL == atc) 1123 /* disconnect internal mixer objects */
1132 return 0;
1133
1134 if (atc->timer) {
1135 ct_timer_free(atc->timer);
1136 atc->timer = NULL;
1137 }
1138
1139 /* Stop hardware and disable all interrupts */
1140 if (NULL != atc->hw)
1141 ((struct hw *)atc->hw)->card_stop(atc->hw);
1142
1143 /* Destroy internal mixer objects */
1144 if (NULL != atc->mixer) { 1124 if (NULL != atc->mixer) {
1145 mixer = atc->mixer; 1125 mixer = atc->mixer;
1146 mixer->set_input_left(mixer, MIX_LINE_IN, NULL); 1126 mixer->set_input_left(mixer, MIX_LINE_IN, NULL);
@@ -1149,7 +1129,6 @@ static int ct_atc_destroy(struct ct_atc *atc)
1149 mixer->set_input_right(mixer, MIX_MIC_IN, NULL); 1129 mixer->set_input_right(mixer, MIX_MIC_IN, NULL);
1150 mixer->set_input_left(mixer, MIX_SPDIF_IN, NULL); 1130 mixer->set_input_left(mixer, MIX_SPDIF_IN, NULL);
1151 mixer->set_input_right(mixer, MIX_SPDIF_IN, NULL); 1131 mixer->set_input_right(mixer, MIX_SPDIF_IN, NULL);
1152 ct_mixer_destroy(atc->mixer);
1153 } 1132 }
1154 1133
1155 if (NULL != atc->daios) { 1134 if (NULL != atc->daios) {
@@ -1167,6 +1146,7 @@ static int ct_atc_destroy(struct ct_atc *atc)
1167 daio_mgr->put_daio(daio_mgr, daio); 1146 daio_mgr->put_daio(daio_mgr, daio);
1168 } 1147 }
1169 kfree(atc->daios); 1148 kfree(atc->daios);
1149 atc->daios = NULL;
1170 } 1150 }
1171 1151
1172 if (NULL != atc->pcm) { 1152 if (NULL != atc->pcm) {
@@ -1175,6 +1155,7 @@ static int ct_atc_destroy(struct ct_atc *atc)
1175 sum_mgr->put_sum(sum_mgr, atc->pcm[i]); 1155 sum_mgr->put_sum(sum_mgr, atc->pcm[i]);
1176 1156
1177 kfree(atc->pcm); 1157 kfree(atc->pcm);
1158 atc->pcm = NULL;
1178 } 1159 }
1179 1160
1180 if (NULL != atc->srcs) { 1161 if (NULL != atc->srcs) {
@@ -1183,6 +1164,7 @@ static int ct_atc_destroy(struct ct_atc *atc)
1183 src_mgr->put_src(src_mgr, atc->srcs[i]); 1164 src_mgr->put_src(src_mgr, atc->srcs[i]);
1184 1165
1185 kfree(atc->srcs); 1166 kfree(atc->srcs);
1167 atc->srcs = NULL;
1186 } 1168 }
1187 1169
1188 if (NULL != atc->srcimps) { 1170 if (NULL != atc->srcimps) {
@@ -1193,8 +1175,30 @@ static int ct_atc_destroy(struct ct_atc *atc)
1193 srcimp_mgr->put_srcimp(srcimp_mgr, atc->srcimps[i]); 1175 srcimp_mgr->put_srcimp(srcimp_mgr, atc->srcimps[i]);
1194 } 1176 }
1195 kfree(atc->srcimps); 1177 kfree(atc->srcimps);
1178 atc->srcimps = NULL;
1179 }
1180
1181 return 0;
1182}
1183
1184static int ct_atc_destroy(struct ct_atc *atc)
1185{
1186 int i = 0;
1187
1188 if (NULL == atc)
1189 return 0;
1190
1191 if (atc->timer) {
1192 ct_timer_free(atc->timer);
1193 atc->timer = NULL;
1196 } 1194 }
1197 1195
1196 atc_release_resources(atc);
1197
1198 /* Destroy internal mixer objects */
1199 if (NULL != atc->mixer)
1200 ct_mixer_destroy(atc->mixer);
1201
1198 for (i = 0; i < NUM_RSCTYP; i++) { 1202 for (i = 0; i < NUM_RSCTYP; i++) {
1199 if ((NULL != rsc_mgr_funcs[i].destroy) && 1203 if ((NULL != rsc_mgr_funcs[i].destroy) &&
1200 (NULL != atc->rsc_mgrs[i])) 1204 (NULL != atc->rsc_mgrs[i]))
@@ -1240,9 +1244,21 @@ static int __devinit atc_identify_card(struct ct_atc *atc)
1240 return -ENOENT; 1244 return -ENOENT;
1241 } 1245 }
1242 p = snd_pci_quirk_lookup(atc->pci, list); 1246 p = snd_pci_quirk_lookup(atc->pci, list);
1243 if (!p) 1247 if (p) {
1244 return -ENOENT; 1248 if (p->value < 0) {
1245 atc->model = p->value; 1249 printk(KERN_ERR "ctxfi: "
1250 "Device %04x:%04x is black-listed\n",
1251 atc->pci->subsystem_vendor,
1252 atc->pci->subsystem_device);
1253 return -ENOENT;
1254 }
1255 atc->model = p->value;
1256 } else {
1257 if (atc->chip_type == ATC20K1)
1258 atc->model = CT20K1_UNKNOWN;
1259 else
1260 atc->model = CT20K2_UNKNOWN;
1261 }
1246 atc->model_name = ct_subsys_name[atc->model]; 1262 atc->model_name = ct_subsys_name[atc->model];
1247 snd_printd("ctxfi: chip %s model %s (%04x:%04x) is found\n", 1263 snd_printd("ctxfi: chip %s model %s (%04x:%04x) is found\n",
1248 atc->chip_name, atc->model_name, 1264 atc->chip_name, atc->model_name,
@@ -1310,7 +1326,7 @@ static int __devinit atc_create_hw_devs(struct ct_atc *atc)
1310 return 0; 1326 return 0;
1311} 1327}
1312 1328
1313static int __devinit atc_get_resources(struct ct_atc *atc) 1329static int atc_get_resources(struct ct_atc *atc)
1314{ 1330{
1315 struct daio_desc da_desc = {0}; 1331 struct daio_desc da_desc = {0};
1316 struct daio_mgr *daio_mgr; 1332 struct daio_mgr *daio_mgr;
@@ -1407,16 +1423,10 @@ static int __devinit atc_get_resources(struct ct_atc *atc)
1407 atc->n_pcm++; 1423 atc->n_pcm++;
1408 } 1424 }
1409 1425
1410 err = ct_mixer_create(atc, (struct ct_mixer **)&atc->mixer);
1411 if (err) {
1412 printk(KERN_ERR "ctxfi: Failed to create mixer obj!!!\n");
1413 return err;
1414 }
1415
1416 return 0; 1426 return 0;
1417} 1427}
1418 1428
1419static void __devinit 1429static void
1420atc_connect_dai(struct src_mgr *src_mgr, struct dai *dai, 1430atc_connect_dai(struct src_mgr *src_mgr, struct dai *dai,
1421 struct src **srcs, struct srcimp **srcimps) 1431 struct src **srcs, struct srcimp **srcimps)
1422{ 1432{
@@ -1455,7 +1465,7 @@ atc_connect_dai(struct src_mgr *src_mgr, struct dai *dai,
1455 src_mgr->commit_write(src_mgr); /* Synchronously enable SRCs */ 1465 src_mgr->commit_write(src_mgr); /* Synchronously enable SRCs */
1456} 1466}
1457 1467
1458static void __devinit atc_connect_resources(struct ct_atc *atc) 1468static void atc_connect_resources(struct ct_atc *atc)
1459{ 1469{
1460 struct dai *dai; 1470 struct dai *dai;
1461 struct dao *dao; 1471 struct dao *dao;
@@ -1501,6 +1511,84 @@ static void __devinit atc_connect_resources(struct ct_atc *atc)
1501 } 1511 }
1502} 1512}
1503 1513
1514#ifdef CONFIG_PM
1515static int atc_suspend(struct ct_atc *atc, pm_message_t state)
1516{
1517 int i;
1518 struct hw *hw = atc->hw;
1519
1520 snd_power_change_state(atc->card, SNDRV_CTL_POWER_D3hot);
1521
1522 for (i = FRONT; i < NUM_PCMS; i++) {
1523 if (!atc->pcms[i])
1524 continue;
1525
1526 snd_pcm_suspend_all(atc->pcms[i]);
1527 }
1528
1529 atc_release_resources(atc);
1530
1531 hw->suspend(hw, state);
1532
1533 return 0;
1534}
1535
1536static int atc_hw_resume(struct ct_atc *atc)
1537{
1538 struct hw *hw = atc->hw;
1539 struct card_conf info = {0};
1540
1541 /* Re-initialize card hardware. */
1542 info.rsr = atc->rsr;
1543 info.msr = atc->msr;
1544 info.vm_pgt_phys = atc_get_ptp_phys(atc, 0);
1545 return hw->resume(hw, &info);
1546}
1547
1548static int atc_resources_resume(struct ct_atc *atc)
1549{
1550 struct ct_mixer *mixer;
1551 int err = 0;
1552
1553 /* Get resources */
1554 err = atc_get_resources(atc);
1555 if (err < 0) {
1556 atc_release_resources(atc);
1557 return err;
1558 }
1559
1560 /* Build topology */
1561 atc_connect_resources(atc);
1562
1563 mixer = atc->mixer;
1564 mixer->resume(mixer);
1565
1566 return 0;
1567}
1568
1569static int atc_resume(struct ct_atc *atc)
1570{
1571 int err = 0;
1572
1573 /* Do hardware resume. */
1574 err = atc_hw_resume(atc);
1575 if (err < 0) {
1576 printk(KERN_ERR "ctxfi: pci_enable_device failed, "
1577 "disabling device\n");
1578 snd_card_disconnect(atc->card);
1579 return err;
1580 }
1581
1582 err = atc_resources_resume(atc);
1583 if (err < 0)
1584 return err;
1585
1586 snd_power_change_state(atc->card, SNDRV_CTL_POWER_D0);
1587
1588 return 0;
1589}
1590#endif
1591
1504static struct ct_atc atc_preset __devinitdata = { 1592static struct ct_atc atc_preset __devinitdata = {
1505 .map_audio_buffer = ct_map_audio_buffer, 1593 .map_audio_buffer = ct_map_audio_buffer,
1506 .unmap_audio_buffer = ct_unmap_audio_buffer, 1594 .unmap_audio_buffer = ct_unmap_audio_buffer,
@@ -1529,6 +1617,10 @@ static struct ct_atc atc_preset __devinitdata = {
1529 .spdif_out_set_status = atc_spdif_out_set_status, 1617 .spdif_out_set_status = atc_spdif_out_set_status,
1530 .spdif_out_passthru = atc_spdif_out_passthru, 1618 .spdif_out_passthru = atc_spdif_out_passthru,
1531 .have_digit_io_switch = atc_have_digit_io_switch, 1619 .have_digit_io_switch = atc_have_digit_io_switch,
1620#ifdef CONFIG_PM
1621 .suspend = atc_suspend,
1622 .resume = atc_resume,
1623#endif
1532}; 1624};
1533 1625
1534/** 1626/**
@@ -1587,6 +1679,12 @@ int __devinit ct_atc_create(struct snd_card *card, struct pci_dev *pci,
1587 if (err < 0) 1679 if (err < 0)
1588 goto error1; 1680 goto error1;
1589 1681
1682 err = ct_mixer_create(atc, (struct ct_mixer **)&atc->mixer);
1683 if (err) {
1684 printk(KERN_ERR "ctxfi: Failed to create mixer obj!!!\n");
1685 goto error1;
1686 }
1687
1590 /* Get resources */ 1688 /* Get resources */
1591 err = atc_get_resources(atc); 1689 err = atc_get_resources(atc);
1592 if (err < 0) 1690 if (err < 0)
diff --git a/sound/pci/ctxfi/ctatc.h b/sound/pci/ctxfi/ctatc.h
index 9fe620ea5f3f..9fd8a5708943 100644
--- a/sound/pci/ctxfi/ctatc.h
+++ b/sound/pci/ctxfi/ctatc.h
@@ -136,6 +136,13 @@ struct ct_atc {
136 unsigned char n_pcm; 136 unsigned char n_pcm;
137 137
138 struct ct_timer *timer; 138 struct ct_timer *timer;
139
140#ifdef CONFIG_PM
141 int (*suspend)(struct ct_atc *atc, pm_message_t state);
142 int (*resume)(struct ct_atc *atc);
143#define NUM_PCMS (NUM_CTALSADEVS - 1)
144 struct snd_pcm *pcms[NUM_PCMS];
145#endif
139}; 146};
140 147
141 148
diff --git a/sound/pci/ctxfi/cthardware.h b/sound/pci/ctxfi/cthardware.h
index 4a8e04f090a4..af55405f5dec 100644
--- a/sound/pci/ctxfi/cthardware.h
+++ b/sound/pci/ctxfi/cthardware.h
@@ -30,13 +30,16 @@ enum CHIPTYP {
30enum CTCARDS { 30enum CTCARDS {
31 /* 20k1 models */ 31 /* 20k1 models */
32 CTSB055X, 32 CTSB055X,
33 CT20K1_MODEL_FIRST = CTSB055X,
33 CTSB073X, 34 CTSB073X,
34 CTUAA, 35 CTUAA,
35 CT20K1_UNKNOWN, 36 CT20K1_UNKNOWN,
36 /* 20k2 models */ 37 /* 20k2 models */
37 CTSB0760, 38 CTSB0760,
39 CT20K2_MODEL_FIRST = CTSB0760,
38 CTHENDRIX, 40 CTHENDRIX,
39 CTSB0880, 41 CTSB0880,
42 CT20K2_UNKNOWN,
40 NUM_CTCARDS /* This should always be the last */ 43 NUM_CTCARDS /* This should always be the last */
41}; 44};
42 45
@@ -61,6 +64,10 @@ struct hw {
61 int (*card_init)(struct hw *hw, struct card_conf *info); 64 int (*card_init)(struct hw *hw, struct card_conf *info);
62 int (*card_stop)(struct hw *hw); 65 int (*card_stop)(struct hw *hw);
63 int (*pll_init)(struct hw *hw, unsigned int rsr); 66 int (*pll_init)(struct hw *hw, unsigned int rsr);
67#ifdef CONFIG_PM
68 int (*suspend)(struct hw *hw, pm_message_t state);
69 int (*resume)(struct hw *hw, struct card_conf *info);
70#endif
64 int (*is_adc_source_selected)(struct hw *hw, enum ADCSRC source); 71 int (*is_adc_source_selected)(struct hw *hw, enum ADCSRC source);
65 int (*select_adc_source)(struct hw *hw, enum ADCSRC source); 72 int (*select_adc_source)(struct hw *hw, enum ADCSRC source);
66 int (*have_digit_io_switch)(struct hw *hw); 73 int (*have_digit_io_switch)(struct hw *hw);
diff --git a/sound/pci/ctxfi/cthw20k1.c b/sound/pci/ctxfi/cthw20k1.c
index cb69d9ddfbe3..ad3e1d144464 100644
--- a/sound/pci/ctxfi/cthw20k1.c
+++ b/sound/pci/ctxfi/cthw20k1.c
@@ -1911,9 +1911,17 @@ static int hw_card_start(struct hw *hw)
1911 goto error1; 1911 goto error1;
1912 } 1912 }
1913 1913
1914 err = pci_request_regions(pci, "XFi"); 1914 if (!hw->io_base) {
1915 if (err < 0) 1915 err = pci_request_regions(pci, "XFi");
1916 goto error1; 1916 if (err < 0)
1917 goto error1;
1918
1919 if (hw->model == CTUAA)
1920 hw->io_base = pci_resource_start(pci, 5);
1921 else
1922 hw->io_base = pci_resource_start(pci, 0);
1923
1924 }
1917 1925
1918 /* Switch to X-Fi mode from UAA mode if neeeded */ 1926 /* Switch to X-Fi mode from UAA mode if neeeded */
1919 if (hw->model == CTUAA) { 1927 if (hw->model == CTUAA) {
@@ -1921,18 +1929,17 @@ static int hw_card_start(struct hw *hw)
1921 if (err) 1929 if (err)
1922 goto error2; 1930 goto error2;
1923 1931
1924 hw->io_base = pci_resource_start(pci, 5);
1925 } else {
1926 hw->io_base = pci_resource_start(pci, 0);
1927 } 1932 }
1928 1933
1929 err = request_irq(pci->irq, ct_20k1_interrupt, IRQF_SHARED, 1934 if (hw->irq < 0) {
1930 "ctxfi", hw); 1935 err = request_irq(pci->irq, ct_20k1_interrupt, IRQF_SHARED,
1931 if (err < 0) { 1936 "ctxfi", hw);
1932 printk(KERN_ERR "XFi: Cannot get irq %d\n", pci->irq); 1937 if (err < 0) {
1933 goto error2; 1938 printk(KERN_ERR "XFi: Cannot get irq %d\n", pci->irq);
1939 goto error2;
1940 }
1941 hw->irq = pci->irq;
1934 } 1942 }
1935 hw->irq = pci->irq;
1936 1943
1937 pci_set_master(pci); 1944 pci_set_master(pci);
1938 1945
@@ -1948,6 +1955,15 @@ error1:
1948 1955
1949static int hw_card_stop(struct hw *hw) 1956static int hw_card_stop(struct hw *hw)
1950{ 1957{
1958 unsigned int data;
1959
1960 /* disable transport bus master and queueing of request */
1961 hw_write_20kx(hw, TRNCTL, 0x00);
1962
1963 /* disable pll */
1964 data = hw_read_20kx(hw, PLLCTL);
1965 hw_write_20kx(hw, PLLCTL, (data & (~(0x0F<<12))));
1966
1951 /* TODO: Disable interrupt and so on... */ 1967 /* TODO: Disable interrupt and so on... */
1952 if (hw->irq >= 0) 1968 if (hw->irq >= 0)
1953 synchronize_irq(hw->irq); 1969 synchronize_irq(hw->irq);
@@ -1987,11 +2003,9 @@ static int hw_card_init(struct hw *hw, struct card_conf *info)
1987 struct trn_conf trn_info = {0}; 2003 struct trn_conf trn_info = {0};
1988 2004
1989 /* Get PCI io port base address and do Hendrix switch if needed. */ 2005 /* Get PCI io port base address and do Hendrix switch if needed. */
1990 if (!hw->io_base) { 2006 err = hw_card_start(hw);
1991 err = hw_card_start(hw); 2007 if (err)
1992 if (err) 2008 return err;
1993 return err;
1994 }
1995 2009
1996 /* PLL init */ 2010 /* PLL init */
1997 err = hw_pll_init(hw, info->rsr); 2011 err = hw_pll_init(hw, info->rsr);
@@ -2064,6 +2078,37 @@ static int hw_card_init(struct hw *hw, struct card_conf *info)
2064 return 0; 2078 return 0;
2065} 2079}
2066 2080
2081#ifdef CONFIG_PM
2082static int hw_suspend(struct hw *hw, pm_message_t state)
2083{
2084 struct pci_dev *pci = hw->pci;
2085
2086 hw_card_stop(hw);
2087
2088 if (hw->model == CTUAA) {
2089 /* Switch to UAA config space. */
2090 pci_write_config_dword(pci, UAA_CFG_SPACE_FLAG, 0x0);
2091 }
2092
2093 pci_disable_device(pci);
2094 pci_save_state(pci);
2095 pci_set_power_state(pci, pci_choose_state(pci, state));
2096
2097 return 0;
2098}
2099
2100static int hw_resume(struct hw *hw, struct card_conf *info)
2101{
2102 struct pci_dev *pci = hw->pci;
2103
2104 pci_set_power_state(pci, PCI_D0);
2105 pci_restore_state(pci);
2106
2107 /* Re-initialize card hardware. */
2108 return hw_card_init(hw, info);
2109}
2110#endif
2111
2067static u32 hw_read_20kx(struct hw *hw, u32 reg) 2112static u32 hw_read_20kx(struct hw *hw, u32 reg)
2068{ 2113{
2069 u32 value; 2114 u32 value;
@@ -2128,6 +2173,10 @@ static struct hw ct20k1_preset __devinitdata = {
2128 .is_adc_source_selected = hw_is_adc_input_selected, 2173 .is_adc_source_selected = hw_is_adc_input_selected,
2129 .select_adc_source = hw_adc_input_select, 2174 .select_adc_source = hw_adc_input_select,
2130 .have_digit_io_switch = hw_have_digit_io_switch, 2175 .have_digit_io_switch = hw_have_digit_io_switch,
2176#ifdef CONFIG_PM
2177 .suspend = hw_suspend,
2178 .resume = hw_resume,
2179#endif
2131 2180
2132 .src_rsc_get_ctrl_blk = src_get_rsc_ctrl_blk, 2181 .src_rsc_get_ctrl_blk = src_get_rsc_ctrl_blk,
2133 .src_rsc_put_ctrl_blk = src_put_rsc_ctrl_blk, 2182 .src_rsc_put_ctrl_blk = src_put_rsc_ctrl_blk,
diff --git a/sound/pci/ctxfi/cthw20k2.c b/sound/pci/ctxfi/cthw20k2.c
index 4493a51c6b01..dec46d04b041 100644
--- a/sound/pci/ctxfi/cthw20k2.c
+++ b/sound/pci/ctxfi/cthw20k2.c
@@ -1860,16 +1860,18 @@ static int hw_card_start(struct hw *hw)
1860 goto error1; 1860 goto error1;
1861 } 1861 }
1862 1862
1863 err = pci_request_regions(pci, "XFi"); 1863 if (!hw->io_base) {
1864 if (err < 0) 1864 err = pci_request_regions(pci, "XFi");
1865 goto error1; 1865 if (err < 0)
1866 goto error1;
1866 1867
1867 hw->io_base = pci_resource_start(hw->pci, 2); 1868 hw->io_base = pci_resource_start(hw->pci, 2);
1868 hw->mem_base = (unsigned long)ioremap(hw->io_base, 1869 hw->mem_base = (unsigned long)ioremap(hw->io_base,
1869 pci_resource_len(hw->pci, 2)); 1870 pci_resource_len(hw->pci, 2));
1870 if (NULL == (void *)hw->mem_base) { 1871 if (NULL == (void *)hw->mem_base) {
1871 err = -ENOENT; 1872 err = -ENOENT;
1872 goto error2; 1873 goto error2;
1874 }
1873 } 1875 }
1874 1876
1875 /* Switch to 20k2 mode from UAA mode. */ 1877 /* Switch to 20k2 mode from UAA mode. */
@@ -1901,6 +1903,15 @@ error1:
1901 1903
1902static int hw_card_stop(struct hw *hw) 1904static int hw_card_stop(struct hw *hw)
1903{ 1905{
1906 unsigned int data;
1907
1908 /* disable transport bus master and queueing of request */
1909 hw_write_20kx(hw, TRANSPORT_CTL, 0x00);
1910
1911 /* disable pll */
1912 data = hw_read_20kx(hw, PLL_ENB);
1913 hw_write_20kx(hw, PLL_ENB, (data & (~0x07)));
1914
1904 /* TODO: Disable interrupt and so on... */ 1915 /* TODO: Disable interrupt and so on... */
1905 return 0; 1916 return 0;
1906} 1917}
@@ -1939,11 +1950,9 @@ static int hw_card_init(struct hw *hw, struct card_conf *info)
1939 1950
1940 /* Get PCI io port/memory base address and 1951 /* Get PCI io port/memory base address and
1941 * do 20kx core switch if needed. */ 1952 * do 20kx core switch if needed. */
1942 if (!hw->io_base) { 1953 err = hw_card_start(hw);
1943 err = hw_card_start(hw); 1954 if (err)
1944 if (err) 1955 return err;
1945 return err;
1946 }
1947 1956
1948 /* PLL init */ 1957 /* PLL init */
1949 err = hw_pll_init(hw, info->rsr); 1958 err = hw_pll_init(hw, info->rsr);
@@ -2006,6 +2015,32 @@ static int hw_card_init(struct hw *hw, struct card_conf *info)
2006 return 0; 2015 return 0;
2007} 2016}
2008 2017
2018#ifdef CONFIG_PM
2019static int hw_suspend(struct hw *hw, pm_message_t state)
2020{
2021 struct pci_dev *pci = hw->pci;
2022
2023 hw_card_stop(hw);
2024
2025 pci_disable_device(pci);
2026 pci_save_state(pci);
2027 pci_set_power_state(pci, pci_choose_state(pci, state));
2028
2029 return 0;
2030}
2031
2032static int hw_resume(struct hw *hw, struct card_conf *info)
2033{
2034 struct pci_dev *pci = hw->pci;
2035
2036 pci_set_power_state(pci, PCI_D0);
2037 pci_restore_state(pci);
2038
2039 /* Re-initialize card hardware. */
2040 return hw_card_init(hw, info);
2041}
2042#endif
2043
2009static u32 hw_read_20kx(struct hw *hw, u32 reg) 2044static u32 hw_read_20kx(struct hw *hw, u32 reg)
2010{ 2045{
2011 return readl((void *)(hw->mem_base + reg)); 2046 return readl((void *)(hw->mem_base + reg));
@@ -2025,6 +2060,10 @@ static struct hw ct20k2_preset __devinitdata = {
2025 .is_adc_source_selected = hw_is_adc_input_selected, 2060 .is_adc_source_selected = hw_is_adc_input_selected,
2026 .select_adc_source = hw_adc_input_select, 2061 .select_adc_source = hw_adc_input_select,
2027 .have_digit_io_switch = hw_have_digit_io_switch, 2062 .have_digit_io_switch = hw_have_digit_io_switch,
2063#ifdef CONFIG_PM
2064 .suspend = hw_suspend,
2065 .resume = hw_resume,
2066#endif
2028 2067
2029 .src_rsc_get_ctrl_blk = src_get_rsc_ctrl_blk, 2068 .src_rsc_get_ctrl_blk = src_get_rsc_ctrl_blk,
2030 .src_rsc_put_ctrl_blk = src_put_rsc_ctrl_blk, 2069 .src_rsc_put_ctrl_blk = src_put_rsc_ctrl_blk,
diff --git a/sound/pci/ctxfi/ctmixer.c b/sound/pci/ctxfi/ctmixer.c
index 666722d9de41..f26d7cd9db9f 100644
--- a/sound/pci/ctxfi/ctmixer.c
+++ b/sound/pci/ctxfi/ctmixer.c
@@ -462,6 +462,43 @@ do_digit_io_switch(struct ct_atc *atc, int state)
462 return; 462 return;
463} 463}
464 464
465static void do_switch(struct ct_atc *atc, enum CTALSA_MIXER_CTL type, int state)
466{
467 struct ct_mixer *mixer = atc->mixer;
468
469 /* Do changes in mixer. */
470 if ((SWH_CAPTURE_START <= type) && (SWH_CAPTURE_END >= type)) {
471 if (state) {
472 ct_mixer_recording_select(mixer,
473 get_amixer_index(type));
474 } else {
475 ct_mixer_recording_unselect(mixer,
476 get_amixer_index(type));
477 }
478 }
479 /* Do changes out of mixer. */
480 if (state && (MIXER_LINEIN_C_S == type || MIXER_MIC_C_S == type))
481 do_line_mic_switch(atc, type);
482 else if (MIXER_WAVEF_P_S == type)
483 atc->line_front_unmute(atc, state);
484 else if (MIXER_WAVES_P_S == type)
485 atc->line_surround_unmute(atc, state);
486 else if (MIXER_WAVEC_P_S == type)
487 atc->line_clfe_unmute(atc, state);
488 else if (MIXER_WAVER_P_S == type)
489 atc->line_rear_unmute(atc, state);
490 else if (MIXER_LINEIN_P_S == type)
491 atc->line_in_unmute(atc, state);
492 else if (MIXER_SPDIFO_P_S == type)
493 atc->spdif_out_unmute(atc, state);
494 else if (MIXER_SPDIFI_P_S == type)
495 atc->spdif_in_unmute(atc, state);
496 else if (MIXER_DIGITAL_IO_S == type)
497 do_digit_io_switch(atc, state);
498
499 return;
500}
501
465static int ct_alsa_mix_switch_info(struct snd_kcontrol *kcontrol, 502static int ct_alsa_mix_switch_info(struct snd_kcontrol *kcontrol,
466 struct snd_ctl_elem_info *uinfo) 503 struct snd_ctl_elem_info *uinfo)
467{ 504{
@@ -498,35 +535,7 @@ static int ct_alsa_mix_switch_put(struct snd_kcontrol *kcontrol,
498 return 0; 535 return 0;
499 536
500 set_switch_state(mixer, type, state); 537 set_switch_state(mixer, type, state);
501 /* Do changes in mixer. */ 538 do_switch(atc, type, state);
502 if ((SWH_CAPTURE_START <= type) && (SWH_CAPTURE_END >= type)) {
503 if (state) {
504 ct_mixer_recording_select(mixer,
505 get_amixer_index(type));
506 } else {
507 ct_mixer_recording_unselect(mixer,
508 get_amixer_index(type));
509 }
510 }
511 /* Do changes out of mixer. */
512 if (state && (MIXER_LINEIN_C_S == type || MIXER_MIC_C_S == type))
513 do_line_mic_switch(atc, type);
514 else if (MIXER_WAVEF_P_S == type)
515 atc->line_front_unmute(atc, state);
516 else if (MIXER_WAVES_P_S == type)
517 atc->line_surround_unmute(atc, state);
518 else if (MIXER_WAVEC_P_S == type)
519 atc->line_clfe_unmute(atc, state);
520 else if (MIXER_WAVER_P_S == type)
521 atc->line_rear_unmute(atc, state);
522 else if (MIXER_LINEIN_P_S == type)
523 atc->line_in_unmute(atc, state);
524 else if (MIXER_SPDIFO_P_S == type)
525 atc->spdif_out_unmute(atc, state);
526 else if (MIXER_SPDIFI_P_S == type)
527 atc->spdif_in_unmute(atc, state);
528 else if (MIXER_DIGITAL_IO_S == type)
529 do_digit_io_switch(atc, state);
530 539
531 return 1; 540 return 1;
532} 541}
@@ -1039,6 +1048,28 @@ mixer_set_input_right(struct ct_mixer *mixer,
1039 return 0; 1048 return 0;
1040} 1049}
1041 1050
1051#ifdef CONFIG_PM
1052static int mixer_resume(struct ct_mixer *mixer)
1053{
1054 int i, state;
1055 struct amixer *amixer;
1056
1057 /* resume topology and volume gain. */
1058 for (i = 0; i < NUM_CT_AMIXERS*CHN_NUM; i++) {
1059 amixer = mixer->amixers[i];
1060 amixer->ops->commit_write(amixer);
1061 }
1062
1063 /* resume switch state. */
1064 for (i = SWH_MIXER_START; i <= SWH_MIXER_END; i++) {
1065 state = get_switch_state(mixer, i);
1066 do_switch(mixer->atc, i, state);
1067 }
1068
1069 return 0;
1070}
1071#endif
1072
1042int ct_mixer_destroy(struct ct_mixer *mixer) 1073int ct_mixer_destroy(struct ct_mixer *mixer)
1043{ 1074{
1044 struct sum_mgr *sum_mgr = (struct sum_mgr *)mixer->atc->rsc_mgrs[SUM]; 1075 struct sum_mgr *sum_mgr = (struct sum_mgr *)mixer->atc->rsc_mgrs[SUM];
@@ -1087,6 +1118,9 @@ int ct_mixer_create(struct ct_atc *atc, struct ct_mixer **rmixer)
1087 mixer->get_output_ports = mixer_get_output_ports; 1118 mixer->get_output_ports = mixer_get_output_ports;
1088 mixer->set_input_left = mixer_set_input_left; 1119 mixer->set_input_left = mixer_set_input_left;
1089 mixer->set_input_right = mixer_set_input_right; 1120 mixer->set_input_right = mixer_set_input_right;
1121#ifdef CONFIG_PM
1122 mixer->resume = mixer_resume;
1123#endif
1090 1124
1091 /* Allocate chip resources for mixer obj */ 1125 /* Allocate chip resources for mixer obj */
1092 err = ct_mixer_get_resources(mixer); 1126 err = ct_mixer_get_resources(mixer);
diff --git a/sound/pci/ctxfi/ctmixer.h b/sound/pci/ctxfi/ctmixer.h
index e2d96ebde746..b009e989e77d 100644
--- a/sound/pci/ctxfi/ctmixer.h
+++ b/sound/pci/ctxfi/ctmixer.h
@@ -56,6 +56,9 @@ struct ct_mixer {
56 enum MIXER_PORT_T type, struct rsc *rsc); 56 enum MIXER_PORT_T type, struct rsc *rsc);
57 int (*set_input_right)(struct ct_mixer *mixer, 57 int (*set_input_right)(struct ct_mixer *mixer,
58 enum MIXER_PORT_T type, struct rsc *rsc); 58 enum MIXER_PORT_T type, struct rsc *rsc);
59#ifdef CONFIG_PM
60 int (*resume)(struct ct_mixer *mixer);
61#endif
59}; 62};
60 63
61int ct_alsa_mix_create(struct ct_atc *atc, 64int ct_alsa_mix_create(struct ct_atc *atc,
diff --git a/sound/pci/ctxfi/ctpcm.c b/sound/pci/ctxfi/ctpcm.c
index 9e5c0c4da726..60ea23180acb 100644
--- a/sound/pci/ctxfi/ctpcm.c
+++ b/sound/pci/ctxfi/ctpcm.c
@@ -422,5 +422,9 @@ int ct_alsa_pcm_create(struct ct_atc *atc,
422 snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV_SG, 422 snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV_SG,
423 snd_dma_pci_data(atc->pci), 128*1024, 128*1024); 423 snd_dma_pci_data(atc->pci), 128*1024, 128*1024);
424 424
425#ifdef CONFIG_PM
426 atc->pcms[device] = pcm;
427#endif
428
425 return 0; 429 return 0;
426} 430}
diff --git a/sound/pci/ctxfi/xfi.c b/sound/pci/ctxfi/xfi.c
index 2d3dd89af151..76541748e7bc 100644
--- a/sound/pci/ctxfi/xfi.c
+++ b/sound/pci/ctxfi/xfi.c
@@ -121,11 +121,33 @@ static void __devexit ct_card_remove(struct pci_dev *pci)
121 pci_set_drvdata(pci, NULL); 121 pci_set_drvdata(pci, NULL);
122} 122}
123 123
124#ifdef CONFIG_PM
125static int ct_card_suspend(struct pci_dev *pci, pm_message_t state)
126{
127 struct snd_card *card = pci_get_drvdata(pci);
128 struct ct_atc *atc = card->private_data;
129
130 return atc->suspend(atc, state);
131}
132
133static int ct_card_resume(struct pci_dev *pci)
134{
135 struct snd_card *card = pci_get_drvdata(pci);
136 struct ct_atc *atc = card->private_data;
137
138 return atc->resume(atc);
139}
140#endif
141
124static struct pci_driver ct_driver = { 142static struct pci_driver ct_driver = {
125 .name = "SB-XFi", 143 .name = "SB-XFi",
126 .id_table = ct_pci_dev_ids, 144 .id_table = ct_pci_dev_ids,
127 .probe = ct_card_probe, 145 .probe = ct_card_probe,
128 .remove = __devexit_p(ct_card_remove), 146 .remove = __devexit_p(ct_card_remove),
147#ifdef CONFIG_PM
148 .suspend = ct_card_suspend,
149 .resume = ct_card_resume,
150#endif
129}; 151};
130 152
131static int __init ct_card_init(void) 153static int __init ct_card_init(void)
diff --git a/sound/pci/hda/Kconfig b/sound/pci/hda/Kconfig
index c710150d5065..04438f1d682d 100644
--- a/sound/pci/hda/Kconfig
+++ b/sound/pci/hda/Kconfig
@@ -2,7 +2,6 @@ menuconfig SND_HDA_INTEL
2 tristate "Intel HD Audio" 2 tristate "Intel HD Audio"
3 select SND_PCM 3 select SND_PCM
4 select SND_VMASTER 4 select SND_VMASTER
5 select SND_JACK if INPUT=y || INPUT=SND
6 help 5 help
7 Say Y here to include support for Intel "High Definition 6 Say Y here to include support for Intel "High Definition
8 Audio" (Azalia) and its compatible devices. 7 Audio" (Azalia) and its compatible devices.
@@ -39,6 +38,14 @@ config SND_HDA_INPUT_BEEP
39 Say Y here to build a digital beep interface for HD-audio 38 Say Y here to build a digital beep interface for HD-audio
40 driver. This interface is used to generate digital beeps. 39 driver. This interface is used to generate digital beeps.
41 40
41config SND_HDA_INPUT_JACK
42 bool "Support jack plugging notification via input layer"
43 depends on INPUT=y || INPUT=SND_HDA_INTEL
44 select SND_JACK
45 help
46 Say Y here to enable the jack plugging notification via
47 input layer.
48
42config SND_HDA_CODEC_REALTEK 49config SND_HDA_CODEC_REALTEK
43 bool "Build Realtek HD-audio codec support" 50 bool "Build Realtek HD-audio codec support"
44 default y 51 default y
diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c
index 4fcbe21829ab..ac868c59f9e3 100644
--- a/sound/pci/hda/patch_conexant.c
+++ b/sound/pci/hda/patch_conexant.c
@@ -349,7 +349,7 @@ static int conexant_mux_enum_put(struct snd_kcontrol *kcontrol,
349 &spec->cur_mux[adc_idx]); 349 &spec->cur_mux[adc_idx]);
350} 350}
351 351
352#ifdef CONFIG_SND_JACK 352#ifdef CONFIG_SND_HDA_INPUT_JACK
353static void conexant_free_jack_priv(struct snd_jack *jack) 353static void conexant_free_jack_priv(struct snd_jack *jack)
354{ 354{
355 struct conexant_jack *jacks = jack->private_data; 355 struct conexant_jack *jacks = jack->private_data;
@@ -463,7 +463,7 @@ static int conexant_init(struct hda_codec *codec)
463 463
464static void conexant_free(struct hda_codec *codec) 464static void conexant_free(struct hda_codec *codec)
465{ 465{
466#ifdef CONFIG_SND_JACK 466#ifdef CONFIG_SND_HDA_INPUT_JACK
467 struct conexant_spec *spec = codec->spec; 467 struct conexant_spec *spec = codec->spec;
468 if (spec->jacks.list) { 468 if (spec->jacks.list) {
469 struct conexant_jack *jacks = spec->jacks.list; 469 struct conexant_jack *jacks = spec->jacks.list;
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index bf4b78a74a8f..334533197425 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -250,13 +250,6 @@ enum {
250 ALC883_MODEL_LAST, 250 ALC883_MODEL_LAST,
251}; 251};
252 252
253/* styles of capture selection */
254enum {
255 CAPT_MUX = 0, /* only mux based */
256 CAPT_MIX, /* only mixer based */
257 CAPT_1MUX_MIX, /* first mux and other mixers */
258};
259
260/* for GPIO Poll */ 253/* for GPIO Poll */
261#define GPIO_MASK 0x03 254#define GPIO_MASK 0x03
262 255
@@ -306,7 +299,6 @@ struct alc_spec {
306 hda_nid_t *adc_nids; 299 hda_nid_t *adc_nids;
307 hda_nid_t *capsrc_nids; 300 hda_nid_t *capsrc_nids;
308 hda_nid_t dig_in_nid; /* digital-in NID; optional */ 301 hda_nid_t dig_in_nid; /* digital-in NID; optional */
309 int capture_style; /* capture style (CAPT_*) */
310 302
311 /* capture source */ 303 /* capture source */
312 unsigned int num_mux_defs; 304 unsigned int num_mux_defs;
@@ -420,12 +412,13 @@ static int alc_mux_enum_put(struct snd_kcontrol *kcontrol,
420 unsigned int mux_idx; 412 unsigned int mux_idx;
421 hda_nid_t nid = spec->capsrc_nids ? 413 hda_nid_t nid = spec->capsrc_nids ?
422 spec->capsrc_nids[adc_idx] : spec->adc_nids[adc_idx]; 414 spec->capsrc_nids[adc_idx] : spec->adc_nids[adc_idx];
415 unsigned int type;
423 416
424 mux_idx = adc_idx >= spec->num_mux_defs ? 0 : adc_idx; 417 mux_idx = adc_idx >= spec->num_mux_defs ? 0 : adc_idx;
425 imux = &spec->input_mux[mux_idx]; 418 imux = &spec->input_mux[mux_idx];
426 419
427 if (spec->capture_style && 420 type = (get_wcaps(codec, nid) & AC_WCAP_TYPE) >> AC_WCAP_TYPE_SHIFT;
428 !(spec->capture_style == CAPT_1MUX_MIX && !adc_idx)) { 421 if (type == AC_WID_AUD_MIX) {
429 /* Matrix-mixer style (e.g. ALC882) */ 422 /* Matrix-mixer style (e.g. ALC882) */
430 unsigned int *cur_val = &spec->cur_mux[adc_idx]; 423 unsigned int *cur_val = &spec->cur_mux[adc_idx];
431 unsigned int i, idx; 424 unsigned int i, idx;
@@ -7557,7 +7550,6 @@ static int patch_alc882(struct hda_codec *codec)
7557 spec->stream_digital_playback = &alc882_pcm_digital_playback; 7550 spec->stream_digital_playback = &alc882_pcm_digital_playback;
7558 spec->stream_digital_capture = &alc882_pcm_digital_capture; 7551 spec->stream_digital_capture = &alc882_pcm_digital_capture;
7559 7552
7560 spec->capture_style = CAPT_MIX; /* matrix-style capture */
7561 if (!spec->adc_nids && spec->input_mux) { 7553 if (!spec->adc_nids && spec->input_mux) {
7562 /* check whether NID 0x07 is valid */ 7554 /* check whether NID 0x07 is valid */
7563 unsigned int wcap = get_wcaps(codec, 0x07); 7555 unsigned int wcap = get_wcaps(codec, 0x07);
@@ -9781,7 +9773,6 @@ static int patch_alc883(struct hda_codec *codec)
9781 } 9773 }
9782 if (!spec->capsrc_nids) 9774 if (!spec->capsrc_nids)
9783 spec->capsrc_nids = alc883_capsrc_nids; 9775 spec->capsrc_nids = alc883_capsrc_nids;
9784 spec->capture_style = CAPT_MIX; /* matrix-style capture */
9785 spec->init_amp = ALC_INIT_DEFAULT; /* always initialize */ 9776 spec->init_amp = ALC_INIT_DEFAULT; /* always initialize */
9786 break; 9777 break;
9787 case 0x10ec0889: 9778 case 0x10ec0889:
@@ -9791,8 +9782,6 @@ static int patch_alc883(struct hda_codec *codec)
9791 } 9782 }
9792 if (!spec->capsrc_nids) 9783 if (!spec->capsrc_nids)
9793 spec->capsrc_nids = alc889_capsrc_nids; 9784 spec->capsrc_nids = alc889_capsrc_nids;
9794 spec->capture_style = CAPT_1MUX_MIX; /* 1mux/Nmix-style
9795 capture */
9796 break; 9785 break;
9797 default: 9786 default:
9798 if (!spec->num_adc_nids) { 9787 if (!spec->num_adc_nids) {
@@ -9801,7 +9790,6 @@ static int patch_alc883(struct hda_codec *codec)
9801 } 9790 }
9802 if (!spec->capsrc_nids) 9791 if (!spec->capsrc_nids)
9803 spec->capsrc_nids = alc883_capsrc_nids; 9792 spec->capsrc_nids = alc883_capsrc_nids;
9804 spec->capture_style = CAPT_MIX; /* matrix-style capture */
9805 break; 9793 break;
9806 } 9794 }
9807 9795
@@ -10913,9 +10901,27 @@ static int alc262_auto_create_multi_out_ctls(struct alc_spec *spec,
10913 return 0; 10901 return 0;
10914} 10902}
10915 10903
10916/* identical with ALC880 */ 10904static int alc262_auto_create_analog_input_ctls(struct alc_spec *spec,
10917#define alc262_auto_create_analog_input_ctls \ 10905 const struct auto_pin_cfg *cfg)
10918 alc880_auto_create_analog_input_ctls 10906{
10907 int err;
10908
10909 err = alc880_auto_create_analog_input_ctls(spec, cfg);
10910 if (err < 0)
10911 return err;
10912 /* digital-mic input pin is excluded in alc880_auto_create..()
10913 * because it's under 0x18
10914 */
10915 if (cfg->input_pins[AUTO_PIN_MIC] == 0x12 ||
10916 cfg->input_pins[AUTO_PIN_FRONT_MIC] == 0x12) {
10917 struct hda_input_mux *imux = &spec->private_imux[0];
10918 imux->items[imux->num_items].label = "Int Mic";
10919 imux->items[imux->num_items].index = 0x09;
10920 imux->num_items++;
10921 }
10922 return 0;
10923}
10924
10919 10925
10920/* 10926/*
10921 * generic initialization of ADC, input mixers and output mixers 10927 * generic initialization of ADC, input mixers and output mixers
@@ -11332,6 +11338,7 @@ static struct snd_pci_quirk alc262_cfg_tbl[] = {
11332 SND_PCI_QUIRK(0x104d, 0x8203, "Sony UX-90", ALC262_HIPPO), 11338 SND_PCI_QUIRK(0x104d, 0x8203, "Sony UX-90", ALC262_HIPPO),
11333 SND_PCI_QUIRK(0x104d, 0x820f, "Sony ASSAMD", ALC262_SONY_ASSAMD), 11339 SND_PCI_QUIRK(0x104d, 0x820f, "Sony ASSAMD", ALC262_SONY_ASSAMD),
11334 SND_PCI_QUIRK(0x104d, 0x9016, "Sony VAIO", ALC262_AUTO), /* dig-only */ 11340 SND_PCI_QUIRK(0x104d, 0x9016, "Sony VAIO", ALC262_AUTO), /* dig-only */
11341 SND_PCI_QUIRK(0x104d, 0x9025, "Sony VAIO Z21MN", ALC262_TOSHIBA_S06),
11335 SND_PCI_QUIRK_MASK(0x104d, 0xff00, 0x9000, "Sony VAIO", 11342 SND_PCI_QUIRK_MASK(0x104d, 0xff00, 0x9000, "Sony VAIO",
11336 ALC262_SONY_ASSAMD), 11343 ALC262_SONY_ASSAMD),
11337 SND_PCI_QUIRK(0x1179, 0x0001, "Toshiba dynabook SS RX1", 11344 SND_PCI_QUIRK(0x1179, 0x0001, "Toshiba dynabook SS RX1",
@@ -11539,6 +11546,7 @@ static struct alc_config_preset alc262_presets[] = {
11539 .capsrc_nids = alc262_dmic_capsrc_nids, 11546 .capsrc_nids = alc262_dmic_capsrc_nids,
11540 .dac_nids = alc262_dac_nids, 11547 .dac_nids = alc262_dac_nids,
11541 .adc_nids = alc262_dmic_adc_nids, /* ADC0 */ 11548 .adc_nids = alc262_dmic_adc_nids, /* ADC0 */
11549 .num_adc_nids = 1, /* single ADC */
11542 .dig_out_nid = ALC262_DIGOUT_NID, 11550 .dig_out_nid = ALC262_DIGOUT_NID,
11543 .num_channel_mode = ARRAY_SIZE(alc262_modes), 11551 .num_channel_mode = ARRAY_SIZE(alc262_modes),
11544 .channel_mode = alc262_modes, 11552 .channel_mode = alc262_modes,
@@ -11640,21 +11648,36 @@ static int patch_alc262(struct hda_codec *codec)
11640 spec->stream_digital_playback = &alc262_pcm_digital_playback; 11648 spec->stream_digital_playback = &alc262_pcm_digital_playback;
11641 spec->stream_digital_capture = &alc262_pcm_digital_capture; 11649 spec->stream_digital_capture = &alc262_pcm_digital_capture;
11642 11650
11643 spec->capture_style = CAPT_MIX;
11644 if (!spec->adc_nids && spec->input_mux) { 11651 if (!spec->adc_nids && spec->input_mux) {
11645 /* check whether NID 0x07 is valid */ 11652 int i;
11646 unsigned int wcap = get_wcaps(codec, 0x07); 11653 /* check whether the digital-mic has to be supported */
11647 11654 for (i = 0; i < spec->input_mux->num_items; i++) {
11648 /* get type */ 11655 if (spec->input_mux->items[i].index >= 9)
11649 wcap = (wcap & AC_WCAP_TYPE) >> AC_WCAP_TYPE_SHIFT; 11656 break;
11650 if (wcap != AC_WID_AUD_IN) { 11657 }
11651 spec->adc_nids = alc262_adc_nids_alt; 11658 if (i < spec->input_mux->num_items) {
11652 spec->num_adc_nids = ARRAY_SIZE(alc262_adc_nids_alt); 11659 /* use only ADC0 */
11653 spec->capsrc_nids = alc262_capsrc_nids_alt; 11660 spec->adc_nids = alc262_dmic_adc_nids;
11661 spec->num_adc_nids = 1;
11662 spec->capsrc_nids = alc262_dmic_capsrc_nids;
11654 } else { 11663 } else {
11655 spec->adc_nids = alc262_adc_nids; 11664 /* all analog inputs */
11656 spec->num_adc_nids = ARRAY_SIZE(alc262_adc_nids); 11665 /* check whether NID 0x07 is valid */
11657 spec->capsrc_nids = alc262_capsrc_nids; 11666 unsigned int wcap = get_wcaps(codec, 0x07);
11667
11668 /* get type */
11669 wcap = (wcap & AC_WCAP_TYPE) >> AC_WCAP_TYPE_SHIFT;
11670 if (wcap != AC_WID_AUD_IN) {
11671 spec->adc_nids = alc262_adc_nids_alt;
11672 spec->num_adc_nids =
11673 ARRAY_SIZE(alc262_adc_nids_alt);
11674 spec->capsrc_nids = alc262_capsrc_nids_alt;
11675 } else {
11676 spec->adc_nids = alc262_adc_nids;
11677 spec->num_adc_nids =
11678 ARRAY_SIZE(alc262_adc_nids);
11679 spec->capsrc_nids = alc262_capsrc_nids;
11680 }
11658 } 11681 }
11659 } 11682 }
11660 if (!spec->cap_mixer && !spec->no_analog) 11683 if (!spec->cap_mixer && !spec->no_analog)
@@ -13244,26 +13267,8 @@ static int alc269_auto_create_multi_out_ctls(struct alc_spec *spec,
13244 return 0; 13267 return 0;
13245} 13268}
13246 13269
13247static int alc269_auto_create_analog_input_ctls(struct alc_spec *spec, 13270#define alc269_auto_create_analog_input_ctls \
13248 const struct auto_pin_cfg *cfg) 13271 alc262_auto_create_analog_input_ctls
13249{
13250 int err;
13251
13252 err = alc880_auto_create_analog_input_ctls(spec, cfg);
13253 if (err < 0)
13254 return err;
13255 /* digital-mic input pin is excluded in alc880_auto_create..()
13256 * because it's under 0x18
13257 */
13258 if (cfg->input_pins[AUTO_PIN_MIC] == 0x12 ||
13259 cfg->input_pins[AUTO_PIN_FRONT_MIC] == 0x12) {
13260 struct hda_input_mux *imux = &spec->private_imux[0];
13261 imux->items[imux->num_items].label = "Int Mic";
13262 imux->items[imux->num_items].index = 0x05;
13263 imux->num_items++;
13264 }
13265 return 0;
13266}
13267 13272
13268#ifdef CONFIG_SND_HDA_POWER_SAVE 13273#ifdef CONFIG_SND_HDA_POWER_SAVE
13269#define alc269_loopbacks alc880_loopbacks 13274#define alc269_loopbacks alc880_loopbacks
@@ -15554,7 +15559,6 @@ static int patch_alc861vd(struct hda_codec *codec)
15554 spec->adc_nids = alc861vd_adc_nids; 15559 spec->adc_nids = alc861vd_adc_nids;
15555 spec->num_adc_nids = ARRAY_SIZE(alc861vd_adc_nids); 15560 spec->num_adc_nids = ARRAY_SIZE(alc861vd_adc_nids);
15556 spec->capsrc_nids = alc861vd_capsrc_nids; 15561 spec->capsrc_nids = alc861vd_capsrc_nids;
15557 spec->capture_style = CAPT_MIX;
15558 15562
15559 set_capture_mixer(spec); 15563 set_capture_mixer(spec);
15560 set_beep_amp(spec, 0x0b, 0x05, HDA_INPUT); 15564 set_beep_amp(spec, 0x0b, 0x05, HDA_INPUT);
@@ -17474,7 +17478,6 @@ static int patch_alc662(struct hda_codec *codec)
17474 spec->adc_nids = alc662_adc_nids; 17478 spec->adc_nids = alc662_adc_nids;
17475 spec->num_adc_nids = ARRAY_SIZE(alc662_adc_nids); 17479 spec->num_adc_nids = ARRAY_SIZE(alc662_adc_nids);
17476 spec->capsrc_nids = alc662_capsrc_nids; 17480 spec->capsrc_nids = alc662_capsrc_nids;
17477 spec->capture_style = CAPT_MIX;
17478 17481
17479 if (!spec->cap_mixer) 17482 if (!spec->cap_mixer)
17480 set_capture_mixer(spec); 17483 set_capture_mixer(spec);
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
index 93e47c96a38b..14f3c3e0f62d 100644
--- a/sound/pci/hda/patch_sigmatel.c
+++ b/sound/pci/hda/patch_sigmatel.c
@@ -639,7 +639,7 @@ static int stac92xx_smux_enum_put(struct snd_kcontrol *kcontrol,
639static unsigned int stac92xx_vref_set(struct hda_codec *codec, 639static unsigned int stac92xx_vref_set(struct hda_codec *codec,
640 hda_nid_t nid, unsigned int new_vref) 640 hda_nid_t nid, unsigned int new_vref)
641{ 641{
642 unsigned int error; 642 int error;
643 unsigned int pincfg; 643 unsigned int pincfg;
644 pincfg = snd_hda_codec_read(codec, nid, 0, 644 pincfg = snd_hda_codec_read(codec, nid, 0,
645 AC_VERB_GET_PIN_WIDGET_CONTROL, 0); 645 AC_VERB_GET_PIN_WIDGET_CONTROL, 0);
@@ -2703,7 +2703,7 @@ static int stac92xx_dc_bias_put(struct snd_kcontrol *kcontrol,
2703{ 2703{
2704 struct hda_codec *codec = snd_kcontrol_chip(kcontrol); 2704 struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
2705 unsigned int new_vref = 0; 2705 unsigned int new_vref = 0;
2706 unsigned int error; 2706 int error;
2707 hda_nid_t nid = kcontrol->private_value; 2707 hda_nid_t nid = kcontrol->private_value;
2708 2708
2709 if (ucontrol->value.enumerated.item[0] == 0) 2709 if (ucontrol->value.enumerated.item[0] == 0)
@@ -4035,7 +4035,7 @@ static void stac_gpio_set(struct hda_codec *codec, unsigned int mask,
4035 AC_VERB_SET_GPIO_DATA, gpiostate); /* sync */ 4035 AC_VERB_SET_GPIO_DATA, gpiostate); /* sync */
4036} 4036}
4037 4037
4038#ifdef CONFIG_SND_JACK 4038#ifdef CONFIG_SND_HDA_INPUT_JACK
4039static void stac92xx_free_jack_priv(struct snd_jack *jack) 4039static void stac92xx_free_jack_priv(struct snd_jack *jack)
4040{ 4040{
4041 struct sigmatel_jack *jacks = jack->private_data; 4041 struct sigmatel_jack *jacks = jack->private_data;
@@ -4047,7 +4047,7 @@ static void stac92xx_free_jack_priv(struct snd_jack *jack)
4047static int stac92xx_add_jack(struct hda_codec *codec, 4047static int stac92xx_add_jack(struct hda_codec *codec,
4048 hda_nid_t nid, int type) 4048 hda_nid_t nid, int type)
4049{ 4049{
4050#ifdef CONFIG_SND_JACK 4050#ifdef CONFIG_SND_HDA_INPUT_JACK
4051 struct sigmatel_spec *spec = codec->spec; 4051 struct sigmatel_spec *spec = codec->spec;
4052 struct sigmatel_jack *jack; 4052 struct sigmatel_jack *jack;
4053 int def_conf = snd_hda_codec_get_pincfg(codec, nid); 4053 int def_conf = snd_hda_codec_get_pincfg(codec, nid);
@@ -4336,7 +4336,7 @@ static int stac92xx_init(struct hda_codec *codec)
4336 4336
4337static void stac92xx_free_jacks(struct hda_codec *codec) 4337static void stac92xx_free_jacks(struct hda_codec *codec)
4338{ 4338{
4339#ifdef CONFIG_SND_JACK 4339#ifdef CONFIG_SND_HDA_INPUT_JACK
4340 /* free jack instances manually when clearing/reconfiguring */ 4340 /* free jack instances manually when clearing/reconfiguring */
4341 struct sigmatel_spec *spec = codec->spec; 4341 struct sigmatel_spec *spec = codec->spec;
4342 if (!codec->bus->shutdown && spec->jacks.list) { 4342 if (!codec->bus->shutdown && spec->jacks.list) {
diff --git a/sound/pci/via82xx.c b/sound/pci/via82xx.c
index 1ef58c51c213..949fcaf6b70e 100644
--- a/sound/pci/via82xx.c
+++ b/sound/pci/via82xx.c
@@ -85,6 +85,7 @@ static int joystick;
85static int ac97_clock = 48000; 85static int ac97_clock = 48000;
86static char *ac97_quirk; 86static char *ac97_quirk;
87static int dxs_support; 87static int dxs_support;
88static int nodelay;
88 89
89module_param(index, int, 0444); 90module_param(index, int, 0444);
90MODULE_PARM_DESC(index, "Index value for VIA 82xx bridge."); 91MODULE_PARM_DESC(index, "Index value for VIA 82xx bridge.");
@@ -102,6 +103,8 @@ module_param(ac97_quirk, charp, 0444);
102MODULE_PARM_DESC(ac97_quirk, "AC'97 workaround for strange hardware."); 103MODULE_PARM_DESC(ac97_quirk, "AC'97 workaround for strange hardware.");
103module_param(dxs_support, int, 0444); 104module_param(dxs_support, int, 0444);
104MODULE_PARM_DESC(dxs_support, "Support for DXS channels (0 = auto, 1 = enable, 2 = disable, 3 = 48k only, 4 = no VRA, 5 = enable any sample rate)"); 105MODULE_PARM_DESC(dxs_support, "Support for DXS channels (0 = auto, 1 = enable, 2 = disable, 3 = 48k only, 4 = no VRA, 5 = enable any sample rate)");
106module_param(nodelay, int, 0444);
107MODULE_PARM_DESC(nodelay, "Disable 500ms init delay");
105 108
106/* just for backward compatibility */ 109/* just for backward compatibility */
107static int enable; 110static int enable;
@@ -549,7 +552,8 @@ static void snd_via82xx_codec_wait(struct snd_ac97 *ac97)
549 int err; 552 int err;
550 err = snd_via82xx_codec_ready(chip, ac97->num); 553 err = snd_via82xx_codec_ready(chip, ac97->num);
551 /* here we need to wait fairly for long time.. */ 554 /* here we need to wait fairly for long time.. */
552 msleep(500); 555 if (!nodelay)
556 msleep(500);
553} 557}
554 558
555static void snd_via82xx_codec_write(struct snd_ac97 *ac97, 559static void snd_via82xx_codec_write(struct snd_ac97 *ac97,
diff --git a/sound/soc/blackfin/bf5xx-i2s.c b/sound/soc/blackfin/bf5xx-i2s.c
index 964824419678..af06904bab0f 100644
--- a/sound/soc/blackfin/bf5xx-i2s.c
+++ b/sound/soc/blackfin/bf5xx-i2s.c
@@ -50,6 +50,7 @@ struct bf5xx_i2s_port {
50 u16 tcr2; 50 u16 tcr2;
51 u16 rcr2; 51 u16 rcr2;
52 int counter; 52 int counter;
53 int configured;
53}; 54};
54 55
55static struct bf5xx_i2s_port bf5xx_i2s; 56static struct bf5xx_i2s_port bf5xx_i2s;
@@ -168,7 +169,7 @@ static int bf5xx_i2s_hw_params(struct snd_pcm_substream *substream,
168 break; 169 break;
169 } 170 }
170 171
171 if (bf5xx_i2s.counter == 1) { 172 if (!bf5xx_i2s.configured) {
172 /* 173 /*
173 * TX and RX are not independent,they are enabled at the 174 * TX and RX are not independent,they are enabled at the
174 * same time, even if only one side is running. So, we 175 * same time, even if only one side is running. So, we
@@ -177,6 +178,7 @@ static int bf5xx_i2s_hw_params(struct snd_pcm_substream *substream,
177 * 178 *
178 * CPU DAI:slave mode. 179 * CPU DAI:slave mode.
179 */ 180 */
181 bf5xx_i2s.configured = 1;
180 ret = sport_config_rx(sport_handle, bf5xx_i2s.rcr1, 182 ret = sport_config_rx(sport_handle, bf5xx_i2s.rcr1,
181 bf5xx_i2s.rcr2, 0, 0); 183 bf5xx_i2s.rcr2, 0, 0);
182 if (ret) { 184 if (ret) {
@@ -200,6 +202,9 @@ static void bf5xx_i2s_shutdown(struct snd_pcm_substream *substream,
200{ 202{
201 pr_debug("%s enter\n", __func__); 203 pr_debug("%s enter\n", __func__);
202 bf5xx_i2s.counter--; 204 bf5xx_i2s.counter--;
205 /* No active stream, SPORT is allowed to be configured again. */
206 if (!bf5xx_i2s.counter)
207 bf5xx_i2s.configured = 0;
203} 208}
204 209
205static int bf5xx_i2s_probe(struct platform_device *pdev, 210static int bf5xx_i2s_probe(struct platform_device *pdev,
@@ -244,8 +249,7 @@ static int bf5xx_i2s_suspend(struct snd_soc_dai *dai)
244 return 0; 249 return 0;
245} 250}
246 251
247static int bf5xx_i2s_resume(struct platform_device *pdev, 252static int bf5xx_i2s_resume(struct snd_soc_dai *dai)
248 struct snd_soc_dai *dai)
249{ 253{
250 int ret; 254 int ret;
251 struct sport_device *sport = 255 struct sport_device *sport =