diff options
author | Shengjiu Wang <b02247@freescale.com> | 2014-04-17 06:41:52 -0400 |
---|---|---|
committer | Nitin Garg <nitin.garg@freescale.com> | 2014-04-17 22:19:15 -0400 |
commit | 0924629b0c90d8060cd135058aafb3877a57c562 (patch) | |
tree | dcdd656a2ac3e00c3c41c47a7fe565b65f1559ba | |
parent | 2654fd733206ce2927d8a806fde3c39f162f3ab7 (diff) |
ENGR00309073-1 ASoC: fsl: Naming of p2p item is not proper
Change the output-rate, output-width to p2p-rate, p2p-width.
Signed-off-by: Shengjiu Wang <b02247@freescale.com>
-rw-r--r-- | Documentation/devicetree/bindings/sound/fsl-asrc-p2p.txt | 8 | ||||
-rw-r--r-- | arch/arm/boot/dts/imx6qdl.dtsi | 4 | ||||
-rw-r--r-- | sound/soc/fsl/fsl_asrc.c | 36 | ||||
-rw-r--r-- | sound/soc/fsl/fsl_asrc.h | 4 | ||||
-rw-r--r-- | sound/soc/fsl/imx-cs42888.c | 16 |
5 files changed, 34 insertions, 34 deletions
diff --git a/Documentation/devicetree/bindings/sound/fsl-asrc-p2p.txt b/Documentation/devicetree/bindings/sound/fsl-asrc-p2p.txt index de48f051beec..41b4a9a610e7 100644 --- a/Documentation/devicetree/bindings/sound/fsl-asrc-p2p.txt +++ b/Documentation/devicetree/bindings/sound/fsl-asrc-p2p.txt | |||
@@ -5,8 +5,8 @@ MXC_ASRC. | |||
5 | 5 | ||
6 | Required properties: | 6 | Required properties: |
7 | - compatible: Should be "fsl,<chip>-asrc-p2p". | 7 | - compatible: Should be "fsl,<chip>-asrc-p2p". |
8 | - fsl,output-rate: the output rate of asrc p2p. which can be <32000> to <192000>, | 8 | - fsl,p2p-rate: the p2p rate of asrc p2p. which can be <32000> to <192000>, |
9 | - fsl,output-width: the output width of asrc p2p. which can be <16>, <24>. | 9 | - fsl,p2p-width: the p2p width of asrc p2p. which can be <16>, <24>. |
10 | - fsl,asrc-dma-rx-events: The rx dma event of the asrc, <a b c> corresponding | 10 | - fsl,asrc-dma-rx-events: The rx dma event of the asrc, <a b c> corresponding |
11 | to 3 pair of asrc. | 11 | to 3 pair of asrc. |
12 | - fsl,asrc-dma-tx-events: The tx dma event of the esai, <a b c> corresponding | 12 | - fsl,asrc-dma-tx-events: The tx dma event of the esai, <a b c> corresponding |
@@ -15,8 +15,8 @@ Required properties: | |||
15 | Example: | 15 | Example: |
16 | asrc_p2p: asrc_p2p { | 16 | asrc_p2p: asrc_p2p { |
17 | compatible = "fsl,imx6q-asrc-p2p"; | 17 | compatible = "fsl,imx6q-asrc-p2p"; |
18 | fsl,output-rate = <48000>; | 18 | fsl,p2p-rate = <48000>; |
19 | fsl,output-width = <16>; | 19 | fsl,p2p-width = <16>; |
20 | fsl,asrc-dma-rx-events = <17 18 19>; | 20 | fsl,asrc-dma-rx-events = <17 18 19>; |
21 | fsl,asrc-dma-tx-events = <20 21 22>; | 21 | fsl,asrc-dma-tx-events = <20 21 22>; |
22 | status = "okay"; | 22 | status = "okay"; |
diff --git a/arch/arm/boot/dts/imx6qdl.dtsi b/arch/arm/boot/dts/imx6qdl.dtsi index 6c9bec6bbe86..32c2e67cca63 100644 --- a/arch/arm/boot/dts/imx6qdl.dtsi +++ b/arch/arm/boot/dts/imx6qdl.dtsi | |||
@@ -308,8 +308,8 @@ | |||
308 | 308 | ||
309 | asrc_p2p: asrc_p2p { | 309 | asrc_p2p: asrc_p2p { |
310 | compatible = "fsl,imx6q-asrc-p2p"; | 310 | compatible = "fsl,imx6q-asrc-p2p"; |
311 | fsl,output-rate = <48000>; | 311 | fsl,p2p-rate = <48000>; |
312 | fsl,output-width = <16>; | 312 | fsl,p2p-width = <16>; |
313 | fsl,asrc-dma-rx-events = <17 18 19>; | 313 | fsl,asrc-dma-rx-events = <17 18 19>; |
314 | fsl,asrc-dma-tx-events = <20 21 22>; | 314 | fsl,asrc-dma-tx-events = <20 21 22>; |
315 | status = "okay"; | 315 | status = "okay"; |
diff --git a/sound/soc/fsl/fsl_asrc.c b/sound/soc/fsl/fsl_asrc.c index 6c67719c7958..8d68f5a7468e 100644 --- a/sound/soc/fsl/fsl_asrc.c +++ b/sound/soc/fsl/fsl_asrc.c | |||
@@ -81,7 +81,7 @@ static int asrc_p2p_request_channel(struct snd_pcm_substream *substream) | |||
81 | fe_filter_data = dma_params_fe->filter_data; | 81 | fe_filter_data = dma_params_fe->filter_data; |
82 | be_filter_data = dma_params_be->filter_data; | 82 | be_filter_data = dma_params_be->filter_data; |
83 | 83 | ||
84 | if (asrc_p2p->output_width == 16) | 84 | if (asrc_p2p->p2p_width == 16) |
85 | buswidth = DMA_SLAVE_BUSWIDTH_2_BYTES; | 85 | buswidth = DMA_SLAVE_BUSWIDTH_2_BYTES; |
86 | else | 86 | else |
87 | buswidth = DMA_SLAVE_BUSWIDTH_4_BYTES; | 87 | buswidth = DMA_SLAVE_BUSWIDTH_4_BYTES; |
@@ -153,8 +153,8 @@ static int config_asrc(struct snd_pcm_substream *substream, | |||
153 | unsigned int rate = params_rate(params); | 153 | unsigned int rate = params_rate(params); |
154 | unsigned int channel = params_channels(params); | 154 | unsigned int channel = params_channels(params); |
155 | struct asrc_config config = {0}; | 155 | struct asrc_config config = {0}; |
156 | int output_word_width = 0; | 156 | int p2p_word_width = 0; |
157 | int input_word_width = 0; | 157 | int word_width = 0; |
158 | int ret = 0; | 158 | int ret = 0; |
159 | if ((channel != 2) && (channel != 4) && (channel != 6)) { | 159 | if ((channel != 2) && (channel != 4) && (channel != 6)) { |
160 | dev_err(cpu_dai->dev, "param channel is not correct\n"); | 160 | dev_err(cpu_dai->dev, "param channel is not correct\n"); |
@@ -167,16 +167,16 @@ static int config_asrc(struct snd_pcm_substream *substream, | |||
167 | return -EINVAL; | 167 | return -EINVAL; |
168 | } | 168 | } |
169 | 169 | ||
170 | if (asrc_p2p->output_width == 16) | 170 | if (asrc_p2p->p2p_width == 16) |
171 | output_word_width = ASRC_WIDTH_16_BIT; | 171 | p2p_word_width = ASRC_WIDTH_16_BIT; |
172 | else | 172 | else |
173 | output_word_width = ASRC_WIDTH_24_BIT; | 173 | p2p_word_width = ASRC_WIDTH_24_BIT; |
174 | 174 | ||
175 | switch (params_format(params)) { | 175 | switch (params_format(params)) { |
176 | case SNDRV_PCM_FORMAT_U16: | 176 | case SNDRV_PCM_FORMAT_U16: |
177 | case SNDRV_PCM_FORMAT_S16_LE: | 177 | case SNDRV_PCM_FORMAT_S16_LE: |
178 | case SNDRV_PCM_FORMAT_S16_BE: | 178 | case SNDRV_PCM_FORMAT_S16_BE: |
179 | input_word_width = ASRC_WIDTH_16_BIT; | 179 | word_width = ASRC_WIDTH_16_BIT; |
180 | break; | 180 | break; |
181 | case SNDRV_PCM_FORMAT_S20_3LE: | 181 | case SNDRV_PCM_FORMAT_S20_3LE: |
182 | case SNDRV_PCM_FORMAT_S20_3BE: | 182 | case SNDRV_PCM_FORMAT_S20_3BE: |
@@ -188,7 +188,7 @@ static int config_asrc(struct snd_pcm_substream *substream, | |||
188 | case SNDRV_PCM_FORMAT_U24_LE: | 188 | case SNDRV_PCM_FORMAT_U24_LE: |
189 | case SNDRV_PCM_FORMAT_U24_3BE: | 189 | case SNDRV_PCM_FORMAT_U24_3BE: |
190 | case SNDRV_PCM_FORMAT_U24_3LE: | 190 | case SNDRV_PCM_FORMAT_U24_3LE: |
191 | input_word_width = ASRC_WIDTH_24_BIT; | 191 | word_width = ASRC_WIDTH_24_BIT; |
192 | break; | 192 | break; |
193 | case SNDRV_PCM_FORMAT_S8: | 193 | case SNDRV_PCM_FORMAT_S8: |
194 | case SNDRV_PCM_FORMAT_U8: | 194 | case SNDRV_PCM_FORMAT_U8: |
@@ -199,12 +199,12 @@ static int config_asrc(struct snd_pcm_substream *substream, | |||
199 | return -EINVAL; | 199 | return -EINVAL; |
200 | } | 200 | } |
201 | 201 | ||
202 | config.input_word_width = input_word_width; | 202 | config.input_word_width = word_width; |
203 | config.output_word_width = output_word_width; | 203 | config.output_word_width = p2p_word_width; |
204 | config.pair = asrc_p2p->asrc_index; | 204 | config.pair = asrc_p2p->asrc_index; |
205 | config.channel_num = channel; | 205 | config.channel_num = channel; |
206 | config.input_sample_rate = rate; | 206 | config.input_sample_rate = rate; |
207 | config.output_sample_rate = asrc_p2p->output_rate; | 207 | config.output_sample_rate = asrc_p2p->p2p_rate; |
208 | config.inclk = INCLK_NONE; | 208 | config.inclk = INCLK_NONE; |
209 | 209 | ||
210 | switch (asrc_p2p->per_dev) { | 210 | switch (asrc_p2p->per_dev) { |
@@ -493,19 +493,19 @@ static int fsl_asrc_p2p_probe(struct platform_device *pdev) | |||
493 | 493 | ||
494 | asrc_p2p->asrc_index = -1; | 494 | asrc_p2p->asrc_index = -1; |
495 | 495 | ||
496 | iprop_rate = of_get_property(np, "fsl,output-rate", NULL); | 496 | iprop_rate = of_get_property(np, "fsl,p2p-rate", NULL); |
497 | if (iprop_rate) | 497 | if (iprop_rate) |
498 | asrc_p2p->output_rate = be32_to_cpup(iprop_rate); | 498 | asrc_p2p->p2p_rate = be32_to_cpup(iprop_rate); |
499 | else { | 499 | else { |
500 | dev_err(&pdev->dev, "There is no output-rate in dts\n"); | 500 | dev_err(&pdev->dev, "There is no p2p-rate in dts\n"); |
501 | return -EINVAL; | 501 | return -EINVAL; |
502 | } | 502 | } |
503 | iprop_width = of_get_property(np, "fsl,output-width", NULL); | 503 | iprop_width = of_get_property(np, "fsl,p2p-width", NULL); |
504 | if (iprop_width) | 504 | if (iprop_width) |
505 | asrc_p2p->output_width = be32_to_cpup(iprop_width); | 505 | asrc_p2p->p2p_width = be32_to_cpup(iprop_width); |
506 | 506 | ||
507 | if (asrc_p2p->output_width != 16 && asrc_p2p->output_width != 24) { | 507 | if (asrc_p2p->p2p_width != 16 && asrc_p2p->p2p_width != 24) { |
508 | dev_err(&pdev->dev, "output_width is not acceptable\n"); | 508 | dev_err(&pdev->dev, "p2p_width is not acceptable\n"); |
509 | return -EINVAL; | 509 | return -EINVAL; |
510 | } | 510 | } |
511 | 511 | ||
diff --git a/sound/soc/fsl/fsl_asrc.h b/sound/soc/fsl/fsl_asrc.h index 81af098af520..857f7f0f93a7 100644 --- a/sound/soc/fsl/fsl_asrc.h +++ b/sound/soc/fsl/fsl_asrc.h | |||
@@ -23,8 +23,8 @@ enum peripheral_device_type { | |||
23 | }; | 23 | }; |
24 | 24 | ||
25 | struct fsl_asrc_p2p { | 25 | struct fsl_asrc_p2p { |
26 | int output_rate; | 26 | int p2p_rate; |
27 | int output_width; | 27 | int p2p_width; |
28 | enum asrc_pair_index asrc_index; | 28 | enum asrc_pair_index asrc_index; |
29 | enum peripheral_device_type per_dev; | 29 | enum peripheral_device_type per_dev; |
30 | struct asrc_p2p_ops asrc_ops; | 30 | struct asrc_p2p_ops asrc_ops; |
diff --git a/sound/soc/fsl/imx-cs42888.c b/sound/soc/fsl/imx-cs42888.c index 9dd52b52a591..7a7c47a27e9f 100644 --- a/sound/soc/fsl/imx-cs42888.c +++ b/sound/soc/fsl/imx-cs42888.c | |||
@@ -34,8 +34,8 @@ | |||
34 | 34 | ||
35 | struct imx_priv { | 35 | struct imx_priv { |
36 | int hw; | 36 | int hw; |
37 | int fe_output_rate; | 37 | int fe_p2p_rate; |
38 | int fe_output_width; | 38 | int fe_p2p_width; |
39 | unsigned int mclk_freq; | 39 | unsigned int mclk_freq; |
40 | unsigned int codec_mclk; | 40 | unsigned int codec_mclk; |
41 | struct platform_device *pdev; | 41 | struct platform_device *pdev; |
@@ -160,7 +160,7 @@ static const struct snd_soc_dapm_route audio_map[] = { | |||
160 | {"AIN2L", NULL, "Line In Jack"}, | 160 | {"AIN2L", NULL, "Line In Jack"}, |
161 | {"AIN2R", NULL, "Line In Jack"}, | 161 | {"AIN2R", NULL, "Line In Jack"}, |
162 | {"esai-Playback", NULL, "asrc-Playback"}, | 162 | {"esai-Playback", NULL, "asrc-Playback"}, |
163 | {"codec-Playback", NULL, "esai-Playback"},/*Playback is the codec dai*/ | 163 | {"codec-Playback", NULL, "esai-Playback"},/* dai route for be and fe */ |
164 | }; | 164 | }; |
165 | 165 | ||
166 | static int be_hw_params_fixup(struct snd_soc_pcm_runtime *rtd, | 166 | static int be_hw_params_fixup(struct snd_soc_pcm_runtime *rtd, |
@@ -168,10 +168,10 @@ static int be_hw_params_fixup(struct snd_soc_pcm_runtime *rtd, | |||
168 | 168 | ||
169 | struct imx_priv *priv = &card_priv; | 169 | struct imx_priv *priv = &card_priv; |
170 | 170 | ||
171 | hw_param_interval(params, SNDRV_PCM_HW_PARAM_RATE)->min = priv->fe_output_rate; | 171 | hw_param_interval(params, SNDRV_PCM_HW_PARAM_RATE)->min = priv->fe_p2p_rate; |
172 | hw_param_interval(params, SNDRV_PCM_HW_PARAM_RATE)->max = priv->fe_output_rate; | 172 | hw_param_interval(params, SNDRV_PCM_HW_PARAM_RATE)->max = priv->fe_p2p_rate; |
173 | snd_mask_none(hw_param_mask(params, SNDRV_PCM_HW_PARAM_FORMAT)); | 173 | snd_mask_none(hw_param_mask(params, SNDRV_PCM_HW_PARAM_FORMAT)); |
174 | if (priv->fe_output_width == 16) | 174 | if (priv->fe_p2p_width == 16) |
175 | snd_mask_set(hw_param_mask(params, SNDRV_PCM_HW_PARAM_FORMAT), | 175 | snd_mask_set(hw_param_mask(params, SNDRV_PCM_HW_PARAM_FORMAT), |
176 | SNDRV_PCM_FORMAT_S16_LE); | 176 | SNDRV_PCM_FORMAT_S16_LE); |
177 | else | 177 | else |
@@ -246,8 +246,8 @@ static int imx_cs42888_probe(struct platform_device *pdev) | |||
246 | struct fsl_asrc_p2p *asrc_p2p; | 246 | struct fsl_asrc_p2p *asrc_p2p; |
247 | asrc_p2p = platform_get_drvdata(asrc_pdev); | 247 | asrc_p2p = platform_get_drvdata(asrc_pdev); |
248 | asrc_p2p->per_dev = ESAI; | 248 | asrc_p2p->per_dev = ESAI; |
249 | priv->fe_output_rate = asrc_p2p->output_rate; | 249 | priv->fe_p2p_rate = asrc_p2p->p2p_rate; |
250 | priv->fe_output_width = asrc_p2p->output_width; | 250 | priv->fe_p2p_width = asrc_p2p->p2p_width; |
251 | } | 251 | } |
252 | } | 252 | } |
253 | 253 | ||