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

Configure Feed

Select the types of activity you want to include in your feed.

ASoC: Merge up fixes for CI

Avoid tripping over fixed issues in CI.

+105 -14
+4 -2
Documentation/devicetree/bindings/sound/tas2562.yaml
··· 55 55 description: TDM TX current sense time slot. 56 56 57 57 '#sound-dai-cells': 58 - const: 1 58 + # The codec has a single DAI, the #sound-dai-cells=<1>; case is left in for backward 59 + # compatibility but is deprecated. 60 + enum: [0, 1] 59 61 60 62 required: 61 63 - compatible ··· 74 72 codec: codec@4c { 75 73 compatible = "ti,tas2562"; 76 74 reg = <0x4c>; 77 - #sound-dai-cells = <1>; 75 + #sound-dai-cells = <0>; 78 76 interrupt-parent = <&gpio1>; 79 77 interrupts = <14>; 80 78 shutdown-gpios = <&gpio1 15 0>;
+4 -2
Documentation/devicetree/bindings/sound/tas2770.yaml
··· 57 57 - 1 # Falling edge 58 58 59 59 '#sound-dai-cells': 60 - const: 1 60 + # The codec has a single DAI, the #sound-dai-cells=<1>; case is left in for backward 61 + # compatibility but is deprecated. 62 + enum: [0, 1] 61 63 62 64 required: 63 65 - compatible ··· 76 74 codec: codec@41 { 77 75 compatible = "ti,tas2770"; 78 76 reg = <0x41>; 79 - #sound-dai-cells = <1>; 77 + #sound-dai-cells = <0>; 80 78 interrupt-parent = <&gpio1>; 81 79 interrupts = <14>; 82 80 reset-gpio = <&gpio1 15 0>;
+4 -2
Documentation/devicetree/bindings/sound/tas27xx.yaml
··· 50 50 description: TDM TX voltage sense time slot. 51 51 52 52 '#sound-dai-cells': 53 - const: 1 53 + # The codec has a single DAI, the #sound-dai-cells=<1>; case is left in for backward 54 + # compatibility but is deprecated. 55 + enum: [0, 1] 54 56 55 57 required: 56 58 - compatible ··· 69 67 codec: codec@38 { 70 68 compatible = "ti,tas2764"; 71 69 reg = <0x38>; 72 - #sound-dai-cells = <1>; 70 + #sound-dai-cells = <0>; 73 71 interrupt-parent = <&gpio1>; 74 72 interrupts = <14>; 75 73 reset-gpios = <&gpio1 15 0>;
+7
sound/soc/amd/yc/acp6x-mach.c
··· 318 318 DMI_MATCH(DMI_BOARD_NAME, "MRID6"), 319 319 } 320 320 }, 321 + { 322 + .driver_data = &acp6x_card, 323 + .matches = { 324 + DMI_MATCH(DMI_BOARD_VENDOR, "System76"), 325 + DMI_MATCH(DMI_PRODUCT_VERSION, "pang12"), 326 + } 327 + }, 321 328 {} 322 329 }; 323 330
+15
sound/soc/codecs/ssm2602.c
··· 53 53 { .reg = 0x09, .def = 0x0000 } 54 54 }; 55 55 56 + /* 57 + * ssm2602 register patch 58 + * Workaround for playback distortions after power up: activates digital 59 + * core, and then powers on output, DAC, and whole chip at the same time 60 + */ 61 + 62 + static const struct reg_sequence ssm2602_patch[] = { 63 + { SSM2602_ACTIVE, 0x01 }, 64 + { SSM2602_PWR, 0x07 }, 65 + { SSM2602_RESET, 0x00 }, 66 + }; 67 + 56 68 57 69 /*Appending several "None"s just for OSS mixer use*/ 58 70 static const char *ssm2602_input_select[] = { ··· 609 597 dev_err(component->dev, "Failed to issue reset: %d\n", ret); 610 598 return ret; 611 599 } 600 + 601 + regmap_register_patch(ssm2602->regmap, ssm2602_patch, 602 + ARRAY_SIZE(ssm2602_patch)); 612 603 613 604 /* set the update bits */ 614 605 regmap_update_bits(ssm2602->regmap, SSM2602_LINVOL,
+2 -2
sound/soc/dwc/dwc-i2s.c
··· 133 133 134 134 /* Error Handling: TX */ 135 135 if (isr[i] & ISR_TXFO) { 136 - dev_err(dev->dev, "TX overrun (ch_id=%d)\n", i); 136 + dev_err_ratelimited(dev->dev, "TX overrun (ch_id=%d)\n", i); 137 137 irq_valid = true; 138 138 } 139 139 140 140 /* Error Handling: TX */ 141 141 if (isr[i] & ISR_RXFO) { 142 - dev_err(dev->dev, "RX overrun (ch_id=%d)\n", i); 142 + dev_err_ratelimited(dev->dev, "RX overrun (ch_id=%d)\n", i); 143 143 irq_valid = true; 144 144 } 145 145 }
+13 -1
sound/soc/fsl/fsl_micfil.c
··· 1159 1159 ret = devm_snd_dmaengine_pcm_register(&pdev->dev, NULL, 0); 1160 1160 if (ret) { 1161 1161 dev_err(&pdev->dev, "failed to pcm register\n"); 1162 - return ret; 1162 + goto err_pm_disable; 1163 1163 } 1164 1164 1165 1165 fsl_micfil_dai.capture.formats = micfil->soc->formats; ··· 1169 1169 if (ret) { 1170 1170 dev_err(&pdev->dev, "failed to register component %s\n", 1171 1171 fsl_micfil_component.name); 1172 + goto err_pm_disable; 1172 1173 } 1173 1174 1174 1175 return ret; 1176 + 1177 + err_pm_disable: 1178 + pm_runtime_disable(&pdev->dev); 1179 + 1180 + return ret; 1181 + } 1182 + 1183 + static void fsl_micfil_remove(struct platform_device *pdev) 1184 + { 1185 + pm_runtime_disable(&pdev->dev); 1175 1186 } 1176 1187 1177 1188 static int __maybe_unused fsl_micfil_runtime_suspend(struct device *dev) ··· 1243 1232 1244 1233 static struct platform_driver fsl_micfil_driver = { 1245 1234 .probe = fsl_micfil_probe, 1235 + .remove_new = fsl_micfil_remove, 1246 1236 .driver = { 1247 1237 .name = "fsl-micfil-dai", 1248 1238 .pm = &fsl_micfil_pm_ops,
+50 -4
sound/soc/jz4740/jz4740-i2s.c
··· 218 218 return 0; 219 219 } 220 220 221 + static int jz4740_i2s_get_i2sdiv(unsigned long mclk, unsigned long rate, 222 + unsigned long i2sdiv_max) 223 + { 224 + unsigned long div, rate1, rate2, err1, err2; 225 + 226 + div = mclk / (64 * rate); 227 + if (div == 0) 228 + div = 1; 229 + 230 + rate1 = mclk / (64 * div); 231 + rate2 = mclk / (64 * (div + 1)); 232 + 233 + err1 = abs(rate1 - rate); 234 + err2 = abs(rate2 - rate); 235 + 236 + /* 237 + * Choose the divider that produces the smallest error in the 238 + * output rate and reject dividers with a 5% or higher error. 239 + * In the event that both dividers are outside the acceptable 240 + * error margin, reject the rate to prevent distorted audio. 241 + * (The number 5% is arbitrary.) 242 + */ 243 + if (div <= i2sdiv_max && err1 <= err2 && err1 < rate/20) 244 + return div; 245 + if (div < i2sdiv_max && err2 < rate/20) 246 + return div + 1; 247 + 248 + return -EINVAL; 249 + } 250 + 221 251 static int jz4740_i2s_hw_params(struct snd_pcm_substream *substream, 222 252 struct snd_pcm_hw_params *params, struct snd_soc_dai *dai) 223 253 { 224 254 struct jz4740_i2s *i2s = snd_soc_dai_get_drvdata(dai); 225 255 struct regmap_field *div_field; 256 + unsigned long i2sdiv_max; 226 257 unsigned int sample_size; 227 - uint32_t ctrl; 228 - int div; 258 + uint32_t ctrl, conf; 259 + int div = 1; 229 260 230 261 regmap_read(i2s->regmap, JZ_REG_AIC_CTRL, &ctrl); 231 - 232 - div = clk_get_rate(i2s->clk_i2s) / (64 * params_rate(params)); 262 + regmap_read(i2s->regmap, JZ_REG_AIC_CONF, &conf); 233 263 234 264 switch (params_format(params)) { 235 265 case SNDRV_PCM_FORMAT_S8: ··· 288 258 ctrl &= ~JZ_AIC_CTRL_MONO_TO_STEREO; 289 259 290 260 div_field = i2s->field_i2sdiv_playback; 261 + i2sdiv_max = GENMASK(i2s->soc_info->field_i2sdiv_playback.msb, 262 + i2s->soc_info->field_i2sdiv_playback.lsb); 291 263 } else { 292 264 ctrl &= ~JZ_AIC_CTRL_INPUT_SAMPLE_SIZE; 293 265 ctrl |= FIELD_PREP(JZ_AIC_CTRL_INPUT_SAMPLE_SIZE, sample_size); 294 266 295 267 div_field = i2s->field_i2sdiv_capture; 268 + i2sdiv_max = GENMASK(i2s->soc_info->field_i2sdiv_capture.msb, 269 + i2s->soc_info->field_i2sdiv_capture.lsb); 270 + } 271 + 272 + /* 273 + * Only calculate I2SDIV if we're supplying the bit or frame clock. 274 + * If the codec is supplying both clocks then the divider output is 275 + * unused, and we don't want it to limit the allowed sample rates. 276 + */ 277 + if (conf & (JZ_AIC_CONF_BIT_CLK_MASTER | JZ_AIC_CONF_SYNC_CLK_MASTER)) { 278 + div = jz4740_i2s_get_i2sdiv(clk_get_rate(i2s->clk_i2s), 279 + params_rate(params), i2sdiv_max); 280 + if (div < 0) 281 + return div; 296 282 } 297 283 298 284 regmap_write(i2s->regmap, JZ_REG_AIC_CTRL, ctrl);
+6 -1
sound/soc/sof/amd/acp-ipc.c
··· 209 209 acp_mailbox_read(sdev, offset, p, sz); 210 210 } else { 211 211 struct snd_pcm_substream *substream = sps->substream; 212 - struct acp_dsp_stream *stream = substream->runtime->private_data; 212 + struct acp_dsp_stream *stream; 213 + 214 + if (!substream || !substream->runtime) 215 + return -ESTRPIPE; 216 + 217 + stream = substream->runtime->private_data; 213 218 214 219 if (!stream) 215 220 return -ESTRPIPE;