From 1236fa1e3c29922d201da0926aa8d62427f74814 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 24 Oct 2016 00:44:10 +0000 Subject: ASoC: soc.h: use bit field for playback/capture_only Current snd_soc_dai_link is already using many bit fields. Let's use it for playback_only/capture_only too. We can reduce struct size in certain environment. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- include/sound/soc.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'include/sound') diff --git a/include/sound/soc.h b/include/sound/soc.h index 4f1c784..3d56930 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h @@ -1025,13 +1025,13 @@ struct snd_soc_dai_link { const struct snd_soc_ops *ops; const struct snd_soc_compr_ops *compr_ops; - /* For unidirectional dai links */ - bool playback_only; - bool capture_only; - /* Mark this pcm with non atomic ops */ bool nonatomic; + /* For unidirectional dai links */ + unsigned int playback_only:1; + unsigned int capture_only:1; + /* Keep DAI active over suspend */ unsigned int ignore_suspend:1; -- cgit v1.1 From a7df0d3b455cb235926f53e02895d94fccba1e14 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 24 Oct 2016 05:24:36 +0000 Subject: ASoC: bunch up bit field for snd_soc_pcm_runtime We can reduce struct size in certain environment. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- include/sound/soc.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'include/sound') diff --git a/include/sound/soc.h b/include/sound/soc.h index 3d56930..d11f1a8 100644 --- a/include/sound/soc.h +++ b/include/sound/soc.h @@ -1203,14 +1203,11 @@ struct snd_soc_pcm_runtime { enum snd_soc_pcm_subclass pcm_subclass; struct snd_pcm_ops ops; - unsigned int dev_registered:1; - /* Dynamic PCM BE runtime data */ struct snd_soc_dpcm_runtime dpcm[2]; int fe_compr; long pmdown_time; - unsigned char pop_wait:1; /* runtime devices */ struct snd_pcm *pcm; @@ -1232,6 +1229,10 @@ struct snd_soc_pcm_runtime { unsigned int num; /* 0-based and monotonic increasing */ struct list_head list; /* rtd list of the soc card */ + + /* bit field */ + unsigned int dev_registered:1; + unsigned int pop_wait:1; }; /* mixer control */ -- cgit v1.1 From 39b2238e2c4b5a34f53871902458a87729c88ae6 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Mon, 24 Oct 2016 05:25:19 +0000 Subject: ASoC: bunch up bit field for snd_soc_dai We can reduce struct size in certain environment. Signed-off-by: Kuninori Morimoto Signed-off-by: Mark Brown --- include/sound/soc-dai.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include/sound') diff --git a/include/sound/soc-dai.h b/include/sound/soc-dai.h index 964b7de..d0ae96b 100644 --- a/include/sound/soc-dai.h +++ b/include/sound/soc-dai.h @@ -268,8 +268,9 @@ struct snd_soc_dai { unsigned int symmetric_rates:1; unsigned int symmetric_channels:1; unsigned int symmetric_samplebits:1; + unsigned int probed:1; + unsigned int active; - unsigned char probed:1; struct snd_soc_dapm_widget *playback_widget; struct snd_soc_dapm_widget *capture_widget; -- cgit v1.1