Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

+463 -182
+1 -1
sound/core/pcm_native.c
··· 320 320 snd_mask_max(&params->masks[SNDRV_PCM_HW_PARAM_CHANNELS])) { 321 321 changed = substream->ops->ioctl(substream, 322 322 SNDRV_PCM_IOCTL1_FIFO_SIZE, params); 323 - if (params < 0) 323 + if (changed < 0) 324 324 return changed; 325 325 } 326 326 }
+4 -4
sound/core/seq/seq_midi_event.c
··· 504 504 if (dev->nostat && count < 12) 505 505 return -ENOMEM; 506 506 cmd = MIDI_CMD_CONTROL|(ev->data.control.channel & 0x0f); 507 - bytes[0] = ev->data.control.param & 0x007f; 508 - bytes[1] = (ev->data.control.param & 0x3f80) >> 7; 509 - bytes[2] = ev->data.control.value & 0x007f; 510 - bytes[3] = (ev->data.control.value & 0x3f80) >> 7; 507 + bytes[0] = (ev->data.control.param & 0x3f80) >> 7; 508 + bytes[1] = ev->data.control.param & 0x007f; 509 + bytes[2] = (ev->data.control.value & 0x3f80) >> 7; 510 + bytes[3] = ev->data.control.value & 0x007f; 511 511 if (cmd != dev->lastcmd && !dev->nostat) { 512 512 if (count < 9) 513 513 return -ENOMEM;
+151 -53
sound/pci/ctxfi/ctatc.c
··· 46 46 SND_PCI_QUIRK(PCI_VENDOR_ID_CREATIVE, 0x0031, "SB073x", CTSB073X), 47 47 SND_PCI_QUIRK_MASK(PCI_VENDOR_ID_CREATIVE, 0xf000, 0x6000, 48 48 "UAA", CTUAA), 49 - SND_PCI_QUIRK_VENDOR(PCI_VENDOR_ID_CREATIVE, 50 - "Unknown", CT20K1_UNKNOWN), 51 49 { } /* terminator */ 52 50 }; 53 51 ··· 65 67 }; 66 68 67 69 static const char *ct_subsys_name[NUM_CTCARDS] = { 70 + /* 20k1 models */ 68 71 [CTSB055X] = "SB055x", 69 72 [CTSB073X] = "SB073x", 70 - [CTSB0760] = "SB076x", 71 73 [CTUAA] = "UAA", 72 74 [CT20K1_UNKNOWN] = "Unknown", 75 + /* 20k2 models */ 76 + [CTSB0760] = "SB076x", 73 77 [CTHENDRIX] = "Hendrix", 74 78 [CTSB0880] = "SB0880", 79 + [CT20K2_UNKNOWN] = "Unknown", 75 80 }; 76 81 77 82 static struct { ··· 261 260 int device = apcm->substream->pcm->device; 262 261 unsigned int pitch; 263 262 264 - if (NULL != apcm->src) { 265 - /* Prepared pcm playback */ 266 - return 0; 267 - } 268 - 269 263 /* first release old resources */ 270 - atc->pcm_release_resources(atc, apcm); 264 + atc_pcm_release_resources(atc, apcm); 271 265 272 266 /* Get SRC resource */ 273 267 desc.multi = apcm->substream->runtime->channels; ··· 656 660 unsigned int pitch; 657 661 int mix_base = 0, imp_base = 0; 658 662 659 - if (NULL != apcm->src) { 660 - /* Prepared pcm capture */ 661 - return 0; 662 - } 663 + atc_pcm_release_resources(atc, apcm); 663 664 664 665 /* Get needed resources. */ 665 666 err = atc_pcm_capture_get_resources(atc, apcm); ··· 859 866 struct dao *dao = container_of(atc->daios[SPDIFOO], struct dao, daio); 860 867 unsigned int rate = apcm->substream->runtime->rate; 861 868 unsigned int status; 862 - int err; 869 + int err = 0; 863 870 unsigned char iec958_con_fs; 864 871 865 872 switch (rate) { ··· 900 907 int err; 901 908 int i; 902 909 903 - if (NULL != apcm->src) 904 - return 0; 910 + atc_pcm_release_resources(atc, apcm); 905 911 906 912 /* Configure SPDIFOO and PLL to passthrough mode; 907 913 * determine pll_rate. */ ··· 1107 1115 return err; 1108 1116 } 1109 1117 1110 - static int ct_atc_destroy(struct ct_atc *atc) 1118 + static int atc_release_resources(struct ct_atc *atc) 1111 1119 { 1112 - struct daio_mgr *daio_mgr; 1113 - struct dao *dao; 1114 - struct dai *dai; 1115 - struct daio *daio; 1116 - struct sum_mgr *sum_mgr; 1117 - struct src_mgr *src_mgr; 1118 - struct srcimp_mgr *srcimp_mgr; 1119 - struct srcimp *srcimp; 1120 - struct ct_mixer *mixer; 1121 - int i = 0; 1120 + int i; 1121 + struct daio_mgr *daio_mgr = NULL; 1122 + struct dao *dao = NULL; 1123 + struct dai *dai = NULL; 1124 + struct daio *daio = NULL; 1125 + struct sum_mgr *sum_mgr = NULL; 1126 + struct src_mgr *src_mgr = NULL; 1127 + struct srcimp_mgr *srcimp_mgr = NULL; 1128 + struct srcimp *srcimp = NULL; 1129 + struct ct_mixer *mixer = NULL; 1122 1130 1123 - if (NULL == atc) 1124 - return 0; 1125 - 1126 - if (atc->timer) { 1127 - ct_timer_free(atc->timer); 1128 - atc->timer = NULL; 1129 - } 1130 - 1131 - /* Stop hardware and disable all interrupts */ 1132 - if (NULL != atc->hw) 1133 - ((struct hw *)atc->hw)->card_stop(atc->hw); 1134 - 1135 - /* Destroy internal mixer objects */ 1131 + /* disconnect internal mixer objects */ 1136 1132 if (NULL != atc->mixer) { 1137 1133 mixer = atc->mixer; 1138 1134 mixer->set_input_left(mixer, MIX_LINE_IN, NULL); ··· 1129 1149 mixer->set_input_right(mixer, MIX_MIC_IN, NULL); 1130 1150 mixer->set_input_left(mixer, MIX_SPDIF_IN, NULL); 1131 1151 mixer->set_input_right(mixer, MIX_SPDIF_IN, NULL); 1132 - ct_mixer_destroy(atc->mixer); 1133 1152 } 1134 1153 1135 1154 if (NULL != atc->daios) { ··· 1146 1167 daio_mgr->put_daio(daio_mgr, daio); 1147 1168 } 1148 1169 kfree(atc->daios); 1170 + atc->daios = NULL; 1149 1171 } 1150 1172 1151 1173 if (NULL != atc->pcm) { ··· 1155 1175 sum_mgr->put_sum(sum_mgr, atc->pcm[i]); 1156 1176 1157 1177 kfree(atc->pcm); 1178 + atc->pcm = NULL; 1158 1179 } 1159 1180 1160 1181 if (NULL != atc->srcs) { ··· 1164 1183 src_mgr->put_src(src_mgr, atc->srcs[i]); 1165 1184 1166 1185 kfree(atc->srcs); 1186 + atc->srcs = NULL; 1167 1187 } 1168 1188 1169 1189 if (NULL != atc->srcimps) { ··· 1175 1193 srcimp_mgr->put_srcimp(srcimp_mgr, atc->srcimps[i]); 1176 1194 } 1177 1195 kfree(atc->srcimps); 1196 + atc->srcimps = NULL; 1178 1197 } 1198 + 1199 + return 0; 1200 + } 1201 + 1202 + static int ct_atc_destroy(struct ct_atc *atc) 1203 + { 1204 + int i = 0; 1205 + 1206 + if (NULL == atc) 1207 + return 0; 1208 + 1209 + if (atc->timer) { 1210 + ct_timer_free(atc->timer); 1211 + atc->timer = NULL; 1212 + } 1213 + 1214 + atc_release_resources(atc); 1215 + 1216 + /* Destroy internal mixer objects */ 1217 + if (NULL != atc->mixer) 1218 + ct_mixer_destroy(atc->mixer); 1179 1219 1180 1220 for (i = 0; i < NUM_RSCTYP; i++) { 1181 1221 if ((NULL != rsc_mgr_funcs[i].destroy) && ··· 1244 1240 return -ENOENT; 1245 1241 } 1246 1242 p = snd_pci_quirk_lookup(atc->pci, list); 1247 - if (!p) 1248 - return -ENOENT; 1249 - atc->model = p->value; 1243 + if (p) { 1244 + if (p->value < 0) { 1245 + printk(KERN_ERR "ctxfi: " 1246 + "Device %04x:%04x is black-listed\n", 1247 + atc->pci->subsystem_vendor, 1248 + atc->pci->subsystem_device); 1249 + return -ENOENT; 1250 + } 1251 + atc->model = p->value; 1252 + } else { 1253 + if (atc->chip_type == ATC20K1) 1254 + atc->model = CT20K1_UNKNOWN; 1255 + else 1256 + atc->model = CT20K2_UNKNOWN; 1257 + } 1250 1258 atc->model_name = ct_subsys_name[atc->model]; 1251 1259 snd_printd("ctxfi: chip %s model %s (%04x:%04x) is found\n", 1252 1260 atc->chip_name, atc->model_name, ··· 1326 1310 return 0; 1327 1311 } 1328 1312 1329 - static int __devinit atc_get_resources(struct ct_atc *atc) 1313 + static int atc_get_resources(struct ct_atc *atc) 1330 1314 { 1331 1315 struct daio_desc da_desc = {0}; 1332 1316 struct daio_mgr *daio_mgr; ··· 1423 1407 atc->n_pcm++; 1424 1408 } 1425 1409 1426 - err = ct_mixer_create(atc, (struct ct_mixer **)&atc->mixer); 1427 - if (err) { 1428 - printk(KERN_ERR "ctxfi: Failed to create mixer obj!!!\n"); 1429 - return err; 1430 - } 1431 - 1432 1410 return 0; 1433 1411 } 1434 1412 1435 - static void __devinit 1413 + static void 1436 1414 atc_connect_dai(struct src_mgr *src_mgr, struct dai *dai, 1437 1415 struct src **srcs, struct srcimp **srcimps) 1438 1416 { ··· 1465 1455 src_mgr->commit_write(src_mgr); /* Synchronously enable SRCs */ 1466 1456 } 1467 1457 1468 - static void __devinit atc_connect_resources(struct ct_atc *atc) 1458 + static void atc_connect_resources(struct ct_atc *atc) 1469 1459 { 1470 1460 struct dai *dai; 1471 1461 struct dao *dao; ··· 1511 1501 } 1512 1502 } 1513 1503 1504 + #ifdef CONFIG_PM 1505 + static int atc_suspend(struct ct_atc *atc, pm_message_t state) 1506 + { 1507 + int i; 1508 + struct hw *hw = atc->hw; 1509 + 1510 + snd_power_change_state(atc->card, SNDRV_CTL_POWER_D3hot); 1511 + 1512 + for (i = FRONT; i < NUM_PCMS; i++) { 1513 + if (!atc->pcms[i]) 1514 + continue; 1515 + 1516 + snd_pcm_suspend_all(atc->pcms[i]); 1517 + } 1518 + 1519 + atc_release_resources(atc); 1520 + 1521 + hw->suspend(hw, state); 1522 + 1523 + return 0; 1524 + } 1525 + 1526 + static int atc_hw_resume(struct ct_atc *atc) 1527 + { 1528 + struct hw *hw = atc->hw; 1529 + struct card_conf info = {0}; 1530 + 1531 + /* Re-initialize card hardware. */ 1532 + info.rsr = atc->rsr; 1533 + info.msr = atc->msr; 1534 + info.vm_pgt_phys = atc_get_ptp_phys(atc, 0); 1535 + return hw->resume(hw, &info); 1536 + } 1537 + 1538 + static int atc_resources_resume(struct ct_atc *atc) 1539 + { 1540 + struct ct_mixer *mixer; 1541 + int err = 0; 1542 + 1543 + /* Get resources */ 1544 + err = atc_get_resources(atc); 1545 + if (err < 0) { 1546 + atc_release_resources(atc); 1547 + return err; 1548 + } 1549 + 1550 + /* Build topology */ 1551 + atc_connect_resources(atc); 1552 + 1553 + mixer = atc->mixer; 1554 + mixer->resume(mixer); 1555 + 1556 + return 0; 1557 + } 1558 + 1559 + static int atc_resume(struct ct_atc *atc) 1560 + { 1561 + int err = 0; 1562 + 1563 + /* Do hardware resume. */ 1564 + err = atc_hw_resume(atc); 1565 + if (err < 0) { 1566 + printk(KERN_ERR "ctxfi: pci_enable_device failed, " 1567 + "disabling device\n"); 1568 + snd_card_disconnect(atc->card); 1569 + return err; 1570 + } 1571 + 1572 + err = atc_resources_resume(atc); 1573 + if (err < 0) 1574 + return err; 1575 + 1576 + snd_power_change_state(atc->card, SNDRV_CTL_POWER_D0); 1577 + 1578 + return 0; 1579 + } 1580 + #endif 1581 + 1514 1582 static struct ct_atc atc_preset __devinitdata = { 1515 1583 .map_audio_buffer = ct_map_audio_buffer, 1516 1584 .unmap_audio_buffer = ct_unmap_audio_buffer, ··· 1617 1529 .spdif_out_set_status = atc_spdif_out_set_status, 1618 1530 .spdif_out_passthru = atc_spdif_out_passthru, 1619 1531 .have_digit_io_switch = atc_have_digit_io_switch, 1532 + #ifdef CONFIG_PM 1533 + .suspend = atc_suspend, 1534 + .resume = atc_resume, 1535 + #endif 1620 1536 }; 1621 1537 1622 1538 /** ··· 1678 1586 err = atc_create_hw_devs(atc); 1679 1587 if (err < 0) 1680 1588 goto error1; 1589 + 1590 + err = ct_mixer_create(atc, (struct ct_mixer **)&atc->mixer); 1591 + if (err) { 1592 + printk(KERN_ERR "ctxfi: Failed to create mixer obj!!!\n"); 1593 + goto error1; 1594 + } 1681 1595 1682 1596 /* Get resources */ 1683 1597 err = atc_get_resources(atc);
+7
sound/pci/ctxfi/ctatc.h
··· 136 136 unsigned char n_pcm; 137 137 138 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
+7
sound/pci/ctxfi/cthardware.h
··· 30 30 enum CTCARDS { 31 31 /* 20k1 models */ 32 32 CTSB055X, 33 + CT20K1_MODEL_FIRST = CTSB055X, 33 34 CTSB073X, 34 35 CTUAA, 35 36 CT20K1_UNKNOWN, 36 37 /* 20k2 models */ 37 38 CTSB0760, 39 + CT20K2_MODEL_FIRST = CTSB0760, 38 40 CTHENDRIX, 39 41 CTSB0880, 42 + CT20K2_UNKNOWN, 40 43 NUM_CTCARDS /* This should always be the last */ 41 44 }; 42 45 ··· 64 61 int (*card_init)(struct hw *hw, struct card_conf *info); 65 62 int (*card_stop)(struct hw *hw); 66 63 int (*pll_init)(struct hw *hw, unsigned int rsr); 64 + #ifdef CONFIG_PM 65 + int (*suspend)(struct hw *hw, pm_message_t state); 66 + int (*resume)(struct hw *hw, struct card_conf *info); 67 + #endif 67 68 int (*is_adc_source_selected)(struct hw *hw, enum ADCSRC source); 68 69 int (*select_adc_source)(struct hw *hw, enum ADCSRC source); 69 70 int (*have_digit_io_switch)(struct hw *hw);
+66 -17
sound/pci/ctxfi/cthw20k1.c
··· 1911 1911 goto error1; 1912 1912 } 1913 1913 1914 - err = pci_request_regions(pci, "XFi"); 1915 - if (err < 0) 1916 - goto error1; 1914 + if (!hw->io_base) { 1915 + err = pci_request_regions(pci, "XFi"); 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 1926 /* Switch to X-Fi mode from UAA mode if neeeded */ 1919 1927 if (hw->model == CTUAA) { ··· 1929 1921 if (err) 1930 1922 goto error2; 1931 1923 1932 - hw->io_base = pci_resource_start(pci, 5); 1933 - } else { 1934 - hw->io_base = pci_resource_start(pci, 0); 1935 1924 } 1936 1925 1937 - err = request_irq(pci->irq, ct_20k1_interrupt, IRQF_SHARED, 1938 - "ctxfi", hw); 1939 - if (err < 0) { 1940 - printk(KERN_ERR "XFi: Cannot get irq %d\n", pci->irq); 1941 - goto error2; 1926 + if (hw->irq < 0) { 1927 + err = request_irq(pci->irq, ct_20k1_interrupt, IRQF_SHARED, 1928 + "ctxfi", hw); 1929 + if (err < 0) { 1930 + printk(KERN_ERR "XFi: Cannot get irq %d\n", pci->irq); 1931 + goto error2; 1932 + } 1933 + hw->irq = pci->irq; 1942 1934 } 1943 - hw->irq = pci->irq; 1944 1935 1945 1936 pci_set_master(pci); 1946 1937 ··· 1955 1948 1956 1949 static int hw_card_stop(struct hw *hw) 1957 1950 { 1951 + unsigned int data; 1952 + 1953 + /* disable transport bus master and queueing of request */ 1954 + hw_write_20kx(hw, TRNCTL, 0x00); 1955 + 1956 + /* disable pll */ 1957 + data = hw_read_20kx(hw, PLLCTL); 1958 + hw_write_20kx(hw, PLLCTL, (data & (~(0x0F<<12)))); 1959 + 1958 1960 /* TODO: Disable interrupt and so on... */ 1959 1961 if (hw->irq >= 0) 1960 1962 synchronize_irq(hw->irq); ··· 2003 1987 struct trn_conf trn_info = {0}; 2004 1988 2005 1989 /* Get PCI io port base address and do Hendrix switch if needed. */ 2006 - if (!hw->io_base) { 2007 - err = hw_card_start(hw); 2008 - if (err) 2009 - return err; 2010 - } 1990 + err = hw_card_start(hw); 1991 + if (err) 1992 + return err; 2011 1993 2012 1994 /* PLL init */ 2013 1995 err = hw_pll_init(hw, info->rsr); ··· 2078 2064 return 0; 2079 2065 } 2080 2066 2067 + #ifdef CONFIG_PM 2068 + static int hw_suspend(struct hw *hw, pm_message_t state) 2069 + { 2070 + struct pci_dev *pci = hw->pci; 2071 + 2072 + hw_card_stop(hw); 2073 + 2074 + if (hw->model == CTUAA) { 2075 + /* Switch to UAA config space. */ 2076 + pci_write_config_dword(pci, UAA_CFG_SPACE_FLAG, 0x0); 2077 + } 2078 + 2079 + pci_disable_device(pci); 2080 + pci_save_state(pci); 2081 + pci_set_power_state(pci, pci_choose_state(pci, state)); 2082 + 2083 + return 0; 2084 + } 2085 + 2086 + static int hw_resume(struct hw *hw, struct card_conf *info) 2087 + { 2088 + struct pci_dev *pci = hw->pci; 2089 + 2090 + pci_set_power_state(pci, PCI_D0); 2091 + pci_restore_state(pci); 2092 + 2093 + /* Re-initialize card hardware. */ 2094 + return hw_card_init(hw, info); 2095 + } 2096 + #endif 2097 + 2081 2098 static u32 hw_read_20kx(struct hw *hw, u32 reg) 2082 2099 { 2083 2100 u32 value; ··· 2173 2128 .is_adc_source_selected = hw_is_adc_input_selected, 2174 2129 .select_adc_source = hw_adc_input_select, 2175 2130 .have_digit_io_switch = hw_have_digit_io_switch, 2131 + #ifdef CONFIG_PM 2132 + .suspend = hw_suspend, 2133 + .resume = hw_resume, 2134 + #endif 2176 2135 2177 2136 .src_rsc_get_ctrl_blk = src_get_rsc_ctrl_blk, 2178 2137 .src_rsc_put_ctrl_blk = src_put_rsc_ctrl_blk,
+52 -13
sound/pci/ctxfi/cthw20k2.c
··· 1860 1860 goto error1; 1861 1861 } 1862 1862 1863 - err = pci_request_regions(pci, "XFi"); 1864 - if (err < 0) 1865 - goto error1; 1863 + if (!hw->io_base) { 1864 + err = pci_request_regions(pci, "XFi"); 1865 + if (err < 0) 1866 + goto error1; 1866 1867 1867 - hw->io_base = pci_resource_start(hw->pci, 2); 1868 - hw->mem_base = (unsigned long)ioremap(hw->io_base, 1868 + hw->io_base = pci_resource_start(hw->pci, 2); 1869 + hw->mem_base = (unsigned long)ioremap(hw->io_base, 1869 1870 pci_resource_len(hw->pci, 2)); 1870 - if (NULL == (void *)hw->mem_base) { 1871 - err = -ENOENT; 1872 - goto error2; 1871 + if (NULL == (void *)hw->mem_base) { 1872 + err = -ENOENT; 1873 + goto error2; 1874 + } 1873 1875 } 1874 1876 1875 1877 /* Switch to 20k2 mode from UAA mode. */ ··· 1903 1901 1904 1902 static int hw_card_stop(struct hw *hw) 1905 1903 { 1904 + unsigned int data; 1905 + 1906 + /* disable transport bus master and queueing of request */ 1907 + hw_write_20kx(hw, TRANSPORT_CTL, 0x00); 1908 + 1909 + /* disable pll */ 1910 + data = hw_read_20kx(hw, PLL_ENB); 1911 + hw_write_20kx(hw, PLL_ENB, (data & (~0x07))); 1912 + 1906 1913 /* TODO: Disable interrupt and so on... */ 1907 1914 return 0; 1908 1915 } ··· 1950 1939 1951 1940 /* Get PCI io port/memory base address and 1952 1941 * do 20kx core switch if needed. */ 1953 - if (!hw->io_base) { 1954 - err = hw_card_start(hw); 1955 - if (err) 1956 - return err; 1957 - } 1942 + err = hw_card_start(hw); 1943 + if (err) 1944 + return err; 1958 1945 1959 1946 /* PLL init */ 1960 1947 err = hw_pll_init(hw, info->rsr); ··· 2015 2006 return 0; 2016 2007 } 2017 2008 2009 + #ifdef CONFIG_PM 2010 + static int hw_suspend(struct hw *hw, pm_message_t state) 2011 + { 2012 + struct pci_dev *pci = hw->pci; 2013 + 2014 + hw_card_stop(hw); 2015 + 2016 + pci_disable_device(pci); 2017 + pci_save_state(pci); 2018 + pci_set_power_state(pci, pci_choose_state(pci, state)); 2019 + 2020 + return 0; 2021 + } 2022 + 2023 + static int hw_resume(struct hw *hw, struct card_conf *info) 2024 + { 2025 + struct pci_dev *pci = hw->pci; 2026 + 2027 + pci_set_power_state(pci, PCI_D0); 2028 + pci_restore_state(pci); 2029 + 2030 + /* Re-initialize card hardware. */ 2031 + return hw_card_init(hw, info); 2032 + } 2033 + #endif 2034 + 2018 2035 static u32 hw_read_20kx(struct hw *hw, u32 reg) 2019 2036 { 2020 2037 return readl((void *)(hw->mem_base + reg)); ··· 2060 2025 .is_adc_source_selected = hw_is_adc_input_selected, 2061 2026 .select_adc_source = hw_adc_input_select, 2062 2027 .have_digit_io_switch = hw_have_digit_io_switch, 2028 + #ifdef CONFIG_PM 2029 + .suspend = hw_suspend, 2030 + .resume = hw_resume, 2031 + #endif 2063 2032 2064 2033 .src_rsc_get_ctrl_blk = src_get_rsc_ctrl_blk, 2065 2034 .src_rsc_put_ctrl_blk = src_put_rsc_ctrl_blk,
+63 -29
sound/pci/ctxfi/ctmixer.c
··· 462 462 return; 463 463 } 464 464 465 + static 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 + 465 502 static int ct_alsa_mix_switch_info(struct snd_kcontrol *kcontrol, 466 503 struct snd_ctl_elem_info *uinfo) 467 504 { ··· 535 498 return 0; 536 499 537 500 set_switch_state(mixer, type, state); 538 - /* Do changes in mixer. */ 539 - if ((SWH_CAPTURE_START <= type) && (SWH_CAPTURE_END >= type)) { 540 - if (state) { 541 - ct_mixer_recording_select(mixer, 542 - get_amixer_index(type)); 543 - } else { 544 - ct_mixer_recording_unselect(mixer, 545 - get_amixer_index(type)); 546 - } 547 - } 548 - /* Do changes out of mixer. */ 549 - if (state && (MIXER_LINEIN_C_S == type || MIXER_MIC_C_S == type)) 550 - do_line_mic_switch(atc, type); 551 - else if (MIXER_WAVEF_P_S == type) 552 - atc->line_front_unmute(atc, state); 553 - else if (MIXER_WAVES_P_S == type) 554 - atc->line_surround_unmute(atc, state); 555 - else if (MIXER_WAVEC_P_S == type) 556 - atc->line_clfe_unmute(atc, state); 557 - else if (MIXER_WAVER_P_S == type) 558 - atc->line_rear_unmute(atc, state); 559 - else if (MIXER_LINEIN_P_S == type) 560 - atc->line_in_unmute(atc, state); 561 - else if (MIXER_SPDIFO_P_S == type) 562 - atc->spdif_out_unmute(atc, state); 563 - else if (MIXER_SPDIFI_P_S == type) 564 - atc->spdif_in_unmute(atc, state); 565 - else if (MIXER_DIGITAL_IO_S == type) 566 - do_digit_io_switch(atc, state); 501 + do_switch(atc, type, state); 567 502 568 503 return 1; 569 504 } ··· 1048 1039 return 0; 1049 1040 } 1050 1041 1042 + #ifdef CONFIG_PM 1043 + static int mixer_resume(struct ct_mixer *mixer) 1044 + { 1045 + int i, state; 1046 + struct amixer *amixer; 1047 + 1048 + /* resume topology and volume gain. */ 1049 + for (i = 0; i < NUM_CT_AMIXERS*CHN_NUM; i++) { 1050 + amixer = mixer->amixers[i]; 1051 + amixer->ops->commit_write(amixer); 1052 + } 1053 + 1054 + /* resume switch state. */ 1055 + for (i = SWH_MIXER_START; i <= SWH_MIXER_END; i++) { 1056 + state = get_switch_state(mixer, i); 1057 + do_switch(mixer->atc, i, state); 1058 + } 1059 + 1060 + return 0; 1061 + } 1062 + #endif 1063 + 1051 1064 int ct_mixer_destroy(struct ct_mixer *mixer) 1052 1065 { 1053 1066 struct sum_mgr *sum_mgr = (struct sum_mgr *)mixer->atc->rsc_mgrs[SUM]; ··· 1118 1087 mixer->get_output_ports = mixer_get_output_ports; 1119 1088 mixer->set_input_left = mixer_set_input_left; 1120 1089 mixer->set_input_right = mixer_set_input_right; 1090 + #ifdef CONFIG_PM 1091 + mixer->resume = mixer_resume; 1092 + #endif 1121 1093 1122 1094 /* Allocate chip resources for mixer obj */ 1123 1095 err = ct_mixer_get_resources(mixer);
+3
sound/pci/ctxfi/ctmixer.h
··· 56 56 enum MIXER_PORT_T type, struct rsc *rsc); 57 57 int (*set_input_right)(struct ct_mixer *mixer, 58 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 61 64 int ct_alsa_mix_create(struct ct_atc *atc,
+4
sound/pci/ctxfi/ctpcm.c
··· 422 422 snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV_SG, 423 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 429 return 0; 426 430 }
+22
sound/pci/ctxfi/xfi.c
··· 121 121 pci_set_drvdata(pci, NULL); 122 122 } 123 123 124 + #ifdef CONFIG_PM 125 + static 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 + 133 + static 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 + 124 142 static struct pci_driver ct_driver = { 125 143 .name = "SB-XFi", 126 144 .id_table = ct_pci_dev_ids, 127 145 .probe = ct_card_probe, 128 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 131 153 static int __init ct_card_init(void)
+8 -1
sound/pci/hda/Kconfig
··· 2 2 tristate "Intel HD Audio" 3 3 select SND_PCM 4 4 select SND_VMASTER 5 - select SND_JACK if INPUT=y || INPUT=SND 6 5 help 7 6 Say Y here to include support for Intel "High Definition 8 7 Audio" (Azalia) and its compatible devices. ··· 37 38 help 38 39 Say Y here to build a digital beep interface for HD-audio 39 40 driver. This interface is used to generate digital beeps. 41 + 42 + config SND_HDA_INPUT_JACK 43 + bool "Support jack plugging notification via input layer" 44 + depends on INPUT=y || INPUT=SND_HDA_INTEL 45 + select SND_JACK 46 + help 47 + Say Y here to enable the jack plugging notification via 48 + input layer. 40 49 41 50 config SND_HDA_CODEC_REALTEK 42 51 bool "Build Realtek HD-audio codec support"
+2 -2
sound/pci/hda/patch_conexant.c
··· 349 349 &spec->cur_mux[adc_idx]); 350 350 } 351 351 352 - #ifdef CONFIG_SND_JACK 352 + #ifdef CONFIG_SND_HDA_INPUT_JACK 353 353 static void conexant_free_jack_priv(struct snd_jack *jack) 354 354 { 355 355 struct conexant_jack *jacks = jack->private_data; ··· 463 463 464 464 static void conexant_free(struct hda_codec *codec) 465 465 { 466 - #ifdef CONFIG_SND_JACK 466 + #ifdef CONFIG_SND_HDA_INPUT_JACK 467 467 struct conexant_spec *spec = codec->spec; 468 468 if (spec->jacks.list) { 469 469 struct conexant_jack *jacks = spec->jacks.list;
+56 -53
sound/pci/hda/patch_realtek.c
··· 250 250 ALC883_MODEL_LAST, 251 251 }; 252 252 253 - /* styles of capture selection */ 254 - enum { 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 253 /* for GPIO Poll */ 261 254 #define GPIO_MASK 0x03 262 255 ··· 299 306 hda_nid_t *adc_nids; 300 307 hda_nid_t *capsrc_nids; 301 308 hda_nid_t dig_in_nid; /* digital-in NID; optional */ 302 - int capture_style; /* capture style (CAPT_*) */ 303 309 304 310 /* capture source */ 305 311 unsigned int num_mux_defs; ··· 412 420 unsigned int mux_idx; 413 421 hda_nid_t nid = spec->capsrc_nids ? 414 422 spec->capsrc_nids[adc_idx] : spec->adc_nids[adc_idx]; 423 + unsigned int type; 415 424 416 425 mux_idx = adc_idx >= spec->num_mux_defs ? 0 : adc_idx; 417 426 imux = &spec->input_mux[mux_idx]; 418 427 419 - if (spec->capture_style && 420 - !(spec->capture_style == CAPT_1MUX_MIX && !adc_idx)) { 428 + type = (get_wcaps(codec, nid) & AC_WCAP_TYPE) >> AC_WCAP_TYPE_SHIFT; 429 + if (type == AC_WID_AUD_MIX) { 421 430 /* Matrix-mixer style (e.g. ALC882) */ 422 431 unsigned int *cur_val = &spec->cur_mux[adc_idx]; 423 432 unsigned int i, idx; ··· 7550 7557 spec->stream_digital_playback = &alc882_pcm_digital_playback; 7551 7558 spec->stream_digital_capture = &alc882_pcm_digital_capture; 7552 7559 7553 - spec->capture_style = CAPT_MIX; /* matrix-style capture */ 7554 7560 if (!spec->adc_nids && spec->input_mux) { 7555 7561 /* check whether NID 0x07 is valid */ 7556 7562 unsigned int wcap = get_wcaps(codec, 0x07); ··· 9773 9781 } 9774 9782 if (!spec->capsrc_nids) 9775 9783 spec->capsrc_nids = alc883_capsrc_nids; 9776 - spec->capture_style = CAPT_MIX; /* matrix-style capture */ 9777 9784 spec->init_amp = ALC_INIT_DEFAULT; /* always initialize */ 9778 9785 break; 9779 9786 case 0x10ec0889: ··· 9782 9791 } 9783 9792 if (!spec->capsrc_nids) 9784 9793 spec->capsrc_nids = alc889_capsrc_nids; 9785 - spec->capture_style = CAPT_1MUX_MIX; /* 1mux/Nmix-style 9786 - capture */ 9787 9794 break; 9788 9795 default: 9789 9796 if (!spec->num_adc_nids) { ··· 9790 9801 } 9791 9802 if (!spec->capsrc_nids) 9792 9803 spec->capsrc_nids = alc883_capsrc_nids; 9793 - spec->capture_style = CAPT_MIX; /* matrix-style capture */ 9794 9804 break; 9795 9805 } 9796 9806 ··· 10901 10913 return 0; 10902 10914 } 10903 10915 10904 - /* identical with ALC880 */ 10905 - #define alc262_auto_create_analog_input_ctls \ 10906 - alc880_auto_create_analog_input_ctls 10916 + static int alc262_auto_create_analog_input_ctls(struct alc_spec *spec, 10917 + const struct auto_pin_cfg *cfg) 10918 + { 10919 + int err; 10920 + 10921 + err = alc880_auto_create_analog_input_ctls(spec, cfg); 10922 + if (err < 0) 10923 + return err; 10924 + /* digital-mic input pin is excluded in alc880_auto_create..() 10925 + * because it's under 0x18 10926 + */ 10927 + if (cfg->input_pins[AUTO_PIN_MIC] == 0x12 || 10928 + cfg->input_pins[AUTO_PIN_FRONT_MIC] == 0x12) { 10929 + struct hda_input_mux *imux = &spec->private_imux[0]; 10930 + imux->items[imux->num_items].label = "Int Mic"; 10931 + imux->items[imux->num_items].index = 0x09; 10932 + imux->num_items++; 10933 + } 10934 + return 0; 10935 + } 10936 + 10907 10937 10908 10938 /* 10909 10939 * generic initialization of ADC, input mixers and output mixers ··· 11338 11332 SND_PCI_QUIRK(0x104d, 0x8203, "Sony UX-90", ALC262_HIPPO), 11339 11333 SND_PCI_QUIRK(0x104d, 0x820f, "Sony ASSAMD", ALC262_SONY_ASSAMD), 11340 11334 SND_PCI_QUIRK(0x104d, 0x9016, "Sony VAIO", ALC262_AUTO), /* dig-only */ 11335 + SND_PCI_QUIRK(0x104d, 0x9025, "Sony VAIO Z21MN", ALC262_TOSHIBA_S06), 11341 11336 SND_PCI_QUIRK_MASK(0x104d, 0xff00, 0x9000, "Sony VAIO", 11342 11337 ALC262_SONY_ASSAMD), 11343 11338 SND_PCI_QUIRK(0x1179, 0x0001, "Toshiba dynabook SS RX1", ··· 11546 11539 .capsrc_nids = alc262_dmic_capsrc_nids, 11547 11540 .dac_nids = alc262_dac_nids, 11548 11541 .adc_nids = alc262_dmic_adc_nids, /* ADC0 */ 11542 + .num_adc_nids = 1, /* single ADC */ 11549 11543 .dig_out_nid = ALC262_DIGOUT_NID, 11550 11544 .num_channel_mode = ARRAY_SIZE(alc262_modes), 11551 11545 .channel_mode = alc262_modes, ··· 11648 11640 spec->stream_digital_playback = &alc262_pcm_digital_playback; 11649 11641 spec->stream_digital_capture = &alc262_pcm_digital_capture; 11650 11642 11651 - spec->capture_style = CAPT_MIX; 11652 11643 if (!spec->adc_nids && spec->input_mux) { 11653 - /* check whether NID 0x07 is valid */ 11654 - unsigned int wcap = get_wcaps(codec, 0x07); 11655 - 11656 - /* get type */ 11657 - wcap = (wcap & AC_WCAP_TYPE) >> AC_WCAP_TYPE_SHIFT; 11658 - if (wcap != AC_WID_AUD_IN) { 11659 - spec->adc_nids = alc262_adc_nids_alt; 11660 - spec->num_adc_nids = ARRAY_SIZE(alc262_adc_nids_alt); 11661 - spec->capsrc_nids = alc262_capsrc_nids_alt; 11644 + int i; 11645 + /* check whether the digital-mic has to be supported */ 11646 + for (i = 0; i < spec->input_mux->num_items; i++) { 11647 + if (spec->input_mux->items[i].index >= 9) 11648 + break; 11649 + } 11650 + if (i < spec->input_mux->num_items) { 11651 + /* use only ADC0 */ 11652 + spec->adc_nids = alc262_dmic_adc_nids; 11653 + spec->num_adc_nids = 1; 11654 + spec->capsrc_nids = alc262_dmic_capsrc_nids; 11662 11655 } else { 11663 - spec->adc_nids = alc262_adc_nids; 11664 - spec->num_adc_nids = ARRAY_SIZE(alc262_adc_nids); 11665 - spec->capsrc_nids = alc262_capsrc_nids; 11656 + /* all analog inputs */ 11657 + /* check whether NID 0x07 is valid */ 11658 + unsigned int wcap = get_wcaps(codec, 0x07); 11659 + 11660 + /* get type */ 11661 + wcap = (wcap & AC_WCAP_TYPE) >> AC_WCAP_TYPE_SHIFT; 11662 + if (wcap != AC_WID_AUD_IN) { 11663 + spec->adc_nids = alc262_adc_nids_alt; 11664 + spec->num_adc_nids = 11665 + ARRAY_SIZE(alc262_adc_nids_alt); 11666 + spec->capsrc_nids = alc262_capsrc_nids_alt; 11667 + } else { 11668 + spec->adc_nids = alc262_adc_nids; 11669 + spec->num_adc_nids = 11670 + ARRAY_SIZE(alc262_adc_nids); 11671 + spec->capsrc_nids = alc262_capsrc_nids; 11672 + } 11666 11673 } 11667 11674 } 11668 11675 if (!spec->cap_mixer && !spec->no_analog) ··· 13267 13244 return 0; 13268 13245 } 13269 13246 13270 - static int alc269_auto_create_analog_input_ctls(struct alc_spec *spec, 13271 - const struct auto_pin_cfg *cfg) 13272 - { 13273 - int err; 13274 - 13275 - err = alc880_auto_create_analog_input_ctls(spec, cfg); 13276 - if (err < 0) 13277 - return err; 13278 - /* digital-mic input pin is excluded in alc880_auto_create..() 13279 - * because it's under 0x18 13280 - */ 13281 - if (cfg->input_pins[AUTO_PIN_MIC] == 0x12 || 13282 - cfg->input_pins[AUTO_PIN_FRONT_MIC] == 0x12) { 13283 - struct hda_input_mux *imux = &spec->private_imux[0]; 13284 - imux->items[imux->num_items].label = "Int Mic"; 13285 - imux->items[imux->num_items].index = 0x05; 13286 - imux->num_items++; 13287 - } 13288 - return 0; 13289 - } 13247 + #define alc269_auto_create_analog_input_ctls \ 13248 + alc262_auto_create_analog_input_ctls 13290 13249 13291 13250 #ifdef CONFIG_SND_HDA_POWER_SAVE 13292 13251 #define alc269_loopbacks alc880_loopbacks ··· 15559 15554 spec->adc_nids = alc861vd_adc_nids; 15560 15555 spec->num_adc_nids = ARRAY_SIZE(alc861vd_adc_nids); 15561 15556 spec->capsrc_nids = alc861vd_capsrc_nids; 15562 - spec->capture_style = CAPT_MIX; 15563 15557 15564 15558 set_capture_mixer(spec); 15565 15559 set_beep_amp(spec, 0x0b, 0x05, HDA_INPUT); ··· 17478 17474 spec->adc_nids = alc662_adc_nids; 17479 17475 spec->num_adc_nids = ARRAY_SIZE(alc662_adc_nids); 17480 17476 spec->capsrc_nids = alc662_capsrc_nids; 17481 - spec->capture_style = CAPT_MIX; 17482 17477 17483 17478 if (!spec->cap_mixer) 17484 17479 set_capture_mixer(spec);
+5 -5
sound/pci/hda/patch_sigmatel.c
··· 639 639 static unsigned int stac92xx_vref_set(struct hda_codec *codec, 640 640 hda_nid_t nid, unsigned int new_vref) 641 641 { 642 - unsigned int error; 642 + int error; 643 643 unsigned int pincfg; 644 644 pincfg = snd_hda_codec_read(codec, nid, 0, 645 645 AC_VERB_GET_PIN_WIDGET_CONTROL, 0); ··· 2703 2703 { 2704 2704 struct hda_codec *codec = snd_kcontrol_chip(kcontrol); 2705 2705 unsigned int new_vref = 0; 2706 - unsigned int error; 2706 + int error; 2707 2707 hda_nid_t nid = kcontrol->private_value; 2708 2708 2709 2709 if (ucontrol->value.enumerated.item[0] == 0) ··· 4035 4035 AC_VERB_SET_GPIO_DATA, gpiostate); /* sync */ 4036 4036 } 4037 4037 4038 - #ifdef CONFIG_SND_JACK 4038 + #ifdef CONFIG_SND_HDA_INPUT_JACK 4039 4039 static void stac92xx_free_jack_priv(struct snd_jack *jack) 4040 4040 { 4041 4041 struct sigmatel_jack *jacks = jack->private_data; ··· 4047 4047 static int stac92xx_add_jack(struct hda_codec *codec, 4048 4048 hda_nid_t nid, int type) 4049 4049 { 4050 - #ifdef CONFIG_SND_JACK 4050 + #ifdef CONFIG_SND_HDA_INPUT_JACK 4051 4051 struct sigmatel_spec *spec = codec->spec; 4052 4052 struct sigmatel_jack *jack; 4053 4053 int def_conf = snd_hda_codec_get_pincfg(codec, nid); ··· 4336 4336 4337 4337 static void stac92xx_free_jacks(struct hda_codec *codec) 4338 4338 { 4339 - #ifdef CONFIG_SND_JACK 4339 + #ifdef CONFIG_SND_HDA_INPUT_JACK 4340 4340 /* free jack instances manually when clearing/reconfiguring */ 4341 4341 struct sigmatel_spec *spec = codec->spec; 4342 4342 if (!codec->bus->shutdown && spec->jacks.list) {
+5 -1
sound/pci/via82xx.c
··· 85 85 static int ac97_clock = 48000; 86 86 static char *ac97_quirk; 87 87 static int dxs_support; 88 + static int nodelay; 88 89 89 90 module_param(index, int, 0444); 90 91 MODULE_PARM_DESC(index, "Index value for VIA 82xx bridge."); ··· 103 102 MODULE_PARM_DESC(ac97_quirk, "AC'97 workaround for strange hardware."); 104 103 module_param(dxs_support, int, 0444); 105 104 MODULE_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)"); 105 + module_param(nodelay, int, 0444); 106 + MODULE_PARM_DESC(nodelay, "Disable 500ms init delay"); 106 107 107 108 /* just for backward compatibility */ 108 109 static int enable; ··· 552 549 int err; 553 550 err = snd_via82xx_codec_ready(chip, ac97->num); 554 551 /* here we need to wait fairly for long time.. */ 555 - msleep(500); 552 + if (!nodelay) 553 + msleep(500); 556 554 } 557 555 558 556 static void snd_via82xx_codec_write(struct snd_ac97 *ac97,
+7 -3
sound/soc/blackfin/bf5xx-i2s.c
··· 50 50 u16 tcr2; 51 51 u16 rcr2; 52 52 int counter; 53 + int configured; 53 54 }; 54 55 55 56 static struct bf5xx_i2s_port bf5xx_i2s; ··· 169 168 break; 170 169 } 171 170 172 - if (bf5xx_i2s.counter == 1) { 171 + if (!bf5xx_i2s.configured) { 173 172 /* 174 173 * TX and RX are not independent,they are enabled at the 175 174 * same time, even if only one side is running. So, we ··· 178 177 * 179 178 * CPU DAI:slave mode. 180 179 */ 180 + bf5xx_i2s.configured = 1; 181 181 ret = sport_config_rx(sport_handle, bf5xx_i2s.rcr1, 182 182 bf5xx_i2s.rcr2, 0, 0); 183 183 if (ret) { ··· 202 200 { 203 201 pr_debug("%s enter\n", __func__); 204 202 bf5xx_i2s.counter--; 203 + /* No active stream, SPORT is allowed to be configured again. */ 204 + if (!bf5xx_i2s.counter) 205 + bf5xx_i2s.configured = 0; 205 206 } 206 207 207 208 static int bf5xx_i2s_probe(struct platform_device *pdev, ··· 249 244 return 0; 250 245 } 251 246 252 - static int bf5xx_i2s_resume(struct platform_device *pdev, 253 - struct snd_soc_dai *dai) 247 + static int bf5xx_i2s_resume(struct snd_soc_dai *dai) 254 248 { 255 249 int ret; 256 250 struct sport_device *sport =