Skip to content

Commit 250a15c

Browse files
morimotobroonie
authored andcommitted
ASoC: soc-core: remove bus_control
Now, snd_soc_dai_driver::bus_control is used for how to resume. But, no driver which has bus_control has DAI driver suspend/resume support. This patch removes pointless bus_control from ALSA SoC. Signed-off-by: Kuninori Morimoto <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 450312b commit 250a15c

File tree

12 files changed

+3
-35
lines changed

12 files changed

+3
-35
lines changed

include/sound/soc-dai.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,6 @@ struct snd_soc_dai_driver {
302302
unsigned int symmetric_rates:1;
303303
unsigned int symmetric_channels:1;
304304
unsigned int symmetric_samplebits:1;
305-
unsigned int bus_control:1; /* DAI is also used for the control bus */
306305

307306
/* probe ordering - for components with runtime dependencies */
308307
int probe_order;

sound/soc/au1x/ac97c.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,6 @@ static int au1xac97c_dai_probe(struct snd_soc_dai *dai)
206206

207207
static struct snd_soc_dai_driver au1xac97c_dai_driver = {
208208
.name = "alchemy-ac97c",
209-
.bus_control = true,
210209
.probe = au1xac97c_dai_probe,
211210
.playback = {
212211
.rates = AC97_RATES,

sound/soc/au1x/psc-ac97.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,6 @@ static const struct snd_soc_dai_ops au1xpsc_ac97_dai_ops = {
339339
};
340340

341341
static const struct snd_soc_dai_driver au1xpsc_ac97_dai_template = {
342-
.bus_control = true,
343342
.probe = au1xpsc_ac97_probe,
344343
.playback = {
345344
.rates = AC97_RATES,

sound/soc/cirrus/ep93xx-ac97.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,6 @@ static const struct snd_soc_dai_ops ep93xx_ac97_dai_ops = {
336336
static struct snd_soc_dai_driver ep93xx_ac97_dai = {
337337
.name = "ep93xx-ac97",
338338
.id = 0,
339-
.bus_control = true,
340339
.probe = ep93xx_ac97_dai_probe,
341340
.playback = {
342341
.stream_name = "AC97 Playback",

sound/soc/fsl/fsl_ssi.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1136,7 +1136,6 @@ static const struct snd_soc_component_driver fsl_ssi_component = {
11361136
};
11371137

11381138
static struct snd_soc_dai_driver fsl_ssi_ac97_dai = {
1139-
.bus_control = true,
11401139
.symmetric_channels = 1,
11411140
.probe = fsl_ssi_dai_probe,
11421141
.playback = {

sound/soc/fsl/imx-ssi.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,6 @@ static struct snd_soc_dai_driver imx_ssi_dai = {
373373

374374
static struct snd_soc_dai_driver imx_ac97_dai = {
375375
.probe = imx_ssi_dai_probe,
376-
.bus_control = true,
377376
.playback = {
378377
.stream_name = "AC97 Playback",
379378
.channels_min = 2,

sound/soc/fsl/mpc5200_psc_ac97.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,6 @@ static const struct snd_soc_dai_ops psc_ac97_digital_ops = {
233233
static struct snd_soc_dai_driver psc_ac97_dai[] = {
234234
{
235235
.name = "mpc5200-psc-ac97.0",
236-
.bus_control = true,
237236
.probe = psc_ac97_probe,
238237
.playback = {
239238
.stream_name = "AC97 Playback",
@@ -253,7 +252,6 @@ static struct snd_soc_dai_driver psc_ac97_dai[] = {
253252
},
254253
{
255254
.name = "mpc5200-psc-ac97.1",
256-
.bus_control = true,
257255
.playback = {
258256
.stream_name = "AC97 SPDIF",
259257
.channels_min = 1,

sound/soc/pxa/pxa2xx-ac97.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,6 @@ static const struct snd_soc_dai_ops pxa_ac97_mic_dai_ops = {
157157
static struct snd_soc_dai_driver pxa_ac97_dai_driver[] = {
158158
{
159159
.name = "pxa2xx-ac97",
160-
.bus_control = true,
161160
.playback = {
162161
.stream_name = "AC97 Playback",
163162
.channels_min = 2,
@@ -174,7 +173,6 @@ static struct snd_soc_dai_driver pxa_ac97_dai_driver[] = {
174173
},
175174
{
176175
.name = "pxa2xx-ac97-aux",
177-
.bus_control = true,
178176
.playback = {
179177
.stream_name = "AC97 Aux Playback",
180178
.channels_min = 1,
@@ -191,7 +189,6 @@ static struct snd_soc_dai_driver pxa_ac97_dai_driver[] = {
191189
},
192190
{
193191
.name = "pxa2xx-ac97-mic",
194-
.bus_control = true,
195192
.capture = {
196193
.stream_name = "AC97 Mic Capture",
197194
.channels_min = 1,

sound/soc/sh/hac.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,6 @@ static const struct snd_soc_dai_ops hac_dai_ops = {
270270
static struct snd_soc_dai_driver sh4_hac_dai[] = {
271271
{
272272
.name = "hac-dai.0",
273-
.bus_control = true,
274273
.playback = {
275274
.rates = AC97_RATES,
276275
.formats = AC97_FMTS,

sound/soc/soc-core.c

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -712,8 +712,6 @@ static void soc_resume_deferred(struct work_struct *work)
712712
int snd_soc_resume(struct device *dev)
713713
{
714714
struct snd_soc_card *card = dev_get_drvdata(dev);
715-
bool bus_control = false;
716-
struct snd_soc_pcm_runtime *rtd;
717715
struct snd_soc_component *component;
718716

719717
/* If the card is not initialized yet there is nothing to do */
@@ -725,25 +723,9 @@ int snd_soc_resume(struct device *dev)
725723
if (component->active)
726724
pinctrl_pm_select_default_state(component->dev);
727725

728-
/*
729-
* DAIs that also act as the control bus master might have other drivers
730-
* hanging off them so need to resume immediately. Other drivers don't
731-
* have that problem and may take a substantial amount of time to resume
732-
* due to I/O costs and anti-pop so handle them out of line.
733-
*/
734-
for_each_card_rtds(card, rtd) {
735-
struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
736-
737-
bus_control |= cpu_dai->driver->bus_control;
738-
}
739-
if (bus_control) {
740-
dev_dbg(dev, "ASoC: Resuming control bus master immediately\n");
741-
soc_resume_deferred(&card->deferred_resume_work);
742-
} else {
743-
dev_dbg(dev, "ASoC: Scheduling resume work\n");
744-
if (!schedule_work(&card->deferred_resume_work))
745-
dev_err(dev, "ASoC: resume work item may be lost\n");
746-
}
726+
dev_dbg(dev, "ASoC: Scheduling resume work\n");
727+
if (!schedule_work(&card->deferred_resume_work))
728+
dev_err(dev, "ASoC: resume work item may be lost\n");
747729

748730
return 0;
749731
}

0 commit comments

Comments
 (0)