| .. | .. |
|---|
| 103 | 103 | int trigger_pending; /* trigger cmd + 1 if pending, 0 if not */ |
|---|
| 104 | 104 | }; |
|---|
| 105 | 105 | |
|---|
| 106 | +#define for_each_dpcm_fe(be, stream, _dpcm) \ |
|---|
| 107 | + list_for_each_entry(_dpcm, &(be)->dpcm[stream].fe_clients, list_fe) |
|---|
| 108 | + |
|---|
| 109 | +#define for_each_dpcm_be(fe, stream, _dpcm) \ |
|---|
| 110 | + list_for_each_entry(_dpcm, &(fe)->dpcm[stream].be_clients, list_be) |
|---|
| 111 | +#define for_each_dpcm_be_safe(fe, stream, _dpcm, __dpcm) \ |
|---|
| 112 | + list_for_each_entry_safe(_dpcm, __dpcm, &(fe)->dpcm[stream].be_clients, list_be) |
|---|
| 113 | +#define for_each_dpcm_be_rollback(fe, stream, _dpcm) \ |
|---|
| 114 | + list_for_each_entry_continue_reverse(_dpcm, &(fe)->dpcm[stream].be_clients, list_be) |
|---|
| 115 | + |
|---|
| 106 | 116 | /* can this BE stop and free */ |
|---|
| 107 | 117 | int snd_soc_dpcm_can_be_free_stop(struct snd_soc_pcm_runtime *fe, |
|---|
| 108 | 118 | struct snd_soc_pcm_runtime *be, int stream); |
|---|
| .. | .. |
|---|
| 110 | 120 | /* can this BE perform a hw_params() */ |
|---|
| 111 | 121 | int snd_soc_dpcm_can_be_params(struct snd_soc_pcm_runtime *fe, |
|---|
| 112 | 122 | struct snd_soc_pcm_runtime *be, int stream); |
|---|
| 123 | + |
|---|
| 124 | +/* can this BE perform prepare */ |
|---|
| 125 | +int snd_soc_dpcm_can_be_prepared(struct snd_soc_pcm_runtime *fe, |
|---|
| 126 | + struct snd_soc_pcm_runtime *be, int stream); |
|---|
| 113 | 127 | |
|---|
| 114 | 128 | /* is the current PCM operation for this FE ? */ |
|---|
| 115 | 129 | int snd_soc_dpcm_fe_can_update(struct snd_soc_pcm_runtime *fe, int stream); |
|---|
| .. | .. |
|---|
| 122 | 136 | struct snd_pcm_substream * |
|---|
| 123 | 137 | snd_soc_dpcm_get_substream(struct snd_soc_pcm_runtime *be, int stream); |
|---|
| 124 | 138 | |
|---|
| 125 | | -/* get the BE runtime state */ |
|---|
| 126 | | -enum snd_soc_dpcm_state |
|---|
| 127 | | - snd_soc_dpcm_be_get_state(struct snd_soc_pcm_runtime *be, int stream); |
|---|
| 139 | +/* update audio routing between PCMs and any DAI links */ |
|---|
| 140 | +int snd_soc_dpcm_runtime_update(struct snd_soc_card *card); |
|---|
| 128 | 141 | |
|---|
| 129 | | -/* set the BE runtime state */ |
|---|
| 130 | | -void snd_soc_dpcm_be_set_state(struct snd_soc_pcm_runtime *be, int stream, |
|---|
| 131 | | - enum snd_soc_dpcm_state state); |
|---|
| 132 | | - |
|---|
| 133 | | -/* internal use only */ |
|---|
| 134 | | -int soc_dpcm_be_digital_mute(struct snd_soc_pcm_runtime *fe, int mute); |
|---|
| 142 | +#ifdef CONFIG_DEBUG_FS |
|---|
| 135 | 143 | void soc_dpcm_debugfs_add(struct snd_soc_pcm_runtime *rtd); |
|---|
| 136 | | -int soc_dpcm_runtime_update(struct snd_soc_card *); |
|---|
| 144 | +#else |
|---|
| 145 | +static inline void soc_dpcm_debugfs_add(struct snd_soc_pcm_runtime *rtd) |
|---|
| 146 | +{ |
|---|
| 147 | +} |
|---|
| 148 | +#endif |
|---|
| 137 | 149 | |
|---|
| 138 | 150 | int dpcm_path_get(struct snd_soc_pcm_runtime *fe, |
|---|
| 139 | 151 | int stream, struct snd_soc_dapm_widget_list **list_); |
|---|
| 152 | +void dpcm_path_put(struct snd_soc_dapm_widget_list **list); |
|---|
| 140 | 153 | int dpcm_process_paths(struct snd_soc_pcm_runtime *fe, |
|---|
| 141 | 154 | int stream, struct snd_soc_dapm_widget_list **list, int new); |
|---|
| 142 | 155 | int dpcm_be_dai_startup(struct snd_soc_pcm_runtime *fe, int stream); |
|---|
| .. | .. |
|---|
| 149 | 162 | int dpcm_be_dai_prepare(struct snd_soc_pcm_runtime *fe, int stream); |
|---|
| 150 | 163 | int dpcm_dapm_stream_event(struct snd_soc_pcm_runtime *fe, int dir, |
|---|
| 151 | 164 | int event); |
|---|
| 152 | | - |
|---|
| 153 | | -static inline void dpcm_path_put(struct snd_soc_dapm_widget_list **list) |
|---|
| 154 | | -{ |
|---|
| 155 | | - kfree(*list); |
|---|
| 156 | | -} |
|---|
| 157 | | - |
|---|
| 158 | 165 | |
|---|
| 159 | 166 | #endif |
|---|