/* pcm creation and destruction */ int (*pcm_construct)(struct snd_soc_component *component, struct snd_soc_pcm_runtime *rtd); void (*pcm_destruct)(struct snd_soc_component *component, struct snd_pcm *pcm);
/* component wide operations */ int (*set_sysclk)(struct snd_soc_component *component, int clk_id, int source, unsignedint freq, int dir); int (*set_pll)(struct snd_soc_component *component, int pll_id, int source, unsignedint freq_in, unsignedint freq_out); int (*set_jack)(struct snd_soc_component *component, struct snd_soc_jack *jack, void *data); int (*get_jack_type)(struct snd_soc_component *component);
/* DT */ int (*of_xlate_dai_name)(struct snd_soc_component *component, conststruct of_phandle_args *args, constchar **dai_name); int (*of_xlate_dai_id)(struct snd_soc_component *comment, struct device_node *endpoint); void (*seq_notifier)(struct snd_soc_component *component, enum snd_soc_dapm_type type, int subseq); int (*stream_event)(struct snd_soc_component *component, int event); int (*set_bias_level)(struct snd_soc_component *component, enum snd_soc_bias_level level);
/* probe ordering - for components with runtime dependencies */ int probe_order; int remove_order;
/* * soc_pcm_trigger() start/stop sequence. * see also * snd_soc_dai_link * soc_pcm_trigger()
*/ enum snd_soc_trigger_order trigger_start; enum snd_soc_trigger_order trigger_stop;
/* * signal if the module handling the component should not be removed * if a pcm is open. Setting this would prevent the module * refcount being incremented in probe() but allow it be incremented * when a pcm is opened and decremented when it is closed.
*/ unsignedint module_get_upon_open:1;
/* bits */ unsignedint idle_bias_on:1; unsignedint suspend_bias_off:1; unsignedint use_pmdown_time:1; /* care pmdown_time at stop */ /* * Indicates that the component does not care about the endianness of * PCM audio data and the core will ensure that both LE and BE variants * of each used format are present. Typically this is because the * component sits behind a bus that abstracts away the endian of the * original data, ie. one for which the transmission endian is defined * (I2S/SLIMbus/SoundWire), or the concept of endian doesn't exist (PDM, * analogue).
*/ unsignedint endianness:1; unsignedint legacy_dai_naming:1;
/* this component uses topology and ignore machine driver FEs */ constchar *ignore_machine; constchar *topology_name_prefix; int (*be_hw_params_fixup)(struct snd_soc_pcm_runtime *rtd, struct snd_pcm_hw_params *params); bool use_dai_pcm_id; /* use DAI link PCM ID as PCM device number */ int be_pcm_base; /* base device ID for all BE PCMs */
/* * DO NOT use any of the fields below in drivers, they are temporary and * are going to be removed again soon. If you use them in driver code * the driver will be marked as BROKEN when these fields are removed.
*/
/* Don't use these, use snd_soc_component_get_dapm() */ struct snd_soc_dapm_context dapm;
/* machine specific init */ int (*init)(struct snd_soc_component *component);
/* function mark */ void *mark_module; struct snd_pcm_substream *mark_open; struct snd_pcm_substream *mark_hw_params; struct snd_pcm_substream *mark_trigger; struct snd_compr_stream *mark_compr_open; void *mark_pm;
/** * snd_soc_dapm_to_component() - Casts a DAPM context to the component it is * embedded in * @dapm: The DAPM context to cast to the component * * This function must only be used on DAPM contexts that are known to be part of * a component (e.g. in a component driver). Otherwise the behavior is * undefined.
*/ staticinlinestruct snd_soc_component *snd_soc_dapm_to_component( struct snd_soc_dapm_context *dapm)
{ return container_of(dapm, struct snd_soc_component, dapm);
}
/** * snd_soc_component_get_dapm() - Returns the DAPM context associated with a * component * @component: The component for which to get the DAPM context
*/ staticinlinestruct snd_soc_dapm_context *snd_soc_component_get_dapm( struct snd_soc_component *component)
{ return &component->dapm;
}
/** * snd_soc_component_init_bias_level() - Initialize COMPONENT DAPM bias level * @component: The COMPONENT for which to initialize the DAPM bias level * @level: The DAPM level to initialize to * * Initializes the COMPONENT DAPM bias level. See snd_soc_dapm_init_bias_level()
*/ staticinlinevoid
snd_soc_component_init_bias_level(struct snd_soc_component *component, enum snd_soc_bias_level level)
{
snd_soc_dapm_init_bias_level(
snd_soc_component_get_dapm(component), level);
}
/** * snd_soc_component_get_bias_level() - Get current COMPONENT DAPM bias level * @component: The COMPONENT for which to get the DAPM bias level * * Returns: The current DAPM bias level of the COMPONENT.
*/ staticinlineenum snd_soc_bias_level
snd_soc_component_get_bias_level(struct snd_soc_component *component)
{ return snd_soc_dapm_get_bias_level(
snd_soc_component_get_dapm(component));
}
/** * snd_soc_component_force_bias_level() - Set the COMPONENT DAPM bias level * @component: The COMPONENT for which to set the level * @level: The level to set to * * Forces the COMPONENT bias level to a specific state. See * snd_soc_dapm_force_bias_level().
*/ staticinlineint
snd_soc_component_force_bias_level(struct snd_soc_component *component, enum snd_soc_bias_level level)
{ return snd_soc_dapm_force_bias_level(
snd_soc_component_get_dapm(component),
level);
}
/** * snd_soc_dapm_kcontrol_component() - Returns the component associated to a * kcontrol * @kcontrol: The kcontrol * * This function must only be used on DAPM contexts that are known to be part of * a COMPONENT (e.g. in a COMPONENT driver). Otherwise the behavior is undefined
*/ staticinlinestruct snd_soc_component *snd_soc_dapm_kcontrol_component( struct snd_kcontrol *kcontrol)
{ return snd_soc_dapm_to_component(snd_soc_dapm_kcontrol_dapm(kcontrol));
}
/** * snd_soc_component_cache_sync() - Sync the register cache with the hardware * @component: COMPONENT to sync * * Note: This function will call regcache_sync()
*/ staticinlineint snd_soc_component_cache_sync( struct snd_soc_component *component)
{ return regcache_sync(component->regmap);
}
void snd_soc_component_set_aux(struct snd_soc_component *component, struct snd_soc_aux_dev *aux); int snd_soc_component_init(struct snd_soc_component *component); int snd_soc_component_is_dummy(struct snd_soc_component *component);
/* component wide operations */ int snd_soc_component_set_sysclk(struct snd_soc_component *component, int clk_id, int source, unsignedint freq, int dir); int snd_soc_component_set_pll(struct snd_soc_component *component, int pll_id, int source, unsignedint freq_in, unsignedint freq_out); int snd_soc_component_set_jack(struct snd_soc_component *component, struct snd_soc_jack *jack, void *data); int snd_soc_component_get_jack_type(struct snd_soc_component *component);
void snd_soc_component_seq_notifier(struct snd_soc_component *component, enum snd_soc_dapm_type type, int subseq); int snd_soc_component_stream_event(struct snd_soc_component *component, int event); int snd_soc_component_set_bias_level(struct snd_soc_component *component, enum snd_soc_bias_level level);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.