Lines Matching +full:data +full:- +full:rates
1 // SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause)
20 #include <sound/soc-dai.h>
21 #include <linux/dma-mapping.h>
59 .drv_name = "rmb-nau8825-max",
65 .drv_name = "rembrandt-acp",
69 .drv_name = "rmb-rt5682s-rt1019",
78 .name = "acp-i2s-sp",
82 .rates = SNDRV_PCM_RATE_8000_96000,
92 .rates = SNDRV_PCM_RATE_8000_48000,
103 .name = "acp-i2s-bt",
107 .rates = SNDRV_PCM_RATE_8000_96000,
117 .rates = SNDRV_PCM_RATE_8000_48000,
128 .name = "acp-i2s-hs",
132 .rates = SNDRV_PCM_RATE_8000_96000,
142 .rates = SNDRV_PCM_RATE_8000_48000,
153 .name = "acp-pdm-dmic",
156 .rates = SNDRV_PCM_RATE_8000_48000,
169 int data = 0; in acp6x_master_clock_generate() local
175 return -ENODEV; in acp6x_master_clock_generate()
181 read_poll_timeout(smn_read, data, data, DELAY_US, in acp6x_master_clock_generate()
188 struct device *dev = &pdev->dev; in rembrandt_audio_probe()
193 chip = dev_get_platdata(&pdev->dev); in rembrandt_audio_probe()
194 if (!chip || !chip->base) { in rembrandt_audio_probe()
195 dev_err(&pdev->dev, "ACP chip data is NULL\n"); in rembrandt_audio_probe()
196 return -ENODEV; in rembrandt_audio_probe()
199 if (chip->acp_rev != ACP6X_DEV) { in rembrandt_audio_probe()
200 dev_err(&pdev->dev, "Un-supported ACP Revision %d\n", chip->acp_rev); in rembrandt_audio_probe()
201 return -ENODEV; in rembrandt_audio_probe()
206 return -ENOMEM; in rembrandt_audio_probe()
210 dev_err(&pdev->dev, "IORESOURCE_MEM FAILED\n"); in rembrandt_audio_probe()
211 return -ENODEV; in rembrandt_audio_probe()
214 adata->acp_base = devm_ioremap(&pdev->dev, res->start, resource_size(res)); in rembrandt_audio_probe()
215 if (!adata->acp_base) in rembrandt_audio_probe()
216 return -ENOMEM; in rembrandt_audio_probe()
220 dev_err(&pdev->dev, "IORESOURCE_IRQ FAILED\n"); in rembrandt_audio_probe()
221 return -ENODEV; in rembrandt_audio_probe()
224 adata->i2s_irq = res->start; in rembrandt_audio_probe()
225 adata->dev = dev; in rembrandt_audio_probe()
226 adata->dai_driver = acp_rmb_dai; in rembrandt_audio_probe()
227 adata->num_dai = ARRAY_SIZE(acp_rmb_dai); in rembrandt_audio_probe()
228 adata->rsrc = &rsrc; in rembrandt_audio_probe()
230 adata->machines = snd_soc_acpi_amd_rmb_acp_machines; in rembrandt_audio_probe()
237 pm_runtime_set_autosuspend_delay(&pdev->dev, ACP_SUSPEND_DELAY_MS); in rembrandt_audio_probe()
238 pm_runtime_use_autosuspend(&pdev->dev); in rembrandt_audio_probe()
239 pm_runtime_mark_last_busy(&pdev->dev); in rembrandt_audio_probe()
240 pm_runtime_set_active(&pdev->dev); in rembrandt_audio_probe()
241 pm_runtime_enable(&pdev->dev); in rembrandt_audio_probe()
247 struct device *dev = &pdev->dev; in rembrandt_audio_remove()
252 pm_runtime_disable(&pdev->dev); in rembrandt_audio_remove()
264 spin_lock(&adata->acp_lock); in rmb_pcm_resume()
265 list_for_each_entry(stream, &adata->stream_list, list) { in rmb_pcm_resume()
266 substream = stream->substream; in rmb_pcm_resume()
267 if (substream && substream->runtime) { in rmb_pcm_resume()
268 buf_in_frames = (substream->runtime->buffer_size); in rmb_pcm_resume()
269 buf_size = frames_to_bytes(substream->runtime, buf_in_frames); in rmb_pcm_resume()
272 if (stream->dai_id) in rmb_pcm_resume()
278 spin_unlock(&adata->acp_lock); in rmb_pcm_resume()