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

Merge remote-tracking branches 'asoc/topic/ssm2518' and 'asoc/topic/sunxi' into asoc-next

+5 -24
-6
Documentation/devicetree/bindings/sound/sun4i-codec.txt
··· 13 13 - clock-names: should contain followings: 14 14 - "apb": the parent APB clock for this controller 15 15 - "codec": the parent module clock 16 - - routing : A list of the connections between audio components. Each 17 - entry is a pair of strings, the first being the connection's sink, 18 - the second being the connection's source. 19 - 20 16 21 17 Example: 22 18 codec: codec@01c22c00 { ··· 24 28 clock-names = "apb", "codec"; 25 29 dmas = <&dma 0 19>, <&dma 0 19>; 26 30 dma-names = "rx", "tx"; 27 - routing = "Headphone Jack", "HP Right", 28 - "Headphone Jack", "HP Left"; 29 31 };
-6
sound/soc/codecs/ssm2518.c
··· 723 723 .num_dapm_routes = ARRAY_SIZE(ssm2518_routes), 724 724 }; 725 725 726 - static bool ssm2518_register_volatile(struct device *dev, unsigned int reg) 727 - { 728 - return false; 729 - } 730 - 731 726 static const struct regmap_config ssm2518_regmap_config = { 732 727 .val_bits = 8, 733 728 .reg_bits = 8, 734 729 735 730 .max_register = SSM2518_REG_DRC_9, 736 - .volatile_reg = ssm2518_register_volatile, 737 731 738 732 .cache_type = REGCACHE_RBTREE, 739 733 .reg_defaults = ssm2518_reg_defaults,
+5 -12
sound/soc/sunxi/sun4i-codec.c
··· 283 283 struct snd_soc_pcm_runtime *rtd = substream->private_data; 284 284 struct sun4i_codec *scodec = snd_soc_card_get_drvdata(rtd->card); 285 285 unsigned long clk_freq; 286 - int hwrate; 286 + int ret, hwrate; 287 287 u32 val; 288 288 289 289 if (substream->stream != SNDRV_PCM_STREAM_PLAYBACK) ··· 293 293 if (!clk_freq) 294 294 return -EINVAL; 295 295 296 - if (clk_set_rate(scodec->clk_module, clk_freq)) 297 - return -EINVAL; 296 + ret = clk_set_rate(scodec->clk_module, clk_freq); 297 + if (ret) 298 + return ret; 298 299 299 300 hwrate = sun4i_codec_get_hw_rate(params); 300 301 if (hwrate < 0) ··· 389 388 .rate_max = 192000, 390 389 .rates = SNDRV_PCM_RATE_8000_48000 | 391 390 SNDRV_PCM_RATE_96000 | 392 - SNDRV_PCM_RATE_192000 | 393 - SNDRV_PCM_RATE_KNOT, 391 + SNDRV_PCM_RATE_192000, 394 392 .formats = SNDRV_PCM_FMTBIT_S16_LE | 395 393 SNDRV_PCM_FMTBIT_S32_LE, 396 394 .sig_bits = 24, ··· 571 571 static struct snd_soc_card *sun4i_codec_create_card(struct device *dev) 572 572 { 573 573 struct snd_soc_card *card; 574 - int ret; 575 574 576 575 card = devm_kzalloc(dev, sizeof(*card), GFP_KERNEL); 577 576 if (!card) ··· 582 583 583 584 card->dev = dev; 584 585 card->name = "sun4i-codec"; 585 - 586 - ret = snd_soc_of_parse_audio_routing(card, "routing"); 587 - if (ret) { 588 - dev_err(dev, "Failed to create our audio routing\n"); 589 - return NULL; 590 - } 591 586 592 587 return card; 593 588 };