@@ -1181,6 +1181,7 @@ typedef struct _snd_pcm_hook snd_pcm_hook_t;
/** PCM hook callback function */
typedef int (*snd_pcm_hook_func_t)(snd_pcm_hook_t *hook);
snd_pcm_t *snd_pcm_hook_get_pcm(snd_pcm_hook_t *hook);
+snd_pcm_hw_params_t *snd_pcm_hook_get_hw_params(snd_pcm_hook_t *hook);
void *snd_pcm_hook_get_private(snd_pcm_hook_t *hook);
void snd_pcm_hook_set_private(snd_pcm_hook_t *hook, void *private_data);
int snd_pcm_hook_add(snd_pcm_hook_t **hookp, snd_pcm_t *pcm,
@@ -38,6 +38,7 @@ const char *_snd_module_pcm_hooks = "";
#ifndef DOC_HIDDEN
struct _snd_pcm_hook {
snd_pcm_t *pcm;
+ snd_pcm_hw_params_t *params;
snd_pcm_hook_func_t func;
void *private_data;
struct list_head list;
@@ -117,6 +118,7 @@ static int snd_pcm_hooks_hw_params(snd_pcm_t *pcm,
snd_pcm_hw_params_t *params)
return err;
list_for_each_safe(pos, next,
&h->hooks[SND_PCM_HOOK_TYPE_HW_PARAMS]) {
snd_pcm_hook_t *hook = list_entry(pos, snd_pcm_hook_t,
list);
+ hook->params = params;