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

Merge remote-tracking branches 'asoc/fix/amd', 'asoc/fix/arizona', 'asoc/fix/dpcm', 'asoc/fix/dwc', 'asoc/fix/fsl' and 'asoc/fix/fsl-ssi' into asoc-linus

+71 -25
+2
Documentation/devicetree/bindings/sound/fsl-asoc-card.txt
··· 30 30 "fsl,imx-audio-sgtl5000" 31 31 (compatible with Documentation/devicetree/bindings/sound/imx-audio-sgtl5000.txt) 32 32 33 + "fsl,imx-audio-wm8960" 34 + 33 35 Required properties: 34 36 35 37 - compatible : Contains one of entries in the compatible list.
+1
sound/soc/amd/acp-pcm-dma.c
··· 635 635 SNDRV_PCM_HW_PARAM_PERIODS); 636 636 if (ret < 0) { 637 637 dev_err(prtd->platform->dev, "set integer constraint failed\n"); 638 + kfree(adata); 638 639 return ret; 639 640 } 640 641
+42 -1
sound/soc/codecs/arizona.c
··· 1929 1929 { 1000000, 13500000, 0, 1 }, 1930 1930 }; 1931 1931 1932 + static const unsigned int pseudo_fref_max[ARIZONA_FLL_MAX_FRATIO] = { 1933 + 13500000, 1934 + 6144000, 1935 + 6144000, 1936 + 3072000, 1937 + 3072000, 1938 + 2822400, 1939 + 2822400, 1940 + 1536000, 1941 + 1536000, 1942 + 1536000, 1943 + 1536000, 1944 + 1536000, 1945 + 1536000, 1946 + 1536000, 1947 + 1536000, 1948 + 768000, 1949 + }; 1950 + 1932 1951 static struct { 1933 1952 unsigned int min; 1934 1953 unsigned int max; ··· 2061 2042 /* Adjust FRATIO/refdiv to avoid integer mode if possible */ 2062 2043 refdiv = cfg->refdiv; 2063 2044 2045 + arizona_fll_dbg(fll, "pseudo: initial ratio=%u fref=%u refdiv=%u\n", 2046 + init_ratio, Fref, refdiv); 2047 + 2064 2048 while (div <= ARIZONA_FLL_MAX_REFDIV) { 2065 2049 for (ratio = init_ratio; ratio <= ARIZONA_FLL_MAX_FRATIO; 2066 2050 ratio++) { 2067 2051 if ((ARIZONA_FLL_VCO_CORNER / 2) / 2068 - (fll->vco_mult * ratio) < Fref) 2052 + (fll->vco_mult * ratio) < Fref) { 2053 + arizona_fll_dbg(fll, "pseudo: hit VCO corner\n"); 2069 2054 break; 2055 + } 2056 + 2057 + if (Fref > pseudo_fref_max[ratio - 1]) { 2058 + arizona_fll_dbg(fll, 2059 + "pseudo: exceeded max fref(%u) for ratio=%u\n", 2060 + pseudo_fref_max[ratio - 1], 2061 + ratio); 2062 + break; 2063 + } 2070 2064 2071 2065 if (target % (ratio * Fref)) { 2072 2066 cfg->refdiv = refdiv; 2073 2067 cfg->fratio = ratio - 1; 2068 + arizona_fll_dbg(fll, 2069 + "pseudo: found fref=%u refdiv=%d(%d) ratio=%d\n", 2070 + Fref, refdiv, div, ratio); 2074 2071 return ratio; 2075 2072 } 2076 2073 } ··· 2095 2060 if (target % (ratio * Fref)) { 2096 2061 cfg->refdiv = refdiv; 2097 2062 cfg->fratio = ratio - 1; 2063 + arizona_fll_dbg(fll, 2064 + "pseudo: found fref=%u refdiv=%d(%d) ratio=%d\n", 2065 + Fref, refdiv, div, ratio); 2098 2066 return ratio; 2099 2067 } 2100 2068 } ··· 2106 2068 Fref /= 2; 2107 2069 refdiv++; 2108 2070 init_ratio = arizona_find_fratio(Fref, NULL); 2071 + arizona_fll_dbg(fll, 2072 + "pseudo: change fref=%u refdiv=%d(%d) ratio=%u\n", 2073 + Fref, refdiv, div, init_ratio); 2109 2074 } 2110 2075 2111 2076 arizona_fll_warn(fll, "Falling back to integer mode operation\n");
+2 -3
sound/soc/dwc/designware_i2s.c
··· 645 645 646 646 dev->dev = &pdev->dev; 647 647 648 + dev->i2s_reg_comp1 = I2S_COMP_PARAM_1; 649 + dev->i2s_reg_comp2 = I2S_COMP_PARAM_2; 648 650 if (pdata) { 649 651 dev->capability = pdata->cap; 650 652 clk_id = NULL; ··· 654 652 if (dev->quirks & DW_I2S_QUIRK_COMP_REG_OFFSET) { 655 653 dev->i2s_reg_comp1 = pdata->i2s_reg_comp1; 656 654 dev->i2s_reg_comp2 = pdata->i2s_reg_comp2; 657 - } else { 658 - dev->i2s_reg_comp1 = I2S_COMP_PARAM_1; 659 - dev->i2s_reg_comp2 = I2S_COMP_PARAM_2; 660 655 } 661 656 ret = dw_configure_dai_by_pd(dev, dw_i2s_dai, res, pdata); 662 657 } else {
+22 -20
sound/soc/fsl/fsl_ssi.c
··· 112 112 struct fsl_ssi_reg_val tx; 113 113 }; 114 114 115 - static const struct reg_default fsl_ssi_reg_defaults[] = { 116 - {CCSR_SSI_SCR, 0x00000000}, 117 - {CCSR_SSI_SIER, 0x00003003}, 118 - {CCSR_SSI_STCR, 0x00000200}, 119 - {CCSR_SSI_SRCR, 0x00000200}, 120 - {CCSR_SSI_STCCR, 0x00040000}, 121 - {CCSR_SSI_SRCCR, 0x00040000}, 122 - {CCSR_SSI_SACNT, 0x00000000}, 123 - {CCSR_SSI_STMSK, 0x00000000}, 124 - {CCSR_SSI_SRMSK, 0x00000000}, 125 - {CCSR_SSI_SACCEN, 0x00000000}, 126 - {CCSR_SSI_SACCDIS, 0x00000000}, 127 - }; 128 - 129 115 static bool fsl_ssi_readable_reg(struct device *dev, unsigned int reg) 130 116 { 131 117 switch (reg) { ··· 176 190 .val_bits = 32, 177 191 .reg_stride = 4, 178 192 .val_format_endian = REGMAP_ENDIAN_NATIVE, 179 - .reg_defaults = fsl_ssi_reg_defaults, 180 - .num_reg_defaults = ARRAY_SIZE(fsl_ssi_reg_defaults), 193 + .num_reg_defaults_raw = CCSR_SSI_SACCDIS / sizeof(uint32_t) + 1, 181 194 .readable_reg = fsl_ssi_readable_reg, 182 195 .volatile_reg = fsl_ssi_volatile_reg, 183 196 .precious_reg = fsl_ssi_precious_reg, ··· 186 201 187 202 struct fsl_ssi_soc_data { 188 203 bool imx; 204 + bool imx21regs; /* imx21-class SSI - no SACC{ST,EN,DIS} regs */ 189 205 bool offline_config; 190 206 u32 sisr_write_mask; 191 207 }; ··· 289 303 290 304 static struct fsl_ssi_soc_data fsl_ssi_imx21 = { 291 305 .imx = true, 306 + .imx21regs = true, 292 307 .offline_config = true, 293 308 .sisr_write_mask = 0, 294 309 }; ··· 573 586 */ 574 587 regmap_write(regs, CCSR_SSI_SACNT, 575 588 CCSR_SSI_SACNT_AC97EN | CCSR_SSI_SACNT_FV); 576 - regmap_write(regs, CCSR_SSI_SACCDIS, 0xff); 577 - regmap_write(regs, CCSR_SSI_SACCEN, 0x300); 589 + 590 + /* no SACC{ST,EN,DIS} regs on imx21-class SSI */ 591 + if (!ssi_private->soc->imx21regs) { 592 + regmap_write(regs, CCSR_SSI_SACCDIS, 0xff); 593 + regmap_write(regs, CCSR_SSI_SACCEN, 0x300); 594 + } 578 595 579 596 /* 580 597 * Enable SSI, Transmit and Receive. AC97 has to communicate with the ··· 1388 1397 struct resource *res; 1389 1398 void __iomem *iomem; 1390 1399 char name[64]; 1400 + struct regmap_config regconfig = fsl_ssi_regconfig; 1391 1401 1392 1402 of_id = of_match_device(fsl_ssi_ids, &pdev->dev); 1393 1403 if (!of_id || !of_id->data) ··· 1436 1444 return PTR_ERR(iomem); 1437 1445 ssi_private->ssi_phys = res->start; 1438 1446 1447 + if (ssi_private->soc->imx21regs) { 1448 + /* 1449 + * According to datasheet imx21-class SSI 1450 + * don't have SACC{ST,EN,DIS} regs. 1451 + */ 1452 + regconfig.max_register = CCSR_SSI_SRMSK; 1453 + regconfig.num_reg_defaults_raw = 1454 + CCSR_SSI_SRMSK / sizeof(uint32_t) + 1; 1455 + } 1456 + 1439 1457 ret = of_property_match_string(np, "clock-names", "ipg"); 1440 1458 if (ret < 0) { 1441 1459 ssi_private->has_ipg_clk_name = false; 1442 1460 ssi_private->regs = devm_regmap_init_mmio(&pdev->dev, iomem, 1443 - &fsl_ssi_regconfig); 1461 + &regconfig); 1444 1462 } else { 1445 1463 ssi_private->has_ipg_clk_name = true; 1446 1464 ssi_private->regs = devm_regmap_init_mmio_clk(&pdev->dev, 1447 - "ipg", iomem, &fsl_ssi_regconfig); 1465 + "ipg", iomem, &regconfig); 1448 1466 } 1449 1467 if (IS_ERR(ssi_private->regs)) { 1450 1468 dev_err(&pdev->dev, "Failed to init register map\n");
+2 -1
sound/soc/soc-pcm.c
··· 1810 1810 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_PREPARE) && 1811 1811 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_HW_FREE) && 1812 1812 (be->dpcm[stream].state != SND_SOC_DPCM_STATE_PAUSED) && 1813 - (be->dpcm[stream].state != SND_SOC_DPCM_STATE_STOP)) 1813 + (be->dpcm[stream].state != SND_SOC_DPCM_STATE_STOP) && 1814 + (be->dpcm[stream].state != SND_SOC_DPCM_STATE_SUSPEND)) 1814 1815 continue; 1815 1816 1816 1817 dev_dbg(be->dev, "ASoC: hw_free BE %s\n",