soc-component.h 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538
  1. /* SPDX-License-Identifier: GPL-2.0
  2. *
  3. * soc-component.h
  4. *
  5. * Copyright (C) 2019 Renesas Electronics Corp.
  6. * Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
  7. */
  8. #ifndef __SOC_COMPONENT_H
  9. #define __SOC_COMPONENT_H
  10. #include <sound/soc.h>
  11. /*
  12. * Component probe and remove ordering levels for components with runtime
  13. * dependencies.
  14. */
  15. #define SND_SOC_COMP_ORDER_FIRST -2
  16. #define SND_SOC_COMP_ORDER_EARLY -1
  17. #define SND_SOC_COMP_ORDER_NORMAL 0
  18. #define SND_SOC_COMP_ORDER_LATE 1
  19. #define SND_SOC_COMP_ORDER_LAST 2
  20. #define for_each_comp_order(order) \
  21. for (order = SND_SOC_COMP_ORDER_FIRST; \
  22. order <= SND_SOC_COMP_ORDER_LAST; \
  23. order++)
  24. /* component interface */
  25. struct snd_compress_ops {
  26. int (*open)(struct snd_soc_component *component,
  27. struct snd_compr_stream *stream);
  28. int (*free)(struct snd_soc_component *component,
  29. struct snd_compr_stream *stream);
  30. int (*set_params)(struct snd_soc_component *component,
  31. struct snd_compr_stream *stream,
  32. struct snd_compr_params *params);
  33. int (*get_params)(struct snd_soc_component *component,
  34. struct snd_compr_stream *stream,
  35. struct snd_codec *params);
  36. int (*set_metadata)(struct snd_soc_component *component,
  37. struct snd_compr_stream *stream,
  38. struct snd_compr_metadata *metadata);
  39. int (*get_metadata)(struct snd_soc_component *component,
  40. struct snd_compr_stream *stream,
  41. struct snd_compr_metadata *metadata);
  42. int (*trigger)(struct snd_soc_component *component,
  43. struct snd_compr_stream *stream, int cmd);
  44. int (*pointer)(struct snd_soc_component *component,
  45. struct snd_compr_stream *stream,
  46. struct snd_compr_tstamp *tstamp);
  47. int (*copy)(struct snd_soc_component *component,
  48. struct snd_compr_stream *stream, char __user *buf,
  49. size_t count);
  50. int (*mmap)(struct snd_soc_component *component,
  51. struct snd_compr_stream *stream,
  52. struct vm_area_struct *vma);
  53. int (*ack)(struct snd_soc_component *component,
  54. struct snd_compr_stream *stream, size_t bytes);
  55. int (*get_caps)(struct snd_soc_component *component,
  56. struct snd_compr_stream *stream,
  57. struct snd_compr_caps *caps);
  58. int (*get_codec_caps)(struct snd_soc_component *component,
  59. struct snd_compr_stream *stream,
  60. struct snd_compr_codec_caps *codec);
  61. };
  62. struct snd_soc_component_driver {
  63. const char *name;
  64. /* Default control and setup, added after probe() is run */
  65. const struct snd_kcontrol_new *controls;
  66. unsigned int num_controls;
  67. const struct snd_soc_dapm_widget *dapm_widgets;
  68. unsigned int num_dapm_widgets;
  69. const struct snd_soc_dapm_route *dapm_routes;
  70. unsigned int num_dapm_routes;
  71. int (*probe)(struct snd_soc_component *component);
  72. void (*remove)(struct snd_soc_component *component);
  73. int (*suspend)(struct snd_soc_component *component);
  74. int (*resume)(struct snd_soc_component *component);
  75. unsigned int (*read)(struct snd_soc_component *component,
  76. unsigned int reg);
  77. int (*write)(struct snd_soc_component *component,
  78. unsigned int reg, unsigned int val);
  79. /* pcm creation and destruction */
  80. int (*pcm_construct)(struct snd_soc_component *component,
  81. struct snd_soc_pcm_runtime *rtd);
  82. void (*pcm_destruct)(struct snd_soc_component *component,
  83. struct snd_pcm *pcm);
  84. /* component wide operations */
  85. int (*set_sysclk)(struct snd_soc_component *component,
  86. int clk_id, int source, unsigned int freq, int dir);
  87. int (*set_pll)(struct snd_soc_component *component, int pll_id,
  88. int source, unsigned int freq_in, unsigned int freq_out);
  89. int (*set_jack)(struct snd_soc_component *component,
  90. struct snd_soc_jack *jack, void *data);
  91. int (*get_jack_type)(struct snd_soc_component *component);
  92. /* DT */
  93. int (*of_xlate_dai_name)(struct snd_soc_component *component,
  94. const struct of_phandle_args *args,
  95. const char **dai_name);
  96. int (*of_xlate_dai_id)(struct snd_soc_component *comment,
  97. struct device_node *endpoint);
  98. void (*seq_notifier)(struct snd_soc_component *component,
  99. enum snd_soc_dapm_type type, int subseq);
  100. int (*stream_event)(struct snd_soc_component *component, int event);
  101. int (*set_bias_level)(struct snd_soc_component *component,
  102. enum snd_soc_bias_level level);
  103. int (*open)(struct snd_soc_component *component,
  104. struct snd_pcm_substream *substream);
  105. int (*close)(struct snd_soc_component *component,
  106. struct snd_pcm_substream *substream);
  107. int (*ioctl)(struct snd_soc_component *component,
  108. struct snd_pcm_substream *substream,
  109. unsigned int cmd, void *arg);
  110. int (*hw_params)(struct snd_soc_component *component,
  111. struct snd_pcm_substream *substream,
  112. struct snd_pcm_hw_params *params);
  113. int (*hw_free)(struct snd_soc_component *component,
  114. struct snd_pcm_substream *substream);
  115. int (*prepare)(struct snd_soc_component *component,
  116. struct snd_pcm_substream *substream);
  117. int (*trigger)(struct snd_soc_component *component,
  118. struct snd_pcm_substream *substream, int cmd);
  119. int (*sync_stop)(struct snd_soc_component *component,
  120. struct snd_pcm_substream *substream);
  121. snd_pcm_uframes_t (*pointer)(struct snd_soc_component *component,
  122. struct snd_pcm_substream *substream);
  123. int (*get_time_info)(struct snd_soc_component *component,
  124. struct snd_pcm_substream *substream, struct timespec64 *system_ts,
  125. struct timespec64 *audio_ts,
  126. struct snd_pcm_audio_tstamp_config *audio_tstamp_config,
  127. struct snd_pcm_audio_tstamp_report *audio_tstamp_report);
  128. int (*copy)(struct snd_soc_component *component,
  129. struct snd_pcm_substream *substream, int channel,
  130. unsigned long pos, struct iov_iter *iter,
  131. unsigned long bytes);
  132. struct page *(*page)(struct snd_soc_component *component,
  133. struct snd_pcm_substream *substream,
  134. unsigned long offset);
  135. int (*mmap)(struct snd_soc_component *component,
  136. struct snd_pcm_substream *substream,
  137. struct vm_area_struct *vma);
  138. int (*ack)(struct snd_soc_component *component,
  139. struct snd_pcm_substream *substream);
  140. snd_pcm_sframes_t (*delay)(struct snd_soc_component *component,
  141. struct snd_pcm_substream *substream);
  142. const struct snd_compress_ops *compress_ops;
  143. /* probe ordering - for components with runtime dependencies */
  144. int probe_order;
  145. int remove_order;
  146. /*
  147. * soc_pcm_trigger() start/stop sequence.
  148. * see also
  149. * snd_soc_dai_link
  150. * soc_pcm_trigger()
  151. */
  152. enum snd_soc_trigger_order trigger_start;
  153. enum snd_soc_trigger_order trigger_stop;
  154. /*
  155. * signal if the module handling the component should not be removed
  156. * if a pcm is open. Setting this would prevent the module
  157. * refcount being incremented in probe() but allow it be incremented
  158. * when a pcm is opened and decremented when it is closed.
  159. */
  160. unsigned int module_get_upon_open:1;
  161. /* bits */
  162. unsigned int idle_bias_on:1;
  163. unsigned int suspend_bias_off:1;
  164. unsigned int use_pmdown_time:1; /* care pmdown_time at stop */
  165. /*
  166. * Indicates that the component does not care about the endianness of
  167. * PCM audio data and the core will ensure that both LE and BE variants
  168. * of each used format are present. Typically this is because the
  169. * component sits behind a bus that abstracts away the endian of the
  170. * original data, ie. one for which the transmission endian is defined
  171. * (I2S/SLIMbus/SoundWire), or the concept of endian doesn't exist (PDM,
  172. * analogue).
  173. */
  174. unsigned int endianness:1;
  175. unsigned int legacy_dai_naming:1;
  176. /* this component uses topology and ignore machine driver FEs */
  177. const char *ignore_machine;
  178. const char *topology_name_prefix;
  179. int (*be_hw_params_fixup)(struct snd_soc_pcm_runtime *rtd,
  180. struct snd_pcm_hw_params *params);
  181. bool use_dai_pcm_id; /* use DAI link PCM ID as PCM device number */
  182. int be_pcm_base; /* base device ID for all BE PCMs */
  183. #ifdef CONFIG_DEBUG_FS
  184. const char *debugfs_prefix;
  185. #endif
  186. };
  187. struct snd_soc_component {
  188. const char *name;
  189. int id;
  190. const char *name_prefix;
  191. struct device *dev;
  192. struct snd_soc_card *card;
  193. unsigned int active;
  194. unsigned int suspended:1; /* is in suspend PM state */
  195. struct list_head list;
  196. struct list_head card_aux_list; /* for auxiliary bound components */
  197. struct list_head card_list;
  198. const struct snd_soc_component_driver *driver;
  199. struct list_head dai_list;
  200. int num_dai;
  201. struct regmap *regmap;
  202. int val_bytes;
  203. struct mutex io_mutex;
  204. /* attached dynamic objects */
  205. struct list_head dobj_list;
  206. /*
  207. * DO NOT use any of the fields below in drivers, they are temporary and
  208. * are going to be removed again soon. If you use them in driver code
  209. * the driver will be marked as BROKEN when these fields are removed.
  210. */
  211. /* Don't use these, use snd_soc_component_get_dapm() */
  212. struct snd_soc_dapm_context dapm;
  213. /* machine specific init */
  214. int (*init)(struct snd_soc_component *component);
  215. /* function mark */
  216. void *mark_module;
  217. struct snd_pcm_substream *mark_open;
  218. struct snd_pcm_substream *mark_hw_params;
  219. struct snd_pcm_substream *mark_trigger;
  220. struct snd_compr_stream *mark_compr_open;
  221. void *mark_pm;
  222. struct dentry *debugfs_root;
  223. const char *debugfs_prefix;
  224. };
  225. #define for_each_component_dais(component, dai)\
  226. list_for_each_entry(dai, &(component)->dai_list, list)
  227. #define for_each_component_dais_safe(component, dai, _dai)\
  228. list_for_each_entry_safe(dai, _dai, &(component)->dai_list, list)
  229. /**
  230. * snd_soc_dapm_to_component() - Casts a DAPM context to the component it is
  231. * embedded in
  232. * @dapm: The DAPM context to cast to the component
  233. *
  234. * This function must only be used on DAPM contexts that are known to be part of
  235. * a component (e.g. in a component driver). Otherwise the behavior is
  236. * undefined.
  237. */
  238. static inline struct snd_soc_component *snd_soc_dapm_to_component(
  239. struct snd_soc_dapm_context *dapm)
  240. {
  241. return container_of(dapm, struct snd_soc_component, dapm);
  242. }
  243. /**
  244. * snd_soc_component_get_dapm() - Returns the DAPM context associated with a
  245. * component
  246. * @component: The component for which to get the DAPM context
  247. */
  248. static inline struct snd_soc_dapm_context *snd_soc_component_get_dapm(
  249. struct snd_soc_component *component)
  250. {
  251. return &component->dapm;
  252. }
  253. /**
  254. * snd_soc_component_init_bias_level() - Initialize COMPONENT DAPM bias level
  255. * @component: The COMPONENT for which to initialize the DAPM bias level
  256. * @level: The DAPM level to initialize to
  257. *
  258. * Initializes the COMPONENT DAPM bias level. See snd_soc_dapm_init_bias_level()
  259. */
  260. static inline void
  261. snd_soc_component_init_bias_level(struct snd_soc_component *component,
  262. enum snd_soc_bias_level level)
  263. {
  264. snd_soc_dapm_init_bias_level(
  265. snd_soc_component_get_dapm(component), level);
  266. }
  267. /**
  268. * snd_soc_component_get_bias_level() - Get current COMPONENT DAPM bias level
  269. * @component: The COMPONENT for which to get the DAPM bias level
  270. *
  271. * Returns: The current DAPM bias level of the COMPONENT.
  272. */
  273. static inline enum snd_soc_bias_level
  274. snd_soc_component_get_bias_level(struct snd_soc_component *component)
  275. {
  276. return snd_soc_dapm_get_bias_level(
  277. snd_soc_component_get_dapm(component));
  278. }
  279. /**
  280. * snd_soc_component_force_bias_level() - Set the COMPONENT DAPM bias level
  281. * @component: The COMPONENT for which to set the level
  282. * @level: The level to set to
  283. *
  284. * Forces the COMPONENT bias level to a specific state. See
  285. * snd_soc_dapm_force_bias_level().
  286. */
  287. static inline int
  288. snd_soc_component_force_bias_level(struct snd_soc_component *component,
  289. enum snd_soc_bias_level level)
  290. {
  291. return snd_soc_dapm_force_bias_level(
  292. snd_soc_component_get_dapm(component),
  293. level);
  294. }
  295. /**
  296. * snd_soc_dapm_kcontrol_component() - Returns the component associated to a
  297. * kcontrol
  298. * @kcontrol: The kcontrol
  299. *
  300. * This function must only be used on DAPM contexts that are known to be part of
  301. * a COMPONENT (e.g. in a COMPONENT driver). Otherwise the behavior is undefined
  302. */
  303. static inline struct snd_soc_component *snd_soc_dapm_kcontrol_component(
  304. struct snd_kcontrol *kcontrol)
  305. {
  306. return snd_soc_dapm_to_component(snd_soc_dapm_kcontrol_dapm(kcontrol));
  307. }
  308. /**
  309. * snd_soc_component_cache_sync() - Sync the register cache with the hardware
  310. * @component: COMPONENT to sync
  311. *
  312. * Note: This function will call regcache_sync()
  313. */
  314. static inline int snd_soc_component_cache_sync(
  315. struct snd_soc_component *component)
  316. {
  317. return regcache_sync(component->regmap);
  318. }
  319. void snd_soc_component_set_aux(struct snd_soc_component *component,
  320. struct snd_soc_aux_dev *aux);
  321. int snd_soc_component_init(struct snd_soc_component *component);
  322. int snd_soc_component_is_dummy(struct snd_soc_component *component);
  323. /* component IO */
  324. unsigned int snd_soc_component_read(struct snd_soc_component *component,
  325. unsigned int reg);
  326. int snd_soc_component_write(struct snd_soc_component *component,
  327. unsigned int reg, unsigned int val);
  328. int snd_soc_component_update_bits(struct snd_soc_component *component,
  329. unsigned int reg, unsigned int mask,
  330. unsigned int val);
  331. int snd_soc_component_update_bits_async(struct snd_soc_component *component,
  332. unsigned int reg, unsigned int mask,
  333. unsigned int val);
  334. void snd_soc_component_async_complete(struct snd_soc_component *component);
  335. int snd_soc_component_test_bits(struct snd_soc_component *component,
  336. unsigned int reg, unsigned int mask,
  337. unsigned int value);
  338. unsigned int snd_soc_component_read_field(struct snd_soc_component *component,
  339. unsigned int reg, unsigned int mask);
  340. int snd_soc_component_write_field(struct snd_soc_component *component,
  341. unsigned int reg, unsigned int mask,
  342. unsigned int val);
  343. /* component wide operations */
  344. int snd_soc_component_set_sysclk(struct snd_soc_component *component,
  345. int clk_id, int source,
  346. unsigned int freq, int dir);
  347. int snd_soc_component_set_pll(struct snd_soc_component *component, int pll_id,
  348. int source, unsigned int freq_in,
  349. unsigned int freq_out);
  350. int snd_soc_component_set_jack(struct snd_soc_component *component,
  351. struct snd_soc_jack *jack, void *data);
  352. int snd_soc_component_get_jack_type(struct snd_soc_component *component);
  353. void snd_soc_component_seq_notifier(struct snd_soc_component *component,
  354. enum snd_soc_dapm_type type, int subseq);
  355. int snd_soc_component_stream_event(struct snd_soc_component *component,
  356. int event);
  357. int snd_soc_component_set_bias_level(struct snd_soc_component *component,
  358. enum snd_soc_bias_level level);
  359. void snd_soc_component_setup_regmap(struct snd_soc_component *component);
  360. #ifdef CONFIG_REGMAP
  361. void snd_soc_component_init_regmap(struct snd_soc_component *component,
  362. struct regmap *regmap);
  363. void snd_soc_component_exit_regmap(struct snd_soc_component *component);
  364. #endif
  365. #define snd_soc_component_module_get_when_probe(component)\
  366. snd_soc_component_module_get(component, NULL, 0)
  367. #define snd_soc_component_module_get_when_open(component, substream) \
  368. snd_soc_component_module_get(component, substream, 1)
  369. int snd_soc_component_module_get(struct snd_soc_component *component,
  370. void *mark, int upon_open);
  371. #define snd_soc_component_module_put_when_remove(component) \
  372. snd_soc_component_module_put(component, NULL, 0, 0)
  373. #define snd_soc_component_module_put_when_close(component, substream, rollback) \
  374. snd_soc_component_module_put(component, substream, 1, rollback)
  375. void snd_soc_component_module_put(struct snd_soc_component *component,
  376. void *mark, int upon_open, int rollback);
  377. static inline void snd_soc_component_set_drvdata(struct snd_soc_component *c,
  378. void *data)
  379. {
  380. dev_set_drvdata(c->dev, data);
  381. }
  382. static inline void *snd_soc_component_get_drvdata(struct snd_soc_component *c)
  383. {
  384. return dev_get_drvdata(c->dev);
  385. }
  386. static inline unsigned int
  387. snd_soc_component_active(struct snd_soc_component *component)
  388. {
  389. return component->active;
  390. }
  391. /* component pin */
  392. int snd_soc_component_enable_pin(struct snd_soc_component *component,
  393. const char *pin);
  394. int snd_soc_component_enable_pin_unlocked(struct snd_soc_component *component,
  395. const char *pin);
  396. int snd_soc_component_disable_pin(struct snd_soc_component *component,
  397. const char *pin);
  398. int snd_soc_component_disable_pin_unlocked(struct snd_soc_component *component,
  399. const char *pin);
  400. int snd_soc_component_nc_pin(struct snd_soc_component *component,
  401. const char *pin);
  402. int snd_soc_component_nc_pin_unlocked(struct snd_soc_component *component,
  403. const char *pin);
  404. int snd_soc_component_get_pin_status(struct snd_soc_component *component,
  405. const char *pin);
  406. int snd_soc_component_force_enable_pin(struct snd_soc_component *component,
  407. const char *pin);
  408. int snd_soc_component_force_enable_pin_unlocked(
  409. struct snd_soc_component *component,
  410. const char *pin);
  411. /* component controls */
  412. struct snd_kcontrol *snd_soc_component_get_kcontrol(struct snd_soc_component *component,
  413. const char * const ctl);
  414. int snd_soc_component_notify_control(struct snd_soc_component *component,
  415. const char * const ctl);
  416. /* component driver ops */
  417. int snd_soc_component_open(struct snd_soc_component *component,
  418. struct snd_pcm_substream *substream);
  419. int snd_soc_component_close(struct snd_soc_component *component,
  420. struct snd_pcm_substream *substream,
  421. int rollback);
  422. void snd_soc_component_suspend(struct snd_soc_component *component);
  423. void snd_soc_component_resume(struct snd_soc_component *component);
  424. int snd_soc_component_is_suspended(struct snd_soc_component *component);
  425. int snd_soc_component_probe(struct snd_soc_component *component);
  426. void snd_soc_component_remove(struct snd_soc_component *component);
  427. int snd_soc_component_of_xlate_dai_id(struct snd_soc_component *component,
  428. struct device_node *ep);
  429. int snd_soc_component_of_xlate_dai_name(struct snd_soc_component *component,
  430. const struct of_phandle_args *args,
  431. const char **dai_name);
  432. int snd_soc_component_compr_open(struct snd_soc_component *component,
  433. struct snd_compr_stream *cstream);
  434. void snd_soc_component_compr_free(struct snd_soc_component *component,
  435. struct snd_compr_stream *cstream,
  436. int rollback);
  437. int snd_soc_component_compr_trigger(struct snd_compr_stream *cstream, int cmd);
  438. int snd_soc_component_compr_set_params(struct snd_compr_stream *cstream,
  439. struct snd_compr_params *params);
  440. int snd_soc_component_compr_get_params(struct snd_compr_stream *cstream,
  441. struct snd_codec *params);
  442. int snd_soc_component_compr_get_caps(struct snd_compr_stream *cstream,
  443. struct snd_compr_caps *caps);
  444. int snd_soc_component_compr_get_codec_caps(struct snd_compr_stream *cstream,
  445. struct snd_compr_codec_caps *codec);
  446. int snd_soc_component_compr_ack(struct snd_compr_stream *cstream, size_t bytes);
  447. int snd_soc_component_compr_pointer(struct snd_compr_stream *cstream,
  448. struct snd_compr_tstamp *tstamp);
  449. int snd_soc_component_compr_copy(struct snd_compr_stream *cstream,
  450. char __user *buf, size_t count);
  451. int snd_soc_component_compr_set_metadata(struct snd_compr_stream *cstream,
  452. struct snd_compr_metadata *metadata);
  453. int snd_soc_component_compr_get_metadata(struct snd_compr_stream *cstream,
  454. struct snd_compr_metadata *metadata);
  455. int snd_soc_pcm_component_pointer(struct snd_pcm_substream *substream);
  456. int snd_soc_pcm_component_ioctl(struct snd_pcm_substream *substream,
  457. unsigned int cmd, void *arg);
  458. int snd_soc_pcm_component_sync_stop(struct snd_pcm_substream *substream);
  459. int snd_soc_pcm_component_copy(struct snd_pcm_substream *substream,
  460. int channel, unsigned long pos,
  461. struct iov_iter *iter, unsigned long bytes);
  462. struct page *snd_soc_pcm_component_page(struct snd_pcm_substream *substream,
  463. unsigned long offset);
  464. int snd_soc_pcm_component_mmap(struct snd_pcm_substream *substream,
  465. struct vm_area_struct *vma);
  466. int snd_soc_pcm_component_new(struct snd_soc_pcm_runtime *rtd);
  467. void snd_soc_pcm_component_free(struct snd_soc_pcm_runtime *rtd);
  468. int snd_soc_pcm_component_prepare(struct snd_pcm_substream *substream);
  469. int snd_soc_pcm_component_hw_params(struct snd_pcm_substream *substream,
  470. struct snd_pcm_hw_params *params);
  471. void snd_soc_pcm_component_hw_free(struct snd_pcm_substream *substream,
  472. int rollback);
  473. int snd_soc_pcm_component_trigger(struct snd_pcm_substream *substream,
  474. int cmd, int rollback);
  475. int snd_soc_pcm_component_pm_runtime_get(struct snd_soc_pcm_runtime *rtd,
  476. void *stream);
  477. void snd_soc_pcm_component_pm_runtime_put(struct snd_soc_pcm_runtime *rtd,
  478. void *stream, int rollback);
  479. int snd_soc_pcm_component_ack(struct snd_pcm_substream *substream);
  480. void snd_soc_pcm_component_delay(struct snd_pcm_substream *substream,
  481. snd_pcm_sframes_t *cpu_delay, snd_pcm_sframes_t *codec_delay);
  482. #endif /* __SOC_COMPONENT_H */