diff options
Diffstat (limited to 'sound/soc/sh/rcar/rsnd.h')
| -rw-r--r-- | sound/soc/sh/rcar/rsnd.h | 55 |
1 files changed, 25 insertions, 30 deletions
diff --git a/sound/soc/sh/rcar/rsnd.h b/sound/soc/sh/rcar/rsnd.h index 7410ec0174db..dbf4163427e8 100644 --- a/sound/soc/sh/rcar/rsnd.h +++ b/sound/soc/sh/rcar/rsnd.h | |||
| @@ -611,35 +611,30 @@ struct rsnd_kctrl_cfg_s { | |||
| 611 | u32 val; | 611 | u32 val; |
| 612 | }; | 612 | }; |
| 613 | 613 | ||
| 614 | void _rsnd_kctrl_remove(struct rsnd_kctrl_cfg *cfg); | 614 | struct rsnd_kctrl_cfg *rsnd_kctrl_init_m(struct rsnd_kctrl_cfg_m *cfg); |
| 615 | #define rsnd_kctrl_remove(_cfg) _rsnd_kctrl_remove(&((_cfg).cfg)) | 615 | struct rsnd_kctrl_cfg *rsnd_kctrl_init_s(struct rsnd_kctrl_cfg_s *cfg); |
| 616 | 616 | int rsnd_kctrl_new(struct rsnd_mod *mod, | |
| 617 | int rsnd_kctrl_new_m(struct rsnd_mod *mod, | 617 | struct rsnd_dai_stream *io, |
| 618 | struct rsnd_dai_stream *io, | 618 | struct snd_soc_pcm_runtime *rtd, |
| 619 | struct snd_soc_pcm_runtime *rtd, | 619 | const unsigned char *name, |
| 620 | const unsigned char *name, | 620 | void (*update)(struct rsnd_dai_stream *io, |
| 621 | void (*update)(struct rsnd_dai_stream *io, | 621 | struct rsnd_mod *mod), |
| 622 | struct rsnd_mod *mod), | 622 | struct rsnd_kctrl_cfg *cfg, |
| 623 | struct rsnd_kctrl_cfg_m *_cfg, | 623 | const char * const *texts, |
| 624 | int ch_size, | 624 | int size, |
| 625 | u32 max); | 625 | u32 max); |
| 626 | int rsnd_kctrl_new_s(struct rsnd_mod *mod, | 626 | |
| 627 | struct rsnd_dai_stream *io, | 627 | #define rsnd_kctrl_new_m(mod, io, rtd, name, update, cfg, size, max) \ |
| 628 | struct snd_soc_pcm_runtime *rtd, | 628 | rsnd_kctrl_new(mod, io, rtd, name, update, rsnd_kctrl_init_m(cfg), \ |
| 629 | const unsigned char *name, | 629 | NULL, size, max) |
| 630 | void (*update)(struct rsnd_dai_stream *io, | 630 | |
| 631 | struct rsnd_mod *mod), | 631 | #define rsnd_kctrl_new_s(mod, io, rtd, name, update, cfg, max) \ |
| 632 | struct rsnd_kctrl_cfg_s *_cfg, | 632 | rsnd_kctrl_new(mod, io, rtd, name, update, rsnd_kctrl_init_s(cfg), \ |
| 633 | u32 max); | 633 | NULL, 1, max) |
| 634 | int rsnd_kctrl_new_e(struct rsnd_mod *mod, | 634 | |
| 635 | struct rsnd_dai_stream *io, | 635 | #define rsnd_kctrl_new_e(mod, io, rtd, name, update, cfg, texts) \ |
| 636 | struct snd_soc_pcm_runtime *rtd, | 636 | rsnd_kctrl_new(mod, io, rtd, name, update, rsnd_kctrl_init_s(cfg), \ |
| 637 | const unsigned char *name, | 637 | texts, 1, ARRAY_SIZE(texts)) |
| 638 | struct rsnd_kctrl_cfg_s *_cfg, | ||
| 639 | void (*update)(struct rsnd_dai_stream *io, | ||
| 640 | struct rsnd_mod *mod), | ||
| 641 | const char * const *texts, | ||
| 642 | u32 max); | ||
| 643 | 638 | ||
| 644 | /* | 639 | /* |
| 645 | * R-Car SSI | 640 | * R-Car SSI |
| @@ -732,8 +727,8 @@ void rsnd_cmd_remove(struct rsnd_priv *priv); | |||
| 732 | int rsnd_cmd_attach(struct rsnd_dai_stream *io, int id); | 727 | int rsnd_cmd_attach(struct rsnd_dai_stream *io, int id); |
| 733 | struct rsnd_mod *rsnd_cmd_mod_get(struct rsnd_priv *priv, int id); | 728 | struct rsnd_mod *rsnd_cmd_mod_get(struct rsnd_priv *priv, int id); |
| 734 | 729 | ||
| 735 | #ifdef DEBUG | ||
| 736 | void rsnd_mod_make_sure(struct rsnd_mod *mod, enum rsnd_mod_type type); | 730 | void rsnd_mod_make_sure(struct rsnd_mod *mod, enum rsnd_mod_type type); |
| 731 | #ifdef DEBUG | ||
| 737 | #define rsnd_mod_confirm_ssi(mssi) rsnd_mod_make_sure(mssi, RSND_MOD_SSI) | 732 | #define rsnd_mod_confirm_ssi(mssi) rsnd_mod_make_sure(mssi, RSND_MOD_SSI) |
| 738 | #define rsnd_mod_confirm_src(msrc) rsnd_mod_make_sure(msrc, RSND_MOD_SRC) | 733 | #define rsnd_mod_confirm_src(msrc) rsnd_mod_make_sure(msrc, RSND_MOD_SRC) |
| 739 | #define rsnd_mod_confirm_dvc(mdvc) rsnd_mod_make_sure(mdvc, RSND_MOD_DVC) | 734 | #define rsnd_mod_confirm_dvc(mdvc) rsnd_mod_make_sure(mdvc, RSND_MOD_DVC) |
