diff options
-rw-r--r-- | Documentation/devicetree/bindings/sound/sun4i-codec.txt | 6 | ||||
-rw-r--r-- | sound/soc/codecs/ssm2518.c | 6 | ||||
-rw-r--r-- | sound/soc/sunxi/sun4i-codec.c | 17 |
3 files changed, 5 insertions, 24 deletions
diff --git a/Documentation/devicetree/bindings/sound/sun4i-codec.txt b/Documentation/devicetree/bindings/sound/sun4i-codec.txt index 680144b74ae9..c92966bd5488 100644 --- a/Documentation/devicetree/bindings/sound/sun4i-codec.txt +++ b/Documentation/devicetree/bindings/sound/sun4i-codec.txt | |||
@@ -13,10 +13,6 @@ Required properties: | |||
13 | - clock-names: should contain followings: | 13 | - clock-names: should contain followings: |
14 | - "apb": the parent APB clock for this controller | 14 | - "apb": the parent APB clock for this controller |
15 | - "codec": the parent module clock | 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 | Example: | 17 | Example: |
22 | codec: codec@01c22c00 { | 18 | codec: codec@01c22c00 { |
@@ -28,6 +24,4 @@ codec: codec@01c22c00 { | |||
28 | clock-names = "apb", "codec"; | 24 | clock-names = "apb", "codec"; |
29 | dmas = <&dma 0 19>, <&dma 0 19>; | 25 | dmas = <&dma 0 19>, <&dma 0 19>; |
30 | dma-names = "rx", "tx"; | 26 | dma-names = "rx", "tx"; |
31 | routing = "Headphone Jack", "HP Right", | ||
32 | "Headphone Jack", "HP Left"; | ||
33 | }; | 27 | }; |
diff --git a/sound/soc/codecs/ssm2518.c b/sound/soc/codecs/ssm2518.c index ddb0203fc649..86b81a60ac52 100644 --- a/sound/soc/codecs/ssm2518.c +++ b/sound/soc/codecs/ssm2518.c | |||
@@ -723,17 +723,11 @@ static struct snd_soc_codec_driver ssm2518_codec_driver = { | |||
723 | .num_dapm_routes = ARRAY_SIZE(ssm2518_routes), | 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 | static const struct regmap_config ssm2518_regmap_config = { | 726 | static const struct regmap_config ssm2518_regmap_config = { |
732 | .val_bits = 8, | 727 | .val_bits = 8, |
733 | .reg_bits = 8, | 728 | .reg_bits = 8, |
734 | 729 | ||
735 | .max_register = SSM2518_REG_DRC_9, | 730 | .max_register = SSM2518_REG_DRC_9, |
736 | .volatile_reg = ssm2518_register_volatile, | ||
737 | 731 | ||
738 | .cache_type = REGCACHE_RBTREE, | 732 | .cache_type = REGCACHE_RBTREE, |
739 | .reg_defaults = ssm2518_reg_defaults, | 733 | .reg_defaults = ssm2518_reg_defaults, |
diff --git a/sound/soc/sunxi/sun4i-codec.c b/sound/soc/sunxi/sun4i-codec.c index 8d59d83b5aa4..bcbf4da168b6 100644 --- a/sound/soc/sunxi/sun4i-codec.c +++ b/sound/soc/sunxi/sun4i-codec.c | |||
@@ -283,7 +283,7 @@ static int sun4i_codec_hw_params(struct snd_pcm_substream *substream, | |||
283 | struct snd_soc_pcm_runtime *rtd = substream->private_data; | 283 | struct snd_soc_pcm_runtime *rtd = substream->private_data; |
284 | struct sun4i_codec *scodec = snd_soc_card_get_drvdata(rtd->card); | 284 | struct sun4i_codec *scodec = snd_soc_card_get_drvdata(rtd->card); |
285 | unsigned long clk_freq; | 285 | unsigned long clk_freq; |
286 | int hwrate; | 286 | int ret, hwrate; |
287 | u32 val; | 287 | u32 val; |
288 | 288 | ||
289 | if (substream->stream != SNDRV_PCM_STREAM_PLAYBACK) | 289 | if (substream->stream != SNDRV_PCM_STREAM_PLAYBACK) |
@@ -293,8 +293,9 @@ static int sun4i_codec_hw_params(struct snd_pcm_substream *substream, | |||
293 | if (!clk_freq) | 293 | if (!clk_freq) |
294 | return -EINVAL; | 294 | return -EINVAL; |
295 | 295 | ||
296 | if (clk_set_rate(scodec->clk_module, clk_freq)) | 296 | ret = clk_set_rate(scodec->clk_module, clk_freq); |
297 | return -EINVAL; | 297 | if (ret) |
298 | return ret; | ||
298 | 299 | ||
299 | hwrate = sun4i_codec_get_hw_rate(params); | 300 | hwrate = sun4i_codec_get_hw_rate(params); |
300 | if (hwrate < 0) | 301 | if (hwrate < 0) |
@@ -388,8 +389,7 @@ static struct snd_soc_dai_driver sun4i_codec_dai = { | |||
388 | .rate_max = 192000, | 389 | .rate_max = 192000, |
389 | .rates = SNDRV_PCM_RATE_8000_48000 | | 390 | .rates = SNDRV_PCM_RATE_8000_48000 | |
390 | SNDRV_PCM_RATE_96000 | | 391 | SNDRV_PCM_RATE_96000 | |
391 | SNDRV_PCM_RATE_192000 | | 392 | SNDRV_PCM_RATE_192000, |
392 | SNDRV_PCM_RATE_KNOT, | ||
393 | .formats = SNDRV_PCM_FMTBIT_S16_LE | | 393 | .formats = SNDRV_PCM_FMTBIT_S16_LE | |
394 | SNDRV_PCM_FMTBIT_S32_LE, | 394 | SNDRV_PCM_FMTBIT_S32_LE, |
395 | .sig_bits = 24, | 395 | .sig_bits = 24, |
@@ -571,7 +571,6 @@ static struct snd_soc_dai_link *sun4i_codec_create_link(struct device *dev, | |||
571 | static struct snd_soc_card *sun4i_codec_create_card(struct device *dev) | 571 | static struct snd_soc_card *sun4i_codec_create_card(struct device *dev) |
572 | { | 572 | { |
573 | struct snd_soc_card *card; | 573 | struct snd_soc_card *card; |
574 | int ret; | ||
575 | 574 | ||
576 | card = devm_kzalloc(dev, sizeof(*card), GFP_KERNEL); | 575 | card = devm_kzalloc(dev, sizeof(*card), GFP_KERNEL); |
577 | if (!card) | 576 | if (!card) |
@@ -584,12 +583,6 @@ static struct snd_soc_card *sun4i_codec_create_card(struct device *dev) | |||
584 | card->dev = dev; | 583 | card->dev = dev; |
585 | card->name = "sun4i-codec"; | 584 | card->name = "sun4i-codec"; |
586 | 585 | ||
587 | ret = snd_soc_of_parse_audio_routing(card, "routing"); | ||
588 | if (ret) { | ||
589 | dev_err(dev, "Failed to create our audio routing\n"); | ||
590 | return NULL; | ||
591 | } | ||
592 | |||
593 | return card; | 586 | return card; |
594 | }; | 587 | }; |
595 | 588 | ||