Lines Matching refs:component
41 struct snd_soc_component *component; member
474 static int cs42l52_add_mic_controls(struct snd_soc_component *component) in cs42l52_add_mic_controls() argument
476 struct cs42l52_private *cs42l52 = snd_soc_component_get_drvdata(component); in cs42l52_add_mic_controls()
480 snd_soc_add_component_controls(component, cs42l52_mica_controls, in cs42l52_add_mic_controls()
484 snd_soc_add_component_controls(component, cs42l52_micb_controls, in cs42l52_add_mic_controls()
717 struct snd_soc_component *component = codec_dai->component; in cs42l52_set_sysclk() local
718 struct cs42l52_private *cs42l52 = snd_soc_component_get_drvdata(component); in cs42l52_set_sysclk()
723 dev_err(component->dev, "Invalid freq parameter\n"); in cs42l52_set_sysclk()
731 struct snd_soc_component *component = codec_dai->component; in cs42l52_set_fmt() local
732 struct cs42l52_private *cs42l52 = snd_soc_component_get_drvdata(component); in cs42l52_set_fmt()
784 snd_soc_component_write(component, CS42L52_IFACE_CTL1, cs42l52->config.format); in cs42l52_set_fmt()
791 struct snd_soc_component *component = dai->component; in cs42l52_mute() local
794 snd_soc_component_update_bits(component, CS42L52_PB_CTL1, in cs42l52_mute()
798 snd_soc_component_update_bits(component, CS42L52_PB_CTL1, in cs42l52_mute()
809 struct snd_soc_component *component = dai->component; in cs42l52_pcm_hw_params() local
810 struct cs42l52_private *cs42l52 = snd_soc_component_get_drvdata(component); in cs42l52_pcm_hw_params()
824 snd_soc_component_write(component, CS42L52_CLK_CTL, clk); in cs42l52_pcm_hw_params()
826 dev_err(component->dev, "can't get correct mclk\n"); in cs42l52_pcm_hw_params()
833 static int cs42l52_set_bias_level(struct snd_soc_component *component, in cs42l52_set_bias_level() argument
836 struct cs42l52_private *cs42l52 = snd_soc_component_get_drvdata(component); in cs42l52_set_bias_level()
842 snd_soc_component_update_bits(component, CS42L52_PWRCTL1, in cs42l52_set_bias_level()
846 if (snd_soc_component_get_bias_level(component) == SND_SOC_BIAS_OFF) { in cs42l52_set_bias_level()
850 snd_soc_component_write(component, CS42L52_PWRCTL1, CS42L52_PWRCTL1_PDN_ALL); in cs42l52_set_bias_level()
853 snd_soc_component_write(component, CS42L52_PWRCTL1, CS42L52_PWRCTL1_PDN_ALL); in cs42l52_set_bias_level()
904 struct snd_soc_component *component = cs42l52->component; in cs42l52_beep_work() local
905 struct snd_soc_dapm_context *dapm = snd_soc_component_get_dapm(component); in cs42l52_beep_work()
917 dev_dbg(component->dev, "Set beep rate %dHz for requested %dHz\n", in cs42l52_beep_work()
924 dev_dbg(component->dev, "Disabling beep\n"); in cs42l52_beep_work()
928 snd_soc_component_update_bits(component, CS42L52_BEEP_FREQ, in cs42l52_beep_work()
940 struct snd_soc_component *component = input_get_drvdata(dev); in cs42l52_beep_event() local
941 struct cs42l52_private *cs42l52 = snd_soc_component_get_drvdata(component); in cs42l52_beep_event()
943 dev_dbg(component->dev, "Beep event %x %x\n", code, hz); in cs42l52_beep_event()
980 static void cs42l52_init_beep(struct snd_soc_component *component) in cs42l52_init_beep() argument
982 struct cs42l52_private *cs42l52 = snd_soc_component_get_drvdata(component); in cs42l52_init_beep()
985 cs42l52->beep = devm_input_allocate_device(component->dev); in cs42l52_init_beep()
987 dev_err(component->dev, "Failed to allocate beep device\n"); in cs42l52_init_beep()
995 cs42l52->beep->phys = dev_name(component->dev); in cs42l52_init_beep()
1001 cs42l52->beep->dev.parent = component->dev; in cs42l52_init_beep()
1002 input_set_drvdata(cs42l52->beep, component); in cs42l52_init_beep()
1007 dev_err(component->dev, "Failed to register beep device\n"); in cs42l52_init_beep()
1010 ret = device_create_file(component->dev, &dev_attr_beep); in cs42l52_init_beep()
1012 dev_err(component->dev, "Failed to create keyclick file: %d\n", in cs42l52_init_beep()
1017 static void cs42l52_free_beep(struct snd_soc_component *component) in cs42l52_free_beep() argument
1019 struct cs42l52_private *cs42l52 = snd_soc_component_get_drvdata(component); in cs42l52_free_beep()
1021 device_remove_file(component->dev, &dev_attr_beep); in cs42l52_free_beep()
1025 snd_soc_component_update_bits(component, CS42L52_BEEP_TONE_CTL, in cs42l52_free_beep()
1029 static int cs42l52_probe(struct snd_soc_component *component) in cs42l52_probe() argument
1031 struct cs42l52_private *cs42l52 = snd_soc_component_get_drvdata(component); in cs42l52_probe()
1035 cs42l52_add_mic_controls(component); in cs42l52_probe()
1037 cs42l52_init_beep(component); in cs42l52_probe()
1045 static void cs42l52_remove(struct snd_soc_component *component) in cs42l52_remove() argument
1047 cs42l52_free_beep(component); in cs42l52_remove()