Home
last modified time | relevance | path

Searched refs:codec (Results 1 – 200 of 671) sorted by relevance

1234

/linux-4.4.14/sound/pci/hda/
Dhda_bind.c22 struct hda_codec *codec = container_of(dev, struct hda_codec, core); in hda_codec_match() local
27 u32 id = codec->probe_id ? codec->probe_id : codec->core.vendor_id; in hda_codec_match()
28 u32 rev_id = codec->core.revision_id; in hda_codec_match()
33 codec->preset = list; in hda_codec_match()
43 struct hda_codec *codec = container_of(dev, struct hda_codec, core); in hda_codec_unsol_event() local
45 if (codec->patch_ops.unsol_event) in hda_codec_unsol_event()
46 codec->patch_ops.unsol_event(codec, ev); in hda_codec_unsol_event()
54 int snd_hda_codec_set_name(struct hda_codec *codec, const char *name) in snd_hda_codec_set_name() argument
60 err = snd_hdac_device_set_chip_name(&codec->core, name); in snd_hda_codec_set_name()
65 if (!*codec->card->mixername || in snd_hda_codec_set_name()
[all …]
Dhda_codec.c43 #define codec_in_pm(codec) atomic_read(&(codec)->core.in_pm) argument
44 #define hda_codec_is_power_on(codec) \ argument
45 (!pm_runtime_suspended(hda_codec_dev(codec)))
47 #define codec_in_pm(codec) 0 argument
48 #define hda_codec_is_power_on(codec) 1 argument
51 #define codec_has_epss(codec) \ argument
52 ((codec)->core.power_caps & AC_PWRST_EPSS)
53 #define codec_has_clkstop(codec) \ argument
54 ((codec)->core.power_caps & AC_PWRST_CLKSTOP)
62 struct hda_codec *codec = container_of(dev, struct hda_codec, core); in codec_exec_verb() local
[all …]
Dpatch_via.c114 static enum VIA_HDA_CODEC get_codec_type(struct hda_codec *codec);
116 struct hda_codec *codec,
122 static struct via_spec *via_new_spec(struct hda_codec *codec) in via_new_spec() argument
130 codec->spec = spec; in via_new_spec()
132 spec->codec_type = get_codec_type(codec); in via_new_spec()
140 codec->power_save_node = 1; in via_new_spec()
142 codec->patch_ops = via_patch_ops; in via_new_spec()
146 static enum VIA_HDA_CODEC get_codec_type(struct hda_codec *codec) in get_codec_type() argument
148 u32 vendor_id = codec->core.vendor_id; in get_codec_type()
164 if (snd_hda_param_read(codec, 0x16, AC_PAR_CONNLIST_LEN) == 0x7) in get_codec_type()
[all …]
Dpatch_cirrus.c142 static inline int cs_vendor_coef_get(struct hda_codec *codec, unsigned int idx) in cs_vendor_coef_get() argument
144 struct cs_spec *spec = codec->spec; in cs_vendor_coef_get()
145 snd_hda_codec_write(codec, spec->vendor_nid, 0, in cs_vendor_coef_get()
147 return snd_hda_codec_read(codec, spec->vendor_nid, 0, in cs_vendor_coef_get()
151 static inline void cs_vendor_coef_set(struct hda_codec *codec, unsigned int idx, in cs_vendor_coef_set() argument
154 struct cs_spec *spec = codec->spec; in cs_vendor_coef_set()
155 snd_hda_codec_write(codec, spec->vendor_nid, 0, in cs_vendor_coef_set()
157 snd_hda_codec_write(codec, spec->vendor_nid, 0, in cs_vendor_coef_set()
167 static void cs_automute(struct hda_codec *codec) in cs_automute() argument
169 struct cs_spec *spec = codec->spec; in cs_automute()
[all …]
Dpatch_realtek.c113 void (*init_hook)(struct hda_codec *codec);
115 void (*power_hook)(struct hda_codec *codec);
117 void (*shutup)(struct hda_codec *codec);
118 void (*reboot_notify)(struct hda_codec *codec);
137 static int alc_read_coefex_idx(struct hda_codec *codec, hda_nid_t nid, in alc_read_coefex_idx() argument
142 snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_COEF_INDEX, coef_idx); in alc_read_coefex_idx()
143 val = snd_hda_codec_read(codec, nid, 0, AC_VERB_GET_PROC_COEF, 0); in alc_read_coefex_idx()
147 #define alc_read_coef_idx(codec, coef_idx) \ argument
148 alc_read_coefex_idx(codec, 0x20, coef_idx)
150 static void alc_write_coefex_idx(struct hda_codec *codec, hda_nid_t nid, in alc_write_coefex_idx() argument
[all …]
Dpatch_ca0132.c749 struct hda_codec *codec; member
789 static unsigned int codec_send_command(struct hda_codec *codec, hda_nid_t nid, in codec_send_command() argument
793 response = snd_hda_codec_read(codec, nid, 0, verb, parm); in codec_send_command()
799 static int codec_set_converter_format(struct hda_codec *codec, hda_nid_t nid, in codec_set_converter_format() argument
802 return codec_send_command(codec, nid, VENDOR_CHIPIO_STREAM_FORMAT, in codec_set_converter_format()
806 static int codec_set_converter_stream_channel(struct hda_codec *codec, in codec_set_converter_stream_channel() argument
813 return codec_send_command(codec, nid, AC_VERB_SET_CHANNEL_STREAMID, in codec_set_converter_stream_channel()
818 static int chipio_send(struct hda_codec *codec, in chipio_send() argument
827 res = snd_hda_codec_read(codec, WIDGET_CHIP_CTRL, 0, in chipio_send()
840 static int chipio_write_address(struct hda_codec *codec, in chipio_write_address() argument
[all …]
Dpatch_analog.c62 static int create_beep_ctls(struct hda_codec *codec) in create_beep_ctls() argument
64 struct ad198x_spec *spec = codec->spec; in create_beep_ctls()
73 kctl = snd_ctl_new1(knew, codec); in create_beep_ctls()
77 err = snd_hda_ctl_add(codec, 0, kctl); in create_beep_ctls()
84 #define create_beep_ctls(codec) 0 argument
88 static void ad198x_power_eapd_write(struct hda_codec *codec, hda_nid_t front, in ad198x_power_eapd_write() argument
91 if (snd_hda_query_pin_caps(codec, front) & AC_PINCAP_EAPD) in ad198x_power_eapd_write()
92 snd_hda_codec_write(codec, front, 0, AC_VERB_SET_EAPD_BTLENABLE, in ad198x_power_eapd_write()
93 !codec->inv_eapd ? 0x00 : 0x02); in ad198x_power_eapd_write()
94 if (snd_hda_query_pin_caps(codec, hp) & AC_PINCAP_EAPD) in ad198x_power_eapd_write()
[all …]
Dpatch_conexant.c73 static int add_beep_ctls(struct hda_codec *codec) in add_beep_ctls() argument
75 struct conexant_spec *spec = codec->spec; in add_beep_ctls()
82 kctl = snd_ctl_new1(knew, codec); in add_beep_ctls()
86 err = snd_hda_ctl_add(codec, 0, kctl); in add_beep_ctls()
95 #define add_beep_ctls(codec) 0 argument
103 static void cx_auto_parse_beep(struct hda_codec *codec) in cx_auto_parse_beep() argument
105 struct conexant_spec *spec = codec->spec; in cx_auto_parse_beep()
108 for_each_hda_codec_node(nid, codec) in cx_auto_parse_beep()
109 if (get_wcaps_type(get_wcaps(codec, nid)) == AC_WID_BEEP) { in cx_auto_parse_beep()
115 #define cx_auto_parse_beep(codec) argument
[all …]
Dhda_codec.h113 int (*build_controls)(struct hda_codec *codec);
114 int (*build_pcms)(struct hda_codec *codec);
115 int (*init)(struct hda_codec *codec);
116 void (*free)(struct hda_codec *codec);
117 void (*unsol_event)(struct hda_codec *codec, unsigned int res);
118 void (*set_power_state)(struct hda_codec *codec, hda_nid_t fg,
121 int (*suspend)(struct hda_codec *codec);
122 int (*resume)(struct hda_codec *codec);
123 int (*check_power_status)(struct hda_codec *codec, hda_nid_t nid);
125 void (*reboot_notify)(struct hda_codec *codec);
[all …]
Dhda_jack.c33 bool is_jack_detectable(struct hda_codec *codec, hda_nid_t nid) in is_jack_detectable() argument
35 if (codec->no_jack_detect) in is_jack_detectable()
37 if (!(snd_hda_query_pin_caps(codec, nid) & AC_PINCAP_PRES_DETECT)) in is_jack_detectable()
39 if (get_defcfg_misc(snd_hda_codec_get_pincfg(codec, nid)) & in is_jack_detectable()
42 if (!(get_wcaps(codec, nid) & AC_WCAP_UNSOL_CAP) && in is_jack_detectable()
43 !codec->jackpoll_interval) in is_jack_detectable()
50 static u32 read_pin_sense(struct hda_codec *codec, hda_nid_t nid) in read_pin_sense() argument
55 if (!codec->no_trigger_sense) { in read_pin_sense()
56 pincap = snd_hda_query_pin_caps(codec, nid); in read_pin_sense()
58 snd_hda_codec_read(codec, nid, 0, in read_pin_sense()
[all …]
Dhda_generic.c111 static void parse_user_hints(struct hda_codec *codec) in parse_user_hints() argument
113 struct hda_gen_spec *spec = codec->spec; in parse_user_hints()
116 val = snd_hda_get_bool_hint(codec, "jack_detect"); in parse_user_hints()
118 codec->no_jack_detect = !val; in parse_user_hints()
119 val = snd_hda_get_bool_hint(codec, "inv_jack_detect"); in parse_user_hints()
121 codec->inv_jack_detect = !!val; in parse_user_hints()
122 val = snd_hda_get_bool_hint(codec, "trigger_sense"); in parse_user_hints()
124 codec->no_trigger_sense = !val; in parse_user_hints()
125 val = snd_hda_get_bool_hint(codec, "inv_eapd"); in parse_user_hints()
127 codec->inv_eapd = !!val; in parse_user_hints()
[all …]
Dpatch_hdmi.c50 #define is_haswell(codec) ((codec)->core.vendor_id == 0x80862807) argument
51 #define is_broadwell(codec) ((codec)->core.vendor_id == 0x80862808) argument
52 #define is_skylake(codec) ((codec)->core.vendor_id == 0x80862809) argument
53 #define is_broxton(codec) ((codec)->core.vendor_id == 0x8086280a) argument
54 #define is_haswell_plus(codec) (is_haswell(codec) || is_broadwell(codec) \ argument
55 || is_skylake(codec) || is_broxton(codec))
57 #define is_valleyview(codec) ((codec)->core.vendor_id == 0x80862882) argument
58 #define is_cherryview(codec) ((codec)->core.vendor_id == 0x80862883) argument
59 #define is_valleyview_plus(codec) (is_valleyview(codec) || is_cherryview(codec)) argument
81 struct hda_codec *codec; member
[all …]
Dhda_proc.c36 #define param_read(codec, nid, parm) \ argument
37 snd_hdac_read_parm_uncached(&(codec)->core, nid, parm)
62 struct hda_codec *codec, hda_nid_t nid, in print_nid_array() argument
89 struct hda_codec *codec, hda_nid_t nid) in print_nid_pcms() argument
94 list_for_each_entry(cpcm, &codec->pcm_list_head, list) { in print_nid_pcms()
108 struct hda_codec *codec, hda_nid_t nid, int dir) in print_amp_caps() argument
111 caps = param_read(codec, nid, dir == HDA_OUTPUT ? in print_amp_caps()
126 static bool is_stereo_amps(struct hda_codec *codec, hda_nid_t nid, in is_stereo_amps() argument
140 if (snd_hda_get_raw_connections(codec, nid, &conn, 1) < 0) in is_stereo_amps()
143 wcaps = snd_hda_param_read(codec, conn, AC_PAR_AUDIO_WIDGET_CAP); in is_stereo_amps()
[all …]
Dpatch_si3054.c78 #define GET_REG(codec,reg) (snd_hda_codec_read(codec,reg,0,SI3054_VERB_READ_NODE,0)) argument
79 #define SET_REG(codec,reg,val) (snd_hda_codec_write(codec,reg,0,SI3054_VERB_WRITE_NODE,val)) argument
80 #define SET_REG_CACHE(codec,reg,val) \ argument
81 snd_hda_codec_write_cache(codec,reg,0,SI3054_VERB_WRITE_NODE,val)
102 struct hda_codec *codec = snd_kcontrol_chip(kcontrol); in si3054_switch_get() local
105 uvalue->value.integer.value[0] = (GET_REG(codec, reg)) & mask ? 1 : 0 ; in si3054_switch_get()
112 struct hda_codec *codec = snd_kcontrol_chip(kcontrol); in si3054_switch_put() local
116 SET_REG_CACHE(codec, reg, (GET_REG(codec, reg)) | mask); in si3054_switch_put()
118 SET_REG_CACHE(codec, reg, (GET_REG(codec, reg)) & ~mask); in si3054_switch_put()
139 static int si3054_build_controls(struct hda_codec *codec) in si3054_build_controls() argument
[all …]
Dhda_sysfs.c33 struct hda_codec *codec = dev_get_drvdata(dev); in power_on_acct_show() local
34 snd_hda_update_power_acct(codec); in power_on_acct_show()
35 return sprintf(buf, "%u\n", jiffies_to_msecs(codec->power_on_acct)); in power_on_acct_show()
42 struct hda_codec *codec = dev_get_drvdata(dev); in power_off_acct_show() local
43 snd_hda_update_power_acct(codec); in power_off_acct_show()
44 return sprintf(buf, "%u\n", jiffies_to_msecs(codec->power_off_acct)); in power_off_acct_show()
56 struct hda_codec *codec = dev_get_drvdata(dev); \
57 return sprintf(buf, "0x%x\n", codec->field); \
65 struct hda_codec *codec = dev_get_drvdata(dev); \
67 codec->field ? codec->field : ""); \
[all …]
Dpatch_sigmatel.c252 struct hda_codec *codec, in stac_playback_pcm_hook() argument
256 struct sigmatel_spec *spec = codec->spec; in stac_playback_pcm_hook()
262 struct hda_codec *codec, in stac_capture_pcm_hook() argument
266 struct sigmatel_spec *spec = codec->spec; in stac_capture_pcm_hook()
282 snd_hda_codec_write(codec, hinfo->nid, 0, in stac_capture_pcm_hook()
287 snd_hda_codec_write(codec, hinfo->nid, 0, in stac_capture_pcm_hook()
299 static void stac_gpio_set(struct hda_codec *codec, unsigned int mask, in stac_gpio_set() argument
303 hda_nid_t fg = codec->core.afg; in stac_gpio_set()
305 codec_dbg(codec, "%s msk %x dir %x gpio %x\n", __func__, mask, dir_mask, data); in stac_gpio_set()
307 gpiostate = snd_hda_codec_read(codec, fg, 0, in stac_gpio_set()
[all …]
Dhda_auto_parser.c60 static void add_auto_cfg_input_pin(struct hda_codec *codec, struct auto_pin_cfg *cfg, in add_auto_cfg_input_pin() argument
67 nid_has_volume(codec, nid, HDA_INPUT); in add_auto_cfg_input_pin()
106 static bool check_pincap_validity(struct hda_codec *codec, hda_nid_t pin, in check_pincap_validity() argument
109 unsigned int pincap = snd_hda_query_pin_caps(codec, pin); in check_pincap_validity()
127 static bool can_be_headset_mic(struct hda_codec *codec, in can_be_headset_mic() argument
139 def_conf = snd_hda_codec_get_pincfg(codec, item->pin); in can_be_headset_mic()
170 int snd_hda_parse_pin_defcfg(struct hda_codec *codec, in snd_hda_parse_pin_defcfg() argument
182 if (!snd_hda_get_int_hint(codec, "parser_flags", &i)) in snd_hda_parse_pin_defcfg()
192 for_each_hda_codec_node(nid, codec) { in snd_hda_parse_pin_defcfg()
193 unsigned int wid_caps = get_wcaps(codec, nid); in snd_hda_parse_pin_defcfg()
[all …]
Dhda_local.h130 #define snd_hda_codec_amp_read(codec, nid, ch, dir, idx) \ argument
131 snd_hdac_regmap_get_amp(&(codec)->core, nid, ch, dir, idx)
132 int snd_hda_codec_amp_update(struct hda_codec *codec, hda_nid_t nid,
134 int snd_hda_codec_amp_stereo(struct hda_codec *codec, hda_nid_t nid,
136 int snd_hda_codec_amp_init(struct hda_codec *codec, hda_nid_t nid, int ch,
138 int snd_hda_codec_amp_init_stereo(struct hda_codec *codec, hda_nid_t nid,
140 void snd_hda_set_vmaster_tlv(struct hda_codec *codec, hda_nid_t nid, int dir,
142 struct snd_kcontrol *snd_hda_find_mixer_ctl(struct hda_codec *codec,
144 int __snd_hda_add_vmaster(struct hda_codec *codec, char *name,
148 #define snd_hda_add_vmaster(codec, name, tlv, slaves, suffix) \ argument
[all …]
DMakefile4 snd-hda-codec-y := hda_bind.o hda_codec.o hda_jack.o hda_auto_parser.o hda_sysfs.o
5 snd-hda-codec-y += hda_controller.o
6 snd-hda-codec-$(CONFIG_SND_PROC_FS) += hda_proc.o
8 snd-hda-codec-$(CONFIG_SND_HDA_HWDEP) += hda_hwdep.o
9 snd-hda-codec-$(CONFIG_SND_HDA_INPUT_BEEP) += hda_beep.o
15 snd-hda-codec-generic-objs := hda_generic.o
16 snd-hda-codec-realtek-objs := patch_realtek.o
17 snd-hda-codec-cmedia-objs := patch_cmedia.o
18 snd-hda-codec-analog-objs := patch_analog.o
19 snd-hda-codec-idt-objs := patch_sigmatel.o
[all …]
Dhda_beep.c39 struct hda_codec *codec = beep->codec; in generate_tone() local
42 snd_hda_power_up(codec); in generate_tone()
47 snd_hda_codec_write(codec, beep->nid, 0, in generate_tone()
53 snd_hda_power_down(codec); in generate_tone()
156 struct hda_codec *codec = beep->codec; in snd_hda_do_attach() local
166 input_dev->dev.parent = &codec->card->card_dev; in snd_hda_do_attach()
168 input_dev->id.vendor = codec->core.vendor_id >> 16; in snd_hda_do_attach()
169 input_dev->id.product = codec->core.vendor_id & 0xffff; in snd_hda_do_attach()
186 int snd_hda_enable_beep_device(struct hda_codec *codec, int enable) in snd_hda_enable_beep_device() argument
188 struct hda_beep *beep = codec->beep; in snd_hda_enable_beep_device()
[all …]
Dhda_jack.h47 snd_hda_jack_tbl_get(struct hda_codec *codec, hda_nid_t nid);
49 snd_hda_jack_tbl_get_from_tag(struct hda_codec *codec, unsigned char tag);
51 void snd_hda_jack_tbl_clear(struct hda_codec *codec);
53 void snd_hda_jack_set_dirty_all(struct hda_codec *codec);
55 int snd_hda_jack_detect_enable(struct hda_codec *codec, hda_nid_t nid);
57 snd_hda_jack_detect_enable_callback(struct hda_codec *codec, hda_nid_t nid,
60 int snd_hda_jack_set_gating_jack(struct hda_codec *codec, hda_nid_t gated_nid,
63 u32 snd_hda_pin_sense(struct hda_codec *codec, hda_nid_t nid);
70 int snd_hda_jack_detect_state(struct hda_codec *codec, hda_nid_t nid);
77 static inline bool snd_hda_jack_detect(struct hda_codec *codec, hda_nid_t nid) in snd_hda_jack_detect() argument
[all …]
Dhda_generic.h272 void (*init_hook)(struct hda_codec *codec);
273 void (*automute_hook)(struct hda_codec *codec);
274 void (*cap_sync_hook)(struct hda_codec *codec,
280 struct hda_codec *codec,
284 struct hda_codec *codec,
289 void (*hp_automute_hook)(struct hda_codec *codec,
291 void (*line_automute_hook)(struct hda_codec *codec,
293 void (*mic_autoswitch_hook)(struct hda_codec *codec,
306 int snd_hda_gen_init(struct hda_codec *codec);
307 void snd_hda_gen_free(struct hda_codec *codec);
[all …]
Dlocal.h7 int hdac_read_parm(struct hdac_device *codec, hda_nid_t nid, int parm);
9 #define get_wcaps(codec, nid) \ argument
10 hdac_read_parm(codec, nid, AC_PAR_AUDIO_WIDGET_CAP)
19 #define get_pin_caps(codec, nid) \ argument
20 hdac_read_parm(codec, nid, AC_PAR_PIN_CAP)
23 unsigned int get_pin_cfg(struct hdac_device *codec, hda_nid_t nid) in get_pin_cfg() argument
27 if (snd_hdac_read(codec, nid, AC_VERB_GET_CONFIG_DEFAULT, 0, &val)) in get_pin_cfg()
32 #define get_amp_caps(codec, nid, dir) \ argument
33 hdac_read_parm(codec, nid, (dir) == HDA_OUTPUT ? \
36 #define get_power_caps(codec, nid) \ argument
[all …]
Dhda_hwdep.c33 static int verb_write_ioctl(struct hda_codec *codec, in verb_write_ioctl() argument
40 res = snd_hda_codec_read(codec, verb >> 24, 0, in verb_write_ioctl()
47 static int get_wcap_ioctl(struct hda_codec *codec, in get_wcap_ioctl() argument
54 res = get_wcaps(codec, verb >> 24); in get_wcap_ioctl()
66 struct hda_codec *codec = hw->private_data; in hda_hwdep_ioctl() local
73 return verb_write_ioctl(codec, argp); in hda_hwdep_ioctl()
75 return get_wcap_ioctl(codec, argp); in hda_hwdep_ioctl()
97 int snd_hda_create_hwdep(struct hda_codec *codec) in snd_hda_create_hwdep() argument
103 sprintf(hwname, "HDA Codec %d", codec->addr); in snd_hda_create_hwdep()
104 err = snd_hwdep_new(codec->card, hwname, codec->addr, &hwdep); in snd_hda_create_hwdep()
[all …]
Dpatch_cmedia.c49 static int patch_cmi9880(struct hda_codec *codec) in patch_cmi9880() argument
59 codec->spec = spec; in patch_cmi9880()
60 codec->patch_ops = cmi_auto_patch_ops; in patch_cmi9880()
64 err = snd_hda_parse_pin_defcfg(codec, cfg, NULL, 0); in patch_cmi9880()
67 err = snd_hda_gen_parse_auto_config(codec, cfg); in patch_cmi9880()
74 snd_hda_gen_free(codec); in patch_cmi9880()
78 static int patch_cmi8888(struct hda_codec *codec) in patch_cmi8888() argument
88 codec->spec = spec; in patch_cmi8888()
89 codec->patch_ops = cmi_auto_patch_ops; in patch_cmi8888()
98 err = snd_hda_parse_pin_defcfg(codec, cfg, NULL, 0); in patch_cmi8888()
[all …]
Dhda_eld.c148 static unsigned int hdmi_get_eld_data(struct hda_codec *codec, hda_nid_t nid, in hdmi_get_eld_data() argument
153 val = snd_hda_codec_read(codec, nid, 0, in hdmi_get_eld_data()
156 codec_info(codec, "HDMI: ELD data byte %d: 0x%x\n", byte_index, val); in hdmi_get_eld_data()
170 static void hdmi_update_short_audio_desc(struct hda_codec *codec, in hdmi_update_short_audio_desc() argument
192 codec_info(codec, "HDMI: audio coding type 0 not expected\n"); in hdmi_update_short_audio_desc()
236 codec_info(codec, in hdmi_update_short_audio_desc()
250 int snd_hdmi_parse_eld(struct hda_codec *codec, struct parsed_hdmi_eld *e, in snd_hdmi_parse_eld() argument
259 codec_info(codec, "HDMI: Unknown ELD version %d\n", e->eld_ver); in snd_hdmi_parse_eld()
282 codec_info(codec, "HDMI: MNL is reserved value %d\n", mnl); in snd_hdmi_parse_eld()
285 codec_info(codec, "HDMI: out of range MNL %d\n", mnl); in snd_hdmi_parse_eld()
[all …]
Dpatch_ca0110.c40 static int ca0110_parse_auto_config(struct hda_codec *codec) in ca0110_parse_auto_config() argument
42 struct hda_gen_spec *spec = codec->spec; in ca0110_parse_auto_config()
45 err = snd_hda_parse_pin_defcfg(codec, &spec->autocfg, NULL, 0); in ca0110_parse_auto_config()
48 err = snd_hda_gen_parse_auto_config(codec, &spec->autocfg); in ca0110_parse_auto_config()
56 static int patch_ca0110(struct hda_codec *codec) in patch_ca0110() argument
65 codec->spec = spec; in patch_ca0110()
66 codec->patch_ops = ca0110_patch_ops; in patch_ca0110()
69 codec->bus->needs_damn_long_delay = 1; in patch_ca0110()
71 err = ca0110_parse_auto_config(codec); in patch_ca0110()
78 snd_hda_gen_free(codec); in patch_ca0110()
DKconfig19 to choose the appropriate codec options below.
50 bool "Allow dynamic codec reconfiguration"
52 Say Y here to enable the HD-audio codec re-configuration feature.
54 codec configuration, change the codec setup, add extra verbs,
55 and re-configure the codec dynamically.
85 tristate "Build Realtek HD-audio codec support"
89 Say Y or M here to include Realtek HD-audio codec support in
92 comment "Set to Y if you want auto-loading the codec driver"
96 tristate "Build Analog Device HD-audio codec support"
99 Say Y or M here to include Analog Device HD-audio codec support in
[all …]
Dhda_beep.h33 struct hda_codec *codec; member
47 int snd_hda_enable_beep_device(struct hda_codec *codec, int enable);
48 int snd_hda_attach_beep_device(struct hda_codec *codec, int nid);
49 void snd_hda_detach_beep_device(struct hda_codec *codec);
50 int snd_hda_register_beep_device(struct hda_codec *codec);
52 static inline int snd_hda_attach_beep_device(struct hda_codec *codec, int nid) in snd_hda_attach_beep_device() argument
56 static inline void snd_hda_detach_beep_device(struct hda_codec *codec) in snd_hda_detach_beep_device() argument
59 static inline int snd_hda_register_beep_device(struct hda_codec *codec) in snd_hda_register_beep_device() argument
Dthinkpad_helper.c21 static bool is_thinkpad(struct hda_codec *codec) in is_thinkpad() argument
24 if (codec->core.subsystem_id >> 16 != 0x17aa) in is_thinkpad()
41 static void update_tpacpi_micmute_led(struct hda_codec *codec, in update_tpacpi_micmute_led() argument
54 static void hda_fixup_thinkpad_acpi(struct hda_codec *codec, in hda_fixup_thinkpad_acpi() argument
57 struct hda_gen_spec *spec = codec->spec; in hda_fixup_thinkpad_acpi()
61 if (!is_thinkpad(codec)) in hda_fixup_thinkpad_acpi()
66 codec_warn(codec, in hda_fixup_thinkpad_acpi()
79 codec_dbg(codec, in hda_fixup_thinkpad_acpi()
97 static void hda_fixup_thinkpad_acpi(struct hda_codec *codec, in hda_fixup_thinkpad_acpi() argument
Ddell_wmi_helper.c14 static void update_dell_wmi_micmute_led(struct hda_codec *codec, in update_dell_wmi_micmute_led() argument
19 dell_old_cap_hook(codec, kcontrol, ucontrol); in update_dell_wmi_micmute_led()
35 static void alc_fixup_dell_wmi(struct hda_codec *codec, in alc_fixup_dell_wmi() argument
38 struct alc_spec *spec = codec->spec; in alc_fixup_dell_wmi()
45 codec_warn(codec, "Failed to find dell wmi symbol dell_app_wmi_led_set\n"); in alc_fixup_dell_wmi()
53 codec_dbg(codec, "Skipping micmute LED control due to several ADCs"); in alc_fixup_dell_wmi()
71 static void alc_fixup_dell_wmi(struct hda_codec *codec, in alc_fixup_dell_wmi() argument
/linux-4.4.14/sound/pci/ali5451/
Dali5451.c156 #define ALI_REG(codec, x) ((codec)->port + x) argument
195 struct snd_ali *codec; member
281 static inline unsigned int snd_ali_5451_peek(struct snd_ali *codec, in snd_ali_5451_peek() argument
284 return (unsigned int)inl(ALI_REG(codec, port)); in snd_ali_5451_peek()
287 static inline void snd_ali_5451_poke(struct snd_ali *codec, in snd_ali_5451_poke() argument
291 outl((unsigned int)val, ALI_REG(codec, port)); in snd_ali_5451_poke()
294 static int snd_ali_codec_ready(struct snd_ali *codec, in snd_ali_codec_ready() argument
303 res = snd_ali_5451_peek(codec,port); in snd_ali_codec_ready()
311 snd_ali_5451_poke(codec, port, res & ~0x8000); in snd_ali_codec_ready()
312 dev_dbg(codec->card->dev, "ali_codec_ready: codec is not ready.\n "); in snd_ali_codec_ready()
[all …]
/linux-4.4.14/sound/hda/
Dhdac_device.c16 static void setup_fg_nodes(struct hdac_device *codec);
17 static int get_codec_vendor_name(struct hdac_device *codec);
38 int snd_hdac_device_init(struct hdac_device *codec, struct hdac_bus *bus, in snd_hdac_device_init() argument
45 dev = &codec->dev; in snd_hdac_device_init()
54 codec->bus = bus; in snd_hdac_device_init()
55 codec->addr = addr; in snd_hdac_device_init()
56 codec->type = HDA_DEV_CORE; in snd_hdac_device_init()
57 pm_runtime_set_active(&codec->dev); in snd_hdac_device_init()
58 pm_runtime_get_noresume(&codec->dev); in snd_hdac_device_init()
59 atomic_set(&codec->in_pm, 0); in snd_hdac_device_init()
[all …]
Dhdac_regmap.c25 #define codec_is_running(codec) \ argument
26 (atomic_read(&(codec)->in_pm) || \
27 !pm_runtime_suspended(&(codec)->dev))
29 #define codec_is_running(codec) true argument
36 struct hdac_device *codec = dev_to_hdac_dev(dev); in hda_volatile_reg() local
41 return !codec->cache_coef; in hda_volatile_reg()
63 struct hdac_device *codec = dev_to_hdac_dev(dev); in hda_writeable_reg() local
67 for (i = 0; i < codec->vendor_verbs.used; i++) { in hda_writeable_reg()
68 unsigned int *v = snd_array_elem(&codec->vendor_verbs, i); in hda_writeable_reg()
73 if (codec->caps_overwriting) in hda_writeable_reg()
[all …]
Dhdac_sysfs.c23 struct hdac_device *codec = dev_to_hdac_dev(dev); \
24 return sprintf(buf, "0x%x\n", codec->type); \
33 struct hdac_device *codec = dev_to_hdac_dev(dev); \
35 codec->type ? codec->type : ""); \
88 ssize_t (*show)(struct hdac_device *codec, hda_nid_t nid,
90 ssize_t (*store)(struct hdac_device *codec, hda_nid_t nid,
113 struct hdac_device *codec; in widget_attr_show() local
118 nid = get_codec_nid(kobj, &codec); in widget_attr_show()
121 return wid_attr->show(codec, nid, wid_attr, buf); in widget_attr_show()
129 struct hdac_device *codec; in widget_attr_store() local
[all …]
Dhdac_bus.c154 struct hdac_device *codec; in process_unsol_events() local
166 codec = bus->caddr_tbl[caddr & 0x0f]; in process_unsol_events()
167 if (!codec || !codec->dev.driver) in process_unsol_events()
169 drv = drv_to_hdac_driver(codec->dev.driver); in process_unsol_events()
171 drv->unsol_event(codec, res); in process_unsol_events()
184 int snd_hdac_bus_add_device(struct hdac_bus *bus, struct hdac_device *codec) in snd_hdac_bus_add_device() argument
186 if (bus->caddr_tbl[codec->addr]) { in snd_hdac_bus_add_device()
188 codec->addr); in snd_hdac_bus_add_device()
192 list_add_tail(&codec->list, &bus->codec_list); in snd_hdac_bus_add_device()
193 bus->caddr_tbl[codec->addr] = codec; in snd_hdac_bus_add_device()
[all …]
Dlocal.h8 #define get_wcaps(codec, nid) \ argument
9 snd_hdac_read_parm(codec, nid, AC_PAR_AUDIO_WIDGET_CAP)
20 int hda_widget_sysfs_init(struct hdac_device *codec);
21 void hda_widget_sysfs_exit(struct hdac_device *codec);
/linux-4.4.14/drivers/media/pci/zoran/
Dvideocodec.c59 struct videocodec *codec; member
64 const struct videocodec *codec; member
81 struct videocodec *codec; in videocodec_attach() local
103 if ((master->flags & h->codec->flags) == master->flags) { in videocodec_attach()
105 h->codec->name); in videocodec_attach()
107 if (!try_module_get(h->codec->owner)) in videocodec_attach()
110 codec = kmemdup(h->codec, sizeof(struct videocodec), in videocodec_attach()
112 if (!codec) { in videocodec_attach()
119 snprintf(codec->name, sizeof(codec->name), in videocodec_attach()
120 "%s[%d]", codec->name, h->attached); in videocodec_attach()
[all …]
Dzr36016.c80 if (ptr->codec->master_data->readreg) in zr36016_read()
82 (ptr->codec->master_data-> in zr36016_read()
83 readreg(ptr->codec, reg)) & 0xFF; in zr36016_read()
104 if (ptr->codec->master_data->writereg) { in zr36016_write()
105 ptr->codec->master_data->writereg(ptr->codec, reg, value); in zr36016_write()
123 if ((ptr->codec->master_data->writereg) && in zr36016_readi()
124 (ptr->codec->master_data->readreg)) { in zr36016_readi()
125 ptr->codec->master_data->writereg(ptr->codec, ZR016_IADDR, reg & 0x0F); // ADDR in zr36016_readi()
126 value = (ptr->codec->master_data->readreg(ptr->codec, ZR016_IDATA)) & 0xFF; // DATA in zr36016_readi()
147 if (ptr->codec->master_data->writereg) { in zr36016_writei()
[all …]
Dvideocodec.h274 int (*setup) (struct videocodec * codec);
275 int (*unset) (struct videocodec * codec);
279 int (*set_mode) (struct videocodec * codec,
282 int (*set_video) (struct videocodec * codec,
287 int (*control) (struct videocodec * codec,
294 int (*setup_interrupt) (struct videocodec * codec,
296 int (*handle_interrupt) (struct videocodec * codec,
300 long (*put_image) (struct videocodec * codec,
307 long (*get_image) (struct videocodec * codec,
325 __u32(*readreg) (struct videocodec * codec,
[all …]
Dzr36050.c78 if (ptr->codec->master_data->readreg) in zr36050_read()
79 value = (ptr->codec->master_data->readreg(ptr->codec, in zr36050_read()
101 if (ptr->codec->master_data->writereg) in zr36050_write()
102 ptr->codec->master_data->writereg(ptr->codec, reg, value); in zr36050_write()
585 zr36050_set_mode (struct videocodec *codec, in zr36050_set_mode() argument
588 struct zr36050 *ptr = (struct zr36050 *) codec->data; in zr36050_set_mode()
603 zr36050_set_video (struct videocodec *codec, in zr36050_set_video() argument
608 struct zr36050 *ptr = (struct zr36050 *) codec->data; in zr36050_set_video()
645 zr36050_control (struct videocodec *codec, in zr36050_control() argument
650 struct zr36050 *ptr = (struct zr36050 *) codec->data; in zr36050_control()
[all …]
Dzr36060.c82 if (ptr->codec->master_data->readreg) in zr36060_read()
83 value = (ptr->codec->master_data->readreg(ptr->codec, in zr36060_read()
104 if (ptr->codec->master_data->writereg) in zr36060_write()
105 ptr->codec->master_data->writereg(ptr->codec, reg, value); in zr36060_write()
576 zr36060_set_mode (struct videocodec *codec, in zr36060_set_mode() argument
579 struct zr36060 *ptr = (struct zr36060 *) codec->data; in zr36060_set_mode()
594 zr36060_set_video (struct videocodec *codec, in zr36060_set_video() argument
599 struct zr36060 *ptr = (struct zr36060 *) codec->data; in zr36060_set_video()
754 zr36060_control (struct videocodec *codec, in zr36060_control() argument
759 struct zr36060 *ptr = (struct zr36060 *) codec->data; in zr36060_control()
[all …]
/linux-4.4.14/sound/soc/codecs/
Dtlv320dac33.c66 struct snd_soc_codec *codec);
68 struct snd_soc_codec *codec);
95 struct snd_soc_codec *codec; member
174 static inline unsigned int dac33_read_reg_cache(struct snd_soc_codec *codec, in dac33_read_reg_cache() argument
177 u8 *cache = codec->reg_cache; in dac33_read_reg_cache()
184 static inline void dac33_write_reg_cache(struct snd_soc_codec *codec, in dac33_write_reg_cache() argument
187 u8 *cache = codec->reg_cache; in dac33_write_reg_cache()
194 static int dac33_read(struct snd_soc_codec *codec, unsigned int reg, in dac33_read() argument
197 struct tlv320dac33_priv *dac33 = snd_soc_codec_get_drvdata(codec); in dac33_read()
204 val = i2c_smbus_read_byte_data(codec->control_data, value[0]); in dac33_read()
[all …]
Dda7219-aad.c34 void da7219_aad_jack_det(struct snd_soc_codec *codec, struct snd_soc_jack *jack) in da7219_aad_jack_det() argument
36 struct da7219_priv *da7219 = snd_soc_codec_get_drvdata(codec); in da7219_aad_jack_det()
45 snd_soc_update_bits(codec, DA7219_ACCDET_CONFIG_1, in da7219_aad_jack_det()
59 struct snd_soc_codec *codec = da7219_aad->codec; in da7219_aad_btn_det_work() local
60 struct snd_soc_dapm_context *dapm = snd_soc_codec_get_dapm(codec); in da7219_aad_btn_det_work()
66 snd_soc_update_bits(codec, DA7219_HP_L_CTRL, in da7219_aad_btn_det_work()
69 snd_soc_update_bits(codec, DA7219_HP_R_CTRL, in da7219_aad_btn_det_work()
78 statusa = snd_soc_read(codec, DA7219_ACCDET_STATUS_A); in da7219_aad_btn_det_work()
86 dev_warn(codec->dev, "Mic bias status check timed out"); in da7219_aad_btn_det_work()
94 micbias_ctrl = snd_soc_read(codec, DA7219_MICBIAS_CTRL); in da7219_aad_btn_det_work()
[all …]
Dtwl6040.c79 struct snd_soc_codec *codec; member
109 static unsigned int twl6040_read(struct snd_soc_codec *codec, unsigned int reg) in twl6040_read() argument
111 struct twl6040_data *priv = snd_soc_codec_get_drvdata(codec); in twl6040_read()
112 struct twl6040 *twl6040 = codec->control_data; in twl6040_read()
134 static bool twl6040_can_write_to_chip(struct snd_soc_codec *codec, in twl6040_can_write_to_chip() argument
137 struct twl6040_data *priv = snd_soc_codec_get_drvdata(codec); in twl6040_can_write_to_chip()
153 static inline void twl6040_update_dl12_cache(struct snd_soc_codec *codec, in twl6040_update_dl12_cache() argument
156 struct twl6040_data *priv = snd_soc_codec_get_drvdata(codec); in twl6040_update_dl12_cache()
171 static int twl6040_write(struct snd_soc_codec *codec, in twl6040_write() argument
174 struct twl6040 *twl6040 = codec->control_data; in twl6040_write()
[all …]
Dwm8961.c197 struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm); in wm8961_hp_event() local
198 u16 hp_reg = snd_soc_read(codec, WM8961_ANALOGUE_HP_0); in wm8961_hp_event()
199 u16 cp_reg = snd_soc_read(codec, WM8961_CHARGE_PUMP_1); in wm8961_hp_event()
200 u16 pwr_reg = snd_soc_read(codec, WM8961_PWR_MGMT_2); in wm8961_hp_event()
201 u16 dcs_reg = snd_soc_read(codec, WM8961_DC_SERVO_1); in wm8961_hp_event()
207 snd_soc_write(codec, WM8961_ANALOGUE_HP_0, hp_reg); in wm8961_hp_event()
211 snd_soc_write(codec, WM8961_CHARGE_PUMP_1, cp_reg); in wm8961_hp_event()
216 snd_soc_write(codec, WM8961_PWR_MGMT_2, pwr_reg); in wm8961_hp_event()
220 snd_soc_write(codec, WM8961_ANALOGUE_HP_0, hp_reg); in wm8961_hp_event()
224 snd_soc_write(codec, WM8961_ANALOGUE_HP_0, hp_reg); in wm8961_hp_event()
[all …]
Dmax98095.c254 static void m98095_eq_band(struct snd_soc_codec *codec, unsigned int dai, in m98095_eq_band() argument
272 snd_soc_write(codec, eq_reg++, M98095_BYTE1(coefs[i])); in m98095_eq_band()
273 snd_soc_write(codec, eq_reg++, M98095_BYTE0(coefs[i])); in m98095_eq_band()
280 static void m98095_biquad_band(struct snd_soc_codec *codec, unsigned int dai, in m98095_biquad_band() argument
298 snd_soc_write(codec, bq_reg++, M98095_BYTE1(coefs[i])); in m98095_biquad_band()
299 snd_soc_write(codec, bq_reg++, M98095_BYTE0(coefs[i])); in m98095_biquad_band()
356 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); in max98095_mic1pre_set() local
357 struct max98095_priv *max98095 = snd_soc_codec_get_drvdata(codec); in max98095_mic1pre_set()
361 snd_soc_update_bits(codec, M98095_05F_LVL_MIC1, M98095_MICPRE_MASK, in max98095_mic1pre_set()
370 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); in max98095_mic1pre_get() local
[all …]
Drt5631.c74 static void rt5631_write_index(struct snd_soc_codec *codec, in rt5631_write_index() argument
77 snd_soc_write(codec, RT5631_INDEX_ADD, reg); in rt5631_write_index()
78 snd_soc_write(codec, RT5631_INDEX_DATA, value); in rt5631_write_index()
84 static unsigned int rt5631_read_index(struct snd_soc_codec *codec, in rt5631_read_index() argument
89 snd_soc_write(codec, RT5631_INDEX_ADD, reg); in rt5631_read_index()
90 value = snd_soc_read(codec, RT5631_INDEX_DATA); in rt5631_read_index()
95 static int rt5631_reset(struct snd_soc_codec *codec) in rt5631_reset() argument
97 return snd_soc_write(codec, RT5631_RESET, 0); in rt5631_reset()
190 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); in rt5631_dmic_get() local
191 struct rt5631_priv *rt5631 = snd_soc_codec_get_drvdata(codec); in rt5631_dmic_get()
[all …]
Dwm8958-dsp2.c42 static int wm8958_dsp2_fw(struct snd_soc_codec *codec, const char *name, in wm8958_dsp2_fw() argument
45 struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec); in wm8958_dsp2_fw()
58 dev_err(codec->dev, "%s: firmware too short (%zd bytes)\n", in wm8958_dsp2_fw()
66 dev_err(codec->dev, "%s: firmware has bad file magic %08x\n", in wm8958_dsp2_fw()
77 dev_err(codec->dev, "%s: unsupported firmware version %d\n", in wm8958_dsp2_fw()
82 dev_err(codec->dev, "%s: unsupported target device %d\n", in wm8958_dsp2_fw()
87 dev_err(codec->dev, "%s: unsupported target core %d\n", in wm8958_dsp2_fw()
94 dev_info(codec->dev, "%s timestamp %llx\n", in wm8958_dsp2_fw()
97 snd_soc_write(codec, 0x102, 0x2); in wm8958_dsp2_fw()
98 snd_soc_write(codec, 0x900, 0x2); in wm8958_dsp2_fw()
[all …]
Dwm_hubs.c63 static void wait_for_dc_servo(struct snd_soc_codec *codec, unsigned int op) in wait_for_dc_servo() argument
65 struct wm_hubs_data *hubs = snd_soc_codec_get_drvdata(codec); in wait_for_dc_servo()
74 snd_soc_write(codec, WM8993_DC_SERVO_0, val); in wait_for_dc_servo()
76 dev_dbg(codec->dev, "Waiting for DC servo...\n"); in wait_for_dc_servo()
92 reg = snd_soc_read(codec, WM8993_DC_SERVO_0); in wait_for_dc_servo()
93 dev_dbg(codec->dev, "DC servo: %x\n", reg); in wait_for_dc_servo()
97 dev_err(codec->dev, "Timed out waiting for DC Servo %x\n", in wait_for_dc_servo()
111 static bool wm_hubs_dac_hp_direct(struct snd_soc_codec *codec) in wm_hubs_dac_hp_direct() argument
116 reg = snd_soc_read(codec, WM8993_OUTPUT_MIXER1); in wm_hubs_dac_hp_direct()
119 dev_vdbg(codec->dev, "Analogue paths connected: %x\n", in wm_hubs_dac_hp_direct()
[all …]
Dwm8753.c59 static int wm8753_hifi_write_dai_fmt(struct snd_soc_codec *codec,
61 static int wm8753_voice_write_dai_fmt(struct snd_soc_codec *codec,
233 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); in wm8753_get_dai() local
234 struct wm8753_priv *wm8753 = snd_soc_codec_get_drvdata(codec); in wm8753_get_dai()
243 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); in wm8753_set_dai() local
244 struct wm8753_priv *wm8753 = snd_soc_codec_get_drvdata(codec); in wm8753_set_dai()
250 if (snd_soc_codec_is_active(codec)) in wm8753_set_dai()
253 ioctl = snd_soc_read(codec, WM8753_IOCTL); in wm8753_set_dai()
261 snd_soc_write(codec, WM8753_IOCTL, ioctl); in wm8753_set_dai()
264 wm8753_hifi_write_dai_fmt(codec, wm8753->hifi_fmt); in wm8753_set_dai()
[all …]
Dwm8900.c219 static void wm8900_reset(struct snd_soc_codec *codec) in wm8900_reset() argument
221 snd_soc_write(codec, WM8900_REG_RESET, 0); in wm8900_reset()
227 struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm); in wm8900_hp_event() local
228 u16 hpctl1 = snd_soc_read(codec, WM8900_REG_HPCTL1); in wm8900_hp_event()
235 snd_soc_write(codec, WM8900_REG_HPCTL1, hpctl1); in wm8900_hp_event()
244 snd_soc_write(codec, WM8900_REG_HPCTL1, hpctl1); in wm8900_hp_event()
251 snd_soc_write(codec, WM8900_REG_HPCTL1, hpctl1); in wm8900_hp_event()
255 snd_soc_write(codec, WM8900_REG_HPCTL1, hpctl1); in wm8900_hp_event()
257 snd_soc_write(codec, WM8900_REG_HPCTL1, hpctl1); in wm8900_hp_event()
263 snd_soc_write(codec, WM8900_REG_HPCTL1, hpctl1); in wm8900_hp_event()
[all …]
Dwm8960.c52 static int wm8960_set_pll(struct snd_soc_codec *codec,
162 static int wm8960_set_deemph(struct snd_soc_codec *codec) in wm8960_set_deemph() argument
164 struct wm8960_priv *wm8960 = snd_soc_codec_get_drvdata(codec); in wm8960_set_deemph()
183 dev_dbg(codec->dev, "Set deemphasis %d\n", val); in wm8960_set_deemph()
185 return snd_soc_update_bits(codec, WM8960_DACCTL1, in wm8960_set_deemph()
192 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); in wm8960_get_deemph() local
193 struct wm8960_priv *wm8960 = snd_soc_codec_get_drvdata(codec); in wm8960_get_deemph()
202 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); in wm8960_put_deemph() local
203 struct wm8960_priv *wm8960 = snd_soc_codec_get_drvdata(codec); in wm8960_put_deemph()
211 return wm8960_set_deemph(codec); in wm8960_put_deemph()
[all …]
Dmax98088.c310 static void m98088_eq_band(struct snd_soc_codec *codec, unsigned int dai, in m98088_eq_band() argument
328 snd_soc_write(codec, eq_reg++, M98088_BYTE1(coefs[i])); in m98088_eq_band()
329 snd_soc_write(codec, eq_reg++, M98088_BYTE0(coefs[i])); in m98088_eq_band()
383 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); in max98088_mic1pre_set() local
384 struct max98088_priv *max98088 = snd_soc_codec_get_drvdata(codec); in max98088_mic1pre_set()
388 snd_soc_update_bits(codec, M98088_REG_35_LVL_MIC1, M98088_MICPRE_MASK, in max98088_mic1pre_set()
397 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); in max98088_mic1pre_get() local
398 struct max98088_priv *max98088 = snd_soc_codec_get_drvdata(codec); in max98088_mic1pre_get()
407 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); in max98088_mic2pre_set() local
408 struct max98088_priv *max98088 = snd_soc_codec_get_drvdata(codec); in max98088_mic2pre_set()
[all …]
Dtwl4030.c89 static unsigned int twl4030_read(struct snd_soc_codec *codec, unsigned int reg) in twl4030_read() argument
91 struct twl4030_priv *twl4030 = snd_soc_codec_get_drvdata(codec); in twl4030_read()
154 static int twl4030_write(struct snd_soc_codec *codec, unsigned int reg, in twl4030_write() argument
157 struct twl4030_priv *twl4030 = snd_soc_codec_get_drvdata(codec); in twl4030_write()
189 static void twl4030_codec_enable(struct snd_soc_codec *codec, int enable) in twl4030_codec_enable() argument
191 struct twl4030_priv *twl4030 = snd_soc_codec_get_drvdata(codec); in twl4030_codec_enable()
230 static struct twl4030_codec_data *twl4030_get_pdata(struct snd_soc_codec *codec) in twl4030_get_pdata() argument
232 struct twl4030_codec_data *pdata = dev_get_platdata(codec->dev); in twl4030_get_pdata()
235 twl4030_codec_node = of_find_node_by_name(codec->dev->parent->of_node, in twl4030_get_pdata()
239 pdata = devm_kzalloc(codec->dev, in twl4030_get_pdata()
[all …]
Dtas2552.c73 struct snd_soc_codec *codec; member
91 struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm); in tas2552_post_event() local
95 snd_soc_write(codec, TAS2552_RESERVED_0D, 0xc0); in tas2552_post_event()
96 snd_soc_update_bits(codec, TAS2552_LIMIT_RATE_HYS, (1 << 5), in tas2552_post_event()
98 snd_soc_update_bits(codec, TAS2552_CFG_2, 1, 0); in tas2552_post_event()
99 snd_soc_update_bits(codec, TAS2552_CFG_1, TAS2552_SWS, 0); in tas2552_post_event()
102 snd_soc_update_bits(codec, TAS2552_CFG_1, TAS2552_SWS, in tas2552_post_event()
104 snd_soc_update_bits(codec, TAS2552_CFG_2, 1, 1); in tas2552_post_event()
105 snd_soc_update_bits(codec, TAS2552_LIMIT_RATE_HYS, (1 << 5), 0); in tas2552_post_event()
106 snd_soc_write(codec, TAS2552_RESERVED_0D, 0xbe); in tas2552_post_event()
[all …]
Dwm8994.c109 static void wm8958_micd_set_rate(struct snd_soc_codec *codec) in wm8958_micd_set_rate() argument
111 struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec); in wm8958_micd_set_rate()
120 sysclk = snd_soc_read(codec, WM8994_CLOCKING_1); in wm8958_micd_set_rate()
151 dev_dbg(codec->dev, "MICD rate %d,%d for %dHz %s\n", in wm8958_micd_set_rate()
155 snd_soc_update_bits(codec, WM8958_MIC_DETECT_1, in wm8958_micd_set_rate()
160 static int configure_aif_clock(struct snd_soc_codec *codec, int aif) in configure_aif_clock() argument
162 struct wm8994_priv *wm8994 = snd_soc_codec_get_drvdata(codec); in configure_aif_clock()
200 dev_dbg(codec->dev, "Dividing AIF%d clock to %dHz\n", in configure_aif_clock()
206 snd_soc_update_bits(codec, WM8994_AIF1_CLOCKING_1 + offset, in configure_aif_clock()
213 static int configure_clock(struct snd_soc_codec *codec) in configure_clock() argument
[all …]
Dwm8955.c131 static int wm8955_reset(struct snd_soc_codec *codec) in wm8955_reset() argument
133 return snd_soc_write(codec, WM8955_RESET, 0); in wm8955_reset()
245 static int wm8955_configure_clocking(struct snd_soc_codec *codec) in wm8955_configure_clocking() argument
247 struct wm8955_priv *wm8955 = snd_soc_codec_get_drvdata(codec); in wm8955_configure_clocking()
270 dev_err(codec->dev, "Sample rate %dHz unsupported\n", in wm8955_configure_clocking()
285 ret = wm8995_pll_factors(codec->dev, wm8955->mclk_rate, in wm8955_configure_clocking()
288 dev_err(codec->dev, in wm8955_configure_clocking()
294 snd_soc_update_bits(codec, WM8955_PLL_CONTROL_1, in wm8955_configure_clocking()
298 snd_soc_update_bits(codec, WM8955_PLL_CONTROL_2, in wm8955_configure_clocking()
301 snd_soc_update_bits(codec, WM8955_PLL_CONTROL_3, in wm8955_configure_clocking()
[all …]
Dwm9713.c42 static unsigned int ac97_read(struct snd_soc_codec *codec,
44 static int ac97_write(struct snd_soc_codec *codec,
222 struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm); in wm9713_voice_shutdown() local
229 status = ac97_read(codec, AC97_EXTENDED_MID) | 0x1000; in wm9713_voice_shutdown()
230 rate = ac97_read(codec, AC97_HANDSET_RATE) & 0xF0FF; in wm9713_voice_shutdown()
231 ac97_write(codec, AC97_HANDSET_RATE, rate | 0x0200); in wm9713_voice_shutdown()
233 ac97_write(codec, AC97_HANDSET_RATE, rate | 0x0F00); in wm9713_voice_shutdown()
234 ac97_write(codec, AC97_EXTENDED_MID, status); in wm9713_voice_shutdown()
258 struct snd_soc_codec *codec = snd_soc_dapm_to_codec(dapm); in wm9713_hp_mixer_put() local
259 struct wm9713_priv *wm9713 = snd_soc_codec_get_drvdata(codec); in wm9713_hp_mixer_put()
[all …]
Dwm8978.c411 static void pll_factors(struct snd_soc_codec *codec, in pll_factors() argument
427 dev_warn(codec->dev, in pll_factors()
474 static int wm8978_configure_pll(struct snd_soc_codec *codec) in wm8978_configure_pll() argument
476 struct wm8978_priv *wm8978 = snd_soc_codec_get_drvdata(codec); in wm8978_configure_pll()
508 dev_dbg(codec->dev, "%s: OPCLKDIV=%d\n", __func__, opclk_div); in wm8978_configure_pll()
510 snd_soc_update_bits(codec, WM8978_GPIO_CONTROL, 0x30, in wm8978_configure_pll()
536 dev_dbg(codec->dev, "%s: f_MCLK=%uHz, f_PLLOUT=%uHz\n", __func__, in wm8978_configure_pll()
539 pll_factors(codec, &pll_div, f2, wm8978->f_mclk); in wm8978_configure_pll()
541 dev_dbg(codec->dev, "%s: calculated PLL N=0x%x, K=0x%x, div2=%d\n", in wm8978_configure_pll()
545 snd_soc_update_bits(codec, WM8978_POWER_MANAGEMENT_1, 0x20, 0); in wm8978_configure_pll()
[all …]
Dsn95031.c49 static void sn95031_enable_mic_bias(struct snd_soc_codec *codec) in sn95031_enable_mic_bias() argument
51 snd_soc_write(codec, SN95031_VAUD, BIT(2)|BIT(1)|BIT(0)); in sn95031_enable_mic_bias()
52 snd_soc_update_bits(codec, SN95031_MICBIAS, BIT(2), BIT(2)); in sn95031_enable_mic_bias()
140 static unsigned int sn95031_get_mic_bias(struct snd_soc_codec *codec) in sn95031_get_mic_bias() argument
142 u16 adc_adr = sn95031_initialize_adc(codec); in sn95031_get_mic_bias()
146 sn95031_enable_mic_bias(codec); in sn95031_get_mic_bias()
149 snd_soc_write(codec, SN95031_ADC1CNTL3, 0x05); in sn95031_get_mic_bias()
151 snd_soc_write(codec, SN95031_ADC1CNTL3, 0x04); in sn95031_get_mic_bias()
155 adc_val1 = snd_soc_read(codec, adc_adr); in sn95031_get_mic_bias()
157 adc_val2 = snd_soc_read(codec, adc_adr); in sn95031_get_mic_bias()
[all …]
Duda1380.c37 struct snd_soc_codec *codec; member
63 static inline unsigned int uda1380_read_reg_cache(struct snd_soc_codec *codec, in uda1380_read_reg_cache() argument
66 u16 *cache = codec->reg_cache; in uda1380_read_reg_cache()
77 static inline void uda1380_write_reg_cache(struct snd_soc_codec *codec, in uda1380_write_reg_cache() argument
80 u16 *cache = codec->reg_cache; in uda1380_write_reg_cache()
92 static int uda1380_write(struct snd_soc_codec *codec, unsigned int reg, in uda1380_write() argument
106 uda1380_write_reg_cache(codec, reg, value); in uda1380_write()
111 if (!snd_soc_codec_is_active(codec) && (reg >= UDA1380_MVOL)) in uda1380_write()
114 if (codec->hw_write(codec->control_data, data, 3) == 3) { in uda1380_write()
116 i2c_master_send(codec->control_data, data, 1); in uda1380_write()
[all …]
Dda7219.c257 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); in da7219_volsw_locked_get() local
258 struct da7219_priv *da7219 = snd_soc_codec_get_drvdata(codec); in da7219_volsw_locked_get()
271 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); in da7219_volsw_locked_put() local
272 struct da7219_priv *da7219 = snd_soc_codec_get_drvdata(codec); in da7219_volsw_locked_put()
285 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); in da7219_enum_locked_get() local
286 struct da7219_priv *da7219 = snd_soc_codec_get_drvdata(codec); in da7219_enum_locked_get()
299 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); in da7219_enum_locked_put() local
300 struct da7219_priv *da7219 = snd_soc_codec_get_drvdata(codec); in da7219_enum_locked_put()
311 static void da7219_alc_calib(struct snd_soc_codec *codec) in da7219_alc_calib() argument
316 mic_ctrl = snd_soc_read(codec, DA7219_MIC_1_CTRL); in da7219_alc_calib()
[all …]
Dwm8940.c342 struct snd_soc_codec *codec = codec_dai->codec; in wm8940_set_dai_fmt() local
343 u16 iface = snd_soc_read(codec, WM8940_IFACE) & 0xFE67; in wm8940_set_dai_fmt()
344 u16 clk = snd_soc_read(codec, WM8940_CLOCK) & 0x1fe; in wm8940_set_dai_fmt()
355 snd_soc_write(codec, WM8940_CLOCK, clk); in wm8940_set_dai_fmt()
388 snd_soc_write(codec, WM8940_IFACE, iface); in wm8940_set_dai_fmt()
397 struct snd_soc_codec *codec = dai->codec; in wm8940_i2s_hw_params() local
398 u16 iface = snd_soc_read(codec, WM8940_IFACE) & 0xFD9F; in wm8940_i2s_hw_params()
399 u16 addcntrl = snd_soc_read(codec, WM8940_ADDCNTRL) & 0xFFF1; in wm8940_i2s_hw_params()
400 u16 companding = snd_soc_read(codec, in wm8940_i2s_hw_params()
429 ret = snd_soc_write(codec, WM8940_ADDCNTRL, addcntrl); in wm8940_i2s_hw_params()
[all …]
Dwm8904.c319 static int wm8904_configure_clocking(struct snd_soc_codec *codec) in wm8904_configure_clocking() argument
321 struct wm8904_priv *wm8904 = snd_soc_codec_get_drvdata(codec); in wm8904_configure_clocking()
325 clock2 = snd_soc_read(codec, WM8904_CLOCK_RATES_2); in wm8904_configure_clocking()
326 snd_soc_update_bits(codec, WM8904_CLOCK_RATES_2, in wm8904_configure_clocking()
332 dev_dbg(codec->dev, "Using %dHz MCLK\n", wm8904->mclk_rate); in wm8904_configure_clocking()
338 snd_soc_update_bits(codec, WM8904_FLL_CONTROL_1, in wm8904_configure_clocking()
343 dev_dbg(codec->dev, "Using %dHz FLL clock\n", in wm8904_configure_clocking()
351 dev_err(codec->dev, "System clock not configured\n"); in wm8904_configure_clocking()
364 snd_soc_update_bits(codec, WM8904_CLOCK_RATES_0, WM8904_MCLK_DIV, in wm8904_configure_clocking()
367 snd_soc_update_bits(codec, WM8904_CLOCK_RATES_2, in wm8904_configure_clocking()
[all …]
Dtlv320aic3x.c75 struct snd_soc_codec *codec; member
150 struct snd_soc_codec *codec = snd_soc_dapm_kcontrol_codec(kcontrol); in snd_soc_dapm_put_volsw_aic3x() local
151 struct snd_soc_dapm_context *dapm = snd_soc_codec_get_dapm(codec); in snd_soc_dapm_put_volsw_aic3x()
177 change = snd_soc_test_bits(codec, reg, mask, val); in snd_soc_dapm_put_volsw_aic3x()
203 struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm); in mic_bias_event() local
204 struct aic3x_priv *aic3x = snd_soc_codec_get_drvdata(codec); in mic_bias_event()
209 snd_soc_update_bits(codec, MICBIAS_CTRL, in mic_bias_event()
215 snd_soc_update_bits(codec, MICBIAS_CTRL, in mic_bias_event()
981 static int aic3x_add_widgets(struct snd_soc_codec *codec) in aic3x_add_widgets() argument
983 struct aic3x_priv *aic3x = snd_soc_codec_get_drvdata(codec); in aic3x_add_widgets()
[all …]
Dwm8510.c319 struct snd_soc_codec *codec = codec_dai->codec; in wm8510_set_dai_pll() local
324 reg = snd_soc_read(codec, WM8510_CLOCK); in wm8510_set_dai_pll()
325 snd_soc_write(codec, WM8510_CLOCK, reg & 0x0ff); in wm8510_set_dai_pll()
328 reg = snd_soc_read(codec, WM8510_POWER1); in wm8510_set_dai_pll()
329 snd_soc_write(codec, WM8510_POWER1, reg & 0x1df); in wm8510_set_dai_pll()
335 snd_soc_write(codec, WM8510_PLLN, (pll_div.pre_div << 4) | pll_div.n); in wm8510_set_dai_pll()
336 snd_soc_write(codec, WM8510_PLLK1, pll_div.k >> 18); in wm8510_set_dai_pll()
337 snd_soc_write(codec, WM8510_PLLK2, (pll_div.k >> 9) & 0x1ff); in wm8510_set_dai_pll()
338 snd_soc_write(codec, WM8510_PLLK3, pll_div.k & 0x1ff); in wm8510_set_dai_pll()
339 reg = snd_soc_read(codec, WM8510_POWER1); in wm8510_set_dai_pll()
[all …]
Dwm9081.c342 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); in speaker_mode_get() local
345 reg = snd_soc_read(codec, WM9081_ANALOGUE_SPEAKER_2); in speaker_mode_get()
363 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); in speaker_mode_put() local
364 unsigned int reg_pwr = snd_soc_read(codec, WM9081_POWER_MANAGEMENT); in speaker_mode_put()
365 unsigned int reg2 = snd_soc_read(codec, WM9081_ANALOGUE_SPEAKER_2); in speaker_mode_put()
386 snd_soc_write(codec, WM9081_ANALOGUE_SPEAKER_2, reg2); in speaker_mode_put()
549 static int wm9081_set_fll(struct snd_soc_codec *codec, int fll_id, in wm9081_set_fll() argument
552 struct wm9081_priv *wm9081 = snd_soc_codec_get_drvdata(codec); in wm9081_set_fll()
564 dev_dbg(codec->dev, "FLL disabled\n"); in wm9081_set_fll()
575 reg5 = snd_soc_read(codec, WM9081_FLL_CONTROL_5); in wm9081_set_fll()
[all …]
Dsgtl5000.c158 struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm); in mic_bias_event() local
159 struct sgtl5000_priv *sgtl5000 = snd_soc_codec_get_drvdata(codec); in mic_bias_event()
164 snd_soc_update_bits(codec, SGTL5000_CHIP_MIC_CTRL, in mic_bias_event()
170 snd_soc_update_bits(codec, SGTL5000_CHIP_MIC_CTRL, in mic_bias_event()
185 struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm); in power_vag_event() local
190 snd_soc_update_bits(codec, SGTL5000_CHIP_ANA_POWER, in power_vag_event()
201 if ((snd_soc_read(codec, SGTL5000_CHIP_ANA_POWER) & in power_vag_event()
203 snd_soc_update_bits(codec, SGTL5000_CHIP_ANA_POWER, in power_vag_event()
329 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); in dac_get_volsw() local
334 reg = snd_soc_read(codec, SGTL5000_CHIP_DAC_VOL); in dac_get_volsw()
[all …]
Drt298.c41 struct snd_soc_codec *codec; member
196 static void rt298_index_sync(struct snd_soc_codec *codec) in rt298_index_sync() argument
198 struct rt298_priv *rt298 = snd_soc_codec_get_drvdata(codec); in rt298_index_sync()
202 snd_soc_write(codec, rt298->index_cache[i].reg, in rt298_index_sync()
229 if (!rt298->codec) in rt298_jack_detect()
232 dapm = snd_soc_codec_get_dapm(rt298->codec); in rt298_jack_detect()
318 int rt298_mic_detect(struct snd_soc_codec *codec, struct snd_soc_jack *jack) in rt298_mic_detect() argument
320 struct rt298_priv *rt298 = snd_soc_codec_get_drvdata(codec); in rt298_mic_detect()
335 struct snd_soc_codec *codec = snd_soc_dapm_to_codec(source->dapm); in is_mclk_mode() local
336 struct rt298_priv *rt298 = snd_soc_codec_get_drvdata(codec); in is_mclk_mode()
[all …]
Dwm8770.c87 struct snd_soc_codec *codec; member
311 struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm); in vout12supply_event() local
315 snd_soc_update_bits(codec, WM8770_OUTMUX1, 0x180, 0); in vout12supply_event()
318 snd_soc_update_bits(codec, WM8770_OUTMUX1, 0x180, 0x180); in vout12supply_event()
328 struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm); in vout34supply_event() local
332 snd_soc_update_bits(codec, WM8770_OUTMUX2, 0x180, 0); in vout34supply_event()
335 snd_soc_update_bits(codec, WM8770_OUTMUX2, 0x180, 0x180); in vout34supply_event()
342 static int wm8770_reset(struct snd_soc_codec *codec) in wm8770_reset() argument
344 return snd_soc_write(codec, WM8770_RESET, 0); in wm8770_reset()
349 struct snd_soc_codec *codec; in wm8770_set_fmt() local
[all …]
Drt286.c43 struct snd_soc_codec *codec; member
190 static void rt286_index_sync(struct snd_soc_codec *codec) in rt286_index_sync() argument
192 struct rt286_priv *rt286 = snd_soc_codec_get_drvdata(codec); in rt286_index_sync()
196 snd_soc_write(codec, rt286->index_cache[i].reg, in rt286_index_sync()
223 if (!rt286->codec) in rt286_jack_detect()
226 dapm = snd_soc_codec_get_dapm(rt286->codec); in rt286_jack_detect()
306 int rt286_mic_detect(struct snd_soc_codec *codec, struct snd_soc_jack *jack) in rt286_mic_detect() argument
308 struct snd_soc_dapm_context *dapm = snd_soc_codec_get_dapm(codec); in rt286_mic_detect()
309 struct rt286_priv *rt286 = snd_soc_codec_get_drvdata(codec); in rt286_mic_detect()
335 struct snd_soc_codec *codec = snd_soc_dapm_to_codec(source->dapm); in is_mclk_mode() local
[all …]
Dda7213.c194 static int da7213_get_alc_data(struct snd_soc_codec *codec, u8 reg_val) in da7213_get_alc_data() argument
203 snd_soc_write(codec, DA7213_ALC_CIC_OP_LVL_CTRL, reg_val); in da7213_get_alc_data()
206 snd_soc_write(codec, DA7213_ALC_CIC_OP_LVL_CTRL, in da7213_get_alc_data()
208 mid_data = snd_soc_read(codec, DA7213_ALC_CIC_OP_LVL_DATA); in da7213_get_alc_data()
211 snd_soc_write(codec, DA7213_ALC_CIC_OP_LVL_CTRL, in da7213_get_alc_data()
213 top_data = snd_soc_read(codec, DA7213_ALC_CIC_OP_LVL_DATA); in da7213_get_alc_data()
221 static void da7213_alc_calib_man(struct snd_soc_codec *codec) in da7213_alc_calib_man() argument
228 avg_left_data = da7213_get_alc_data(codec, in da7213_alc_calib_man()
231 avg_right_data = da7213_get_alc_data(codec, in da7213_alc_calib_man()
239 snd_soc_write(codec, DA7213_ALC_OFFSET_MAN_M_L, reg_val); in da7213_alc_calib_man()
[all …]
Dwm8974.c322 struct snd_soc_codec *codec = codec_dai->codec; in wm8974_set_dai_pll() local
328 reg = snd_soc_read(codec, WM8974_CLOCK); in wm8974_set_dai_pll()
329 snd_soc_write(codec, WM8974_CLOCK, reg & 0x0ff); in wm8974_set_dai_pll()
332 reg = snd_soc_read(codec, WM8974_POWER1); in wm8974_set_dai_pll()
333 snd_soc_write(codec, WM8974_POWER1, reg & 0x1df); in wm8974_set_dai_pll()
339 snd_soc_write(codec, WM8974_PLLN, (pll_div.pre_div << 4) | pll_div.n); in wm8974_set_dai_pll()
340 snd_soc_write(codec, WM8974_PLLK1, pll_div.k >> 18); in wm8974_set_dai_pll()
341 snd_soc_write(codec, WM8974_PLLK2, (pll_div.k >> 9) & 0x1ff); in wm8974_set_dai_pll()
342 snd_soc_write(codec, WM8974_PLLK3, pll_div.k & 0x1ff); in wm8974_set_dai_pll()
343 reg = snd_soc_read(codec, WM8974_POWER1); in wm8974_set_dai_pll()
[all …]
Dwm8711.c162 struct snd_soc_codec *codec = dai->codec; in wm8711_hw_params() local
163 struct wm8711_priv *wm8711 = snd_soc_codec_get_drvdata(codec); in wm8711_hw_params()
164 u16 iface = snd_soc_read(codec, WM8711_IFACE) & 0xfff3; in wm8711_hw_params()
169 snd_soc_write(codec, WM8711_SRATE, srate); in wm8711_hw_params()
183 snd_soc_write(codec, WM8711_IFACE, iface); in wm8711_hw_params()
190 struct snd_soc_codec *codec = dai->codec; in wm8711_pcm_prepare() local
193 snd_soc_write(codec, WM8711_ACTIVE, 0x0001); in wm8711_pcm_prepare()
201 struct snd_soc_codec *codec = dai->codec; in wm8711_shutdown() local
204 if (!snd_soc_codec_is_active(codec)) { in wm8711_shutdown()
206 snd_soc_write(codec, WM8711_ACTIVE, 0x0); in wm8711_shutdown()
[all …]
Dtlv320aic31xx.c162 struct snd_soc_codec *codec; member
352 struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm); in aic31xx_dapm_power_event() local
353 struct aic31xx_priv *aic31xx = snd_soc_codec_get_drvdata(codec); in aic31xx_dapm_power_event()
381 dev_err(codec->dev, "Unknown widget '%s' calling %s\n", in aic31xx_dapm_power_event()
392 dev_dbg(codec->dev, in aic31xx_dapm_power_event()
437 struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm); in mic_bias_event() local
438 struct aic31xx_priv *aic31xx = snd_soc_codec_get_drvdata(codec); in mic_bias_event()
443 snd_soc_update_bits(codec, AIC31XX_MICBIAS, in mic_bias_event()
447 dev_dbg(codec->dev, "%s: turned on\n", __func__); in mic_bias_event()
451 snd_soc_update_bits(codec, AIC31XX_MICBIAS, in mic_bias_event()
[all …]
Dtlv320aic23.c85 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); in snd_soc_tlv320aic23_put_volsw() local
99 reg = snd_soc_read(codec, TLV320AIC23_ANLG) & (~0x1C0); in snd_soc_tlv320aic23_put_volsw()
100 snd_soc_write(codec, TLV320AIC23_ANLG, reg | (val << 6)); in snd_soc_tlv320aic23_put_volsw()
108 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); in snd_soc_tlv320aic23_get_volsw() local
111 val = snd_soc_read(codec, TLV320AIC23_ANLG) & (0x1C0); in snd_soc_tlv320aic23_get_volsw()
300 static void get_current_sample_rates(struct snd_soc_codec *codec, int mclk, in get_current_sample_rates() argument
303 int src = snd_soc_read(codec, TLV320AIC23_SRATE); in get_current_sample_rates()
317 static int set_sample_rate_control(struct snd_soc_codec *codec, int mclk, in set_sample_rate_control() argument
327 snd_soc_write(codec, TLV320AIC23_SRATE, data); in set_sample_rate_control()
331 get_current_sample_rates(codec, mclk, &adc, &dac); in set_sample_rate_control()
[all …]
Dtlv320aic32x4.c316 struct snd_soc_codec *codec = codec_dai->codec; in aic32x4_set_dai_sysclk() local
317 struct aic32x4_priv *aic32x4 = snd_soc_codec_get_drvdata(codec); in aic32x4_set_dai_sysclk()
332 struct snd_soc_codec *codec = codec_dai->codec; in aic32x4_set_dai_fmt() local
337 iface_reg_1 = snd_soc_read(codec, AIC32X4_IFACE1); in aic32x4_set_dai_fmt()
339 iface_reg_2 = snd_soc_read(codec, AIC32X4_IFACE2); in aic32x4_set_dai_fmt()
341 iface_reg_3 = snd_soc_read(codec, AIC32X4_IFACE3); in aic32x4_set_dai_fmt()
381 snd_soc_write(codec, AIC32X4_IFACE1, iface_reg_1); in aic32x4_set_dai_fmt()
382 snd_soc_write(codec, AIC32X4_IFACE2, iface_reg_2); in aic32x4_set_dai_fmt()
383 snd_soc_write(codec, AIC32X4_IFACE3, iface_reg_3); in aic32x4_set_dai_fmt()
391 struct snd_soc_codec *codec = dai->codec; in aic32x4_hw_params() local
[all …]
Dmax98090.c287 dev_err(max98090->codec->dev, in max98090_reset()
357 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); in max98090_get_enab_tlv() local
358 struct max98090_priv *max98090 = snd_soc_codec_get_drvdata(codec); in max98090_get_enab_tlv()
362 unsigned int val = snd_soc_read(codec, mc->reg); in max98090_get_enab_tlv()
397 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); in max98090_put_enab_tlv() local
398 struct max98090_priv *max98090 = snd_soc_codec_get_drvdata(codec); in max98090_put_enab_tlv()
403 unsigned int val = snd_soc_read(codec, mc->reg); in max98090_put_enab_tlv()
432 snd_soc_update_bits(codec, mc->reg, in max98090_put_enab_tlv()
736 struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm); in max98090_micinput_event() local
737 struct max98090_priv *max98090 = snd_soc_codec_get_drvdata(codec); in max98090_micinput_event()
[all …]
Dalc5623.c50 static inline int alc5623_reset(struct snd_soc_codec *codec) in alc5623_reset() argument
52 return snd_soc_write(codec, ALC5623_RESET, 0); in alc5623_reset()
58 struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm); in amp_mixer_event() local
64 snd_soc_write(codec, ALC5623_HID_CTRL_INDEX, 0x46); in amp_mixer_event()
68 snd_soc_write(codec, ALC5623_HID_CTRL_DATA, 0xFFFF); in amp_mixer_event()
71 snd_soc_write(codec, ALC5623_HID_CTRL_DATA, 0); in amp_mixer_event()
529 struct snd_soc_codec *codec = codec_dai->codec; in alc5623_set_dai_pll() local
537 snd_soc_update_bits(codec, ALC5623_PWR_MANAG_ADD2, in alc5623_set_dai_pll()
542 reg = snd_soc_read(codec, ALC5623_DAI_CONTROL); in alc5623_set_dai_pll()
578 snd_soc_write(codec, ALC5623_GLOBAL_CLK_CTRL_REG, gbl_clk); in alc5623_set_dai_pll()
[all …]
Dwm8400.c68 static void wm8400_codec_reset(struct snd_soc_codec *codec) in wm8400_codec_reset() argument
70 struct wm8400_priv *wm8400 = snd_soc_codec_get_drvdata(codec); in wm8400_codec_reset()
94 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); in wm8400_outpga_put_volsw_vu() local
106 val = snd_soc_read(codec, reg); in wm8400_outpga_put_volsw_vu()
107 return snd_soc_write(codec, reg, val | 0x0100); in wm8400_outpga_put_volsw_vu()
327 struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm); in outmixer_event() local
336 reg = snd_soc_read(codec, WM8400_OUTPUT_MIXER1); in outmixer_event()
344 reg = snd_soc_read(codec, WM8400_OUTPUT_MIXER2); in outmixer_event()
352 reg = snd_soc_read(codec, WM8400_SPEAKER_MIXER); in outmixer_event()
360 reg = snd_soc_read(codec, WM8400_SPEAKER_MIXER); in outmixer_event()
[all …]
Dwm8985.c529 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); in eqmode_get() local
532 reg = snd_soc_read(codec, WM8985_EQ1_LOW_SHELF); in eqmode_get()
544 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); in eqmode_put() local
552 reg_eq = snd_soc_read(codec, WM8985_EQ1_LOW_SHELF); in eqmode_put()
564 regpwr2 = snd_soc_read(codec, WM8985_POWER_MANAGEMENT_2); in eqmode_put()
565 regpwr3 = snd_soc_read(codec, WM8985_POWER_MANAGEMENT_3); in eqmode_put()
567 snd_soc_update_bits(codec, WM8985_POWER_MANAGEMENT_2, in eqmode_put()
569 snd_soc_update_bits(codec, WM8985_POWER_MANAGEMENT_3, in eqmode_put()
571 snd_soc_update_bits(codec, WM8985_ADDITIONAL_CONTROL, in eqmode_put()
574 snd_soc_update_bits(codec, WM8985_EQ1_LOW_SHELF, in eqmode_put()
[all …]
Dwm8993.c469 static int _wm8993_set_fll(struct snd_soc_codec *codec, int fll_id, int source, in _wm8993_set_fll() argument
472 struct wm8993_priv *wm8993 = snd_soc_codec_get_drvdata(codec); in _wm8993_set_fll()
473 struct i2c_client *i2c = to_i2c_client(codec->dev); in _wm8993_set_fll()
485 dev_dbg(codec->dev, "FLL disabled\n"); in _wm8993_set_fll()
489 reg1 = snd_soc_read(codec, WM8993_FLL_CONTROL_1); in _wm8993_set_fll()
491 snd_soc_write(codec, WM8993_FLL_CONTROL_1, reg1); in _wm8993_set_fll()
500 reg5 = snd_soc_read(codec, WM8993_FLL_CONTROL_5); in _wm8993_set_fll()
516 dev_err(codec->dev, "Unknown FLL ID %d\n", fll_id); in _wm8993_set_fll()
522 reg1 = snd_soc_read(codec, WM8993_FLL_CONTROL_1); in _wm8993_set_fll()
524 snd_soc_write(codec, WM8993_FLL_CONTROL_1, reg1); in _wm8993_set_fll()
[all …]
Dwm8990.c135 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); in wm899x_outpga_put_volsw_vu() local
147 val = snd_soc_read(codec, reg); in wm899x_outpga_put_volsw_vu()
148 return snd_soc_write(codec, reg, val | 0x0100); in wm899x_outpga_put_volsw_vu()
377 struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm); in outmixer_event() local
384 reg = snd_soc_read(codec, WM8990_OUTPUT_MIXER1); in outmixer_event()
392 reg = snd_soc_read(codec, WM8990_OUTPUT_MIXER2); in outmixer_event()
400 reg = snd_soc_read(codec, WM8990_SPEAKER_MIXER); in outmixer_event()
408 reg = snd_soc_read(codec, WM8990_SPEAKER_MIXER); in outmixer_event()
937 struct snd_soc_codec *codec = codec_dai->codec; in wm8990_set_dai_pll() local
944 snd_soc_update_bits(codec, WM8990_POWER_MANAGEMENT_2, in wm8990_set_dai_pll()
[all …]
Dwm9090.c146 static void wait_for_dc_servo(struct snd_soc_codec *codec) in wait_for_dc_servo() argument
151 dev_dbg(codec->dev, "Waiting for DC servo...\n"); in wait_for_dc_servo()
155 reg = snd_soc_read(codec, WM9090_DC_SERVO_READBACK_0); in wait_for_dc_servo()
156 dev_dbg(codec->dev, "DC servo status: %x\n", reg); in wait_for_dc_servo()
162 dev_err(codec->dev, "Timed out waiting for DC Servo\n"); in wait_for_dc_servo()
254 struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm); in hp_ev() local
255 unsigned int reg = snd_soc_read(codec, WM9090_ANALOGUE_HP_0); in hp_ev()
259 snd_soc_update_bits(codec, WM9090_CHARGE_PUMP_1, in hp_ev()
264 snd_soc_update_bits(codec, WM9090_POWER_MANAGEMENT_1, in hp_ev()
269 snd_soc_write(codec, WM9090_ANALOGUE_HP_0, reg); in hp_ev()
[all …]
Dda9055.c454 static int da9055_get_alc_data(struct snd_soc_codec *codec, u8 reg_val) in da9055_get_alc_data() argument
463 snd_soc_write(codec, DA9055_ALC_CIC_OP_LVL_CTRL, reg_val); in da9055_get_alc_data()
466 snd_soc_write(codec, DA9055_ALC_CIC_OP_LVL_CTRL, in da9055_get_alc_data()
468 mid_data = snd_soc_read(codec, DA9055_ALC_CIC_OP_LVL_DATA); in da9055_get_alc_data()
471 snd_soc_write(codec, DA9055_ALC_CIC_OP_LVL_CTRL, in da9055_get_alc_data()
473 top_data = snd_soc_read(codec, DA9055_ALC_CIC_OP_LVL_DATA); in da9055_get_alc_data()
484 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); in da9055_put_alc_sw() local
495 mic_left = snd_soc_read(codec, DA9055_MIC_L_CTRL); in da9055_put_alc_sw()
496 mic_right = snd_soc_read(codec, DA9055_MIC_R_CTRL); in da9055_put_alc_sw()
499 snd_soc_update_bits(codec, DA9055_MIC_L_CTRL, in da9055_put_alc_sw()
[all …]
Dwm8995.c388 struct snd_soc_codec *codec; member
488 static void wm8995_update_class_w(struct snd_soc_codec *codec) in wm8995_update_class_w() argument
495 reg = snd_soc_read(codec, WM8995_DAC1_LEFT_MIXER_ROUTING); in wm8995_update_class_w()
498 dev_dbg(codec->dev, "Class W source AIF2DAC\n"); in wm8995_update_class_w()
502 dev_dbg(codec->dev, "Class W source AIF1DAC2\n"); in wm8995_update_class_w()
506 dev_dbg(codec->dev, "Class W source AIF1DAC1\n"); in wm8995_update_class_w()
510 dev_dbg(codec->dev, "DAC mixer setting: %x\n", reg); in wm8995_update_class_w()
515 reg_r = snd_soc_read(codec, WM8995_DAC1_RIGHT_MIXER_ROUTING); in wm8995_update_class_w()
517 dev_dbg(codec->dev, "Left and right DAC mixers different\n"); in wm8995_update_class_w()
522 dev_dbg(codec->dev, "Class W enabled\n"); in wm8995_update_class_w()
[all …]
Dwm8741.c64 static int wm8741_reset(struct snd_soc_codec *codec) in wm8741_reset() argument
66 return snd_soc_write(codec, WM8741_RESET, 0); in wm8741_reset()
184 struct snd_soc_codec *codec = dai->codec; in wm8741_startup() local
185 struct wm8741_priv *wm8741 = snd_soc_codec_get_drvdata(codec); in wm8741_startup()
199 struct snd_soc_codec *codec = dai->codec; in wm8741_hw_params() local
200 struct wm8741_priv *wm8741 = snd_soc_codec_get_drvdata(codec); in wm8741_hw_params()
201 u16 iface = snd_soc_read(codec, WM8741_FORMAT_CONTROL) & 0x1FC; in wm8741_hw_params()
208 dev_err(codec->dev, in wm8741_hw_params()
220 dev_err(codec->dev, "LRCLK %d unsupported with MCLK %d\n", in wm8741_hw_params()
239 dev_dbg(codec->dev, "wm8741_hw_params: Unsupported bit size param = %d", in wm8741_hw_params()
[all …]
Dda7210.c334 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); in da7210_put_alc_sw() local
338 if (snd_soc_read(codec, DA7210_CONTROL) & DA7210_NOISE_SUP_EN) { in da7210_put_alc_sw()
339 dev_dbg(codec->dev, in da7210_put_alc_sw()
357 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); in da7210_put_noise_sup_sw() local
362 if (snd_soc_read(codec, DA7210_ADC) & DA7210_ADC_ALC_EN) in da7210_put_noise_sup_sw()
366 if ((snd_soc_read(codec, DA7210_ZERO_CROSS) & in da7210_put_noise_sup_sw()
373 val = snd_soc_read(codec, DA7210_IN_GAIN); in da7210_put_noise_sup_sw()
380 if (((snd_soc_read(codec, DA7210_AUX1_L) & DA7210_AUX1_L_VOL) < in da7210_put_noise_sup_sw()
382 ((snd_soc_read(codec, DA7210_AUX1_R) & DA7210_AUX1_R_VOL) < in da7210_put_noise_sup_sw()
763 struct snd_soc_codec *codec = dai->codec; in da7210_hw_params() local
[all …]
Dsti-sas.c135 static int sti_sas_init_sas_registers(struct snd_soc_codec *codec, in sti_sas_init_sas_registers() argument
145 ret = snd_soc_update_bits(codec, STIH407_AUDIO_GLUE_CTRL, in sti_sas_init_sas_registers()
150 ret = snd_soc_update_bits(codec, STIH407_AUDIO_GLUE_CTRL, in sti_sas_init_sas_registers()
153 dev_err(codec->dev, "Failed to update SPDIF registers"); in sti_sas_init_sas_registers()
161 ret = snd_soc_update_bits(codec, STIH407_AUDIO_DAC_CTRL, in sti_sas_init_sas_registers()
166 ret = snd_soc_update_bits(codec, STIH407_AUDIO_DAC_CTRL, in sti_sas_init_sas_registers()
170 ret = snd_soc_update_bits(codec, STIH407_AUDIO_DAC_CTRL, in sti_sas_init_sas_registers()
175 ret = snd_soc_update_bits(codec, STIH416_AUDIO_DAC_CTRL, in sti_sas_init_sas_registers()
178 ret = snd_soc_update_bits(codec, in sti_sas_init_sas_registers()
182 ret = snd_soc_update_bits(codec, in sti_sas_init_sas_registers()
[all …]
Dstac9766.c142 static int stac9766_ac97_write(struct snd_soc_codec *codec, unsigned int reg, in stac9766_ac97_write() argument
145 struct snd_ac97 *ac97 = snd_soc_codec_get_drvdata(codec); in stac9766_ac97_write()
146 u16 *cache = codec->reg_cache; in stac9766_ac97_write()
149 stac9766_ac97_write(codec, AC97_INT_PAGING, 0); in stac9766_ac97_write()
151 stac9766_ac97_write(codec, AC97_INT_PAGING, 1); in stac9766_ac97_write()
162 static unsigned int stac9766_ac97_read(struct snd_soc_codec *codec, in stac9766_ac97_read() argument
165 struct snd_ac97 *ac97 = snd_soc_codec_get_drvdata(codec); in stac9766_ac97_read()
166 u16 val = 0, *cache = codec->reg_cache; in stac9766_ac97_read()
169 stac9766_ac97_write(codec, AC97_INT_PAGING, 0); in stac9766_ac97_read()
171 stac9766_ac97_write(codec, AC97_INT_PAGING, 1); in stac9766_ac97_read()
[all …]
Dwm8962.c58 struct snd_soc_codec *codec; member
1479 static int wm8962_dsp2_write_config(struct snd_soc_codec *codec) in wm8962_dsp2_write_config() argument
1481 struct wm8962_priv *wm8962 = snd_soc_codec_get_drvdata(codec); in wm8962_dsp2_write_config()
1487 static int wm8962_dsp2_set_enable(struct snd_soc_codec *codec, u16 val) in wm8962_dsp2_set_enable() argument
1489 u16 adcl = snd_soc_read(codec, WM8962_LEFT_ADC_VOLUME); in wm8962_dsp2_set_enable()
1490 u16 adcr = snd_soc_read(codec, WM8962_RIGHT_ADC_VOLUME); in wm8962_dsp2_set_enable()
1491 u16 dac = snd_soc_read(codec, WM8962_ADC_DAC_CONTROL_1); in wm8962_dsp2_set_enable()
1494 snd_soc_write(codec, WM8962_LEFT_ADC_VOLUME, 0); in wm8962_dsp2_set_enable()
1495 snd_soc_write(codec, WM8962_RIGHT_ADC_VOLUME, WM8962_ADC_VU); in wm8962_dsp2_set_enable()
1496 snd_soc_update_bits(codec, WM8962_ADC_DAC_CONTROL_1, in wm8962_dsp2_set_enable()
[all …]
Dwm0010.c94 struct snd_soc_codec *codec; member
161 static void wm0010_halt(struct snd_soc_codec *codec) in wm0010_halt() argument
163 struct wm0010_priv *wm0010 = snd_soc_codec_get_drvdata(codec); in wm0010_halt()
197 struct snd_soc_codec *codec; member
222 struct snd_soc_codec *codec = xfer->codec; in wm0010_boot_xfer_complete() local
223 struct wm0010_priv *wm0010 = snd_soc_codec_get_drvdata(codec); in wm0010_boot_xfer_complete()
228 dev_err(codec->dev, "SPI transfer failed: %d\n", in wm0010_boot_xfer_complete()
237 dev_dbg(codec->dev, "%d: %04x\n", i, out32[i]); in wm0010_boot_xfer_complete()
241 dev_err(codec->dev, in wm0010_boot_xfer_complete()
249 dev_err(codec->dev, in wm0010_boot_xfer_complete()
[all …]
Dda732x.c171 static inline int da732x_get_input_div(struct snd_soc_codec *codec, int sysclk) in da732x_get_input_div() argument
195 snd_soc_write(codec, DA732X_REG_PLL_CTRL, val); in da732x_get_input_div()
200 static void da732x_set_charge_pump(struct snd_soc_codec *codec, int state) in da732x_set_charge_pump() argument
204 snd_soc_write(codec, DA732X_REG_CLK_EN2, DA732X_CP_CLK_EN); in da732x_set_charge_pump()
205 snd_soc_write(codec, DA732X_REG_CP_HP2, DA732X_HP_CP_EN | in da732x_set_charge_pump()
207 snd_soc_write(codec, DA732X_REG_CP_CTRL1, DA732X_CP_EN | in da732x_set_charge_pump()
209 snd_soc_write(codec, DA732X_REG_CP_CTRL2, in da732x_set_charge_pump()
211 snd_soc_write(codec, DA732X_REG_CP_CTRL3, DA732X_CP_1MHZ); in da732x_set_charge_pump()
214 snd_soc_write(codec, DA732X_REG_CLK_EN2, DA732X_CP_CLK_DIS); in da732x_set_charge_pump()
215 snd_soc_write(codec, DA732X_REG_CP_HP2, DA732X_HP_CP_DIS); in da732x_set_charge_pump()
[all …]
Dab8500-codec.c1040 static void anc_fir(struct snd_soc_codec *codec, in anc_fir() argument
1044 snd_soc_update_bits(codec, AB8500_ANCCONF1, in anc_fir()
1048 snd_soc_write(codec, AB8500_ANCCONF5, val >> 8 & 0xff); in anc_fir()
1049 snd_soc_write(codec, AB8500_ANCCONF6, val & 0xff); in anc_fir()
1052 snd_soc_update_bits(codec, AB8500_ANCCONF1, in anc_fir()
1057 static void anc_iir(struct snd_soc_codec *codec, unsigned int bnk, in anc_iir() argument
1062 snd_soc_update_bits(codec, AB8500_ANCCONF1, in anc_iir()
1066 snd_soc_update_bits(codec, AB8500_ANCCONF1, in anc_iir()
1070 snd_soc_update_bits(codec, AB8500_ANCCONF1, in anc_iir()
1075 snd_soc_write(codec, AB8500_ANCCONF7, 0); in anc_iir()
[all …]
Dcx20442.c91 static unsigned int cx20442_read_reg_cache(struct snd_soc_codec *codec, in cx20442_read_reg_cache() argument
94 u8 *reg_cache = codec->reg_cache; in cx20442_read_reg_cache()
96 if (reg >= codec->driver->reg_cache_size) in cx20442_read_reg_cache()
155 static int cx20442_write(struct snd_soc_codec *codec, unsigned int reg, in cx20442_write() argument
158 struct cx20442_priv *cx20442 = snd_soc_codec_get_drvdata(codec); in cx20442_write()
159 u8 *reg_cache = codec->reg_cache; in cx20442_write()
163 if (reg >= codec->driver->reg_cache_size) in cx20442_write()
168 if (!codec->hw_write || !cx20442->control_data) in cx20442_write()
196 dev_dbg(codec->dev, "%s: %s\n", __func__, buf); in cx20442_write()
197 if (codec->hw_write(cx20442->control_data, buf, len) != len) in cx20442_write()
[all …]
Dml26124.c341 struct snd_soc_codec *codec = dai->codec; in ml26124_hw_params() local
342 struct ml26124_priv *priv = snd_soc_codec_get_drvdata(codec); in ml26124_hw_params()
354 snd_soc_update_bits(codec, ML26124_CLK_CTL, in ml26124_hw_params()
358 snd_soc_update_bits(codec, ML26124_CLK_CTL, in ml26124_hw_params()
362 snd_soc_update_bits(codec, ML26124_CLK_CTL, in ml26124_hw_params()
366 dev_err(codec->dev, "Unsupported MCLKI\n"); in ml26124_hw_params()
370 snd_soc_update_bits(codec, ML26124_CLK_CTL, in ml26124_hw_params()
378 snd_soc_update_bits(codec, ML26124_SMPLING_RATE, 0xf, srate); in ml26124_hw_params()
379 snd_soc_update_bits(codec, ML26124_PLLNL, 0xff, coeff_div[i].pllnl); in ml26124_hw_params()
380 snd_soc_update_bits(codec, ML26124_PLLNH, 0x1, coeff_div[i].pllnh); in ml26124_hw_params()
[all …]
Dwm8580.c255 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); in wm8580_out_vu() local
256 struct wm8580_priv *wm8580 = snd_soc_codec_get_drvdata(codec); in wm8580_out_vu()
272 snd_soc_update_bits(codec, reg, 0x100, 0x100); in wm8580_out_vu()
273 snd_soc_update_bits(codec, reg2, 0x100, 0x100); in wm8580_out_vu()
433 struct snd_soc_codec *codec = codec_dai->codec; in wm8580_set_dai_pll() local
434 struct wm8580_priv *wm8580 = snd_soc_codec_get_drvdata(codec); in wm8580_set_dai_pll()
473 snd_soc_update_bits(codec, WM8580_PWRDN2, pwr_mask, pwr_mask); in wm8580_set_dai_pll()
478 snd_soc_write(codec, WM8580_PLLA1 + offset, pll_div.k & 0x1ff); in wm8580_set_dai_pll()
479 snd_soc_write(codec, WM8580_PLLA2 + offset, (pll_div.k >> 9) & 0x1ff); in wm8580_set_dai_pll()
480 snd_soc_write(codec, WM8580_PLLA3 + offset, in wm8580_set_dai_pll()
[all …]
Dwm8996.c55 struct snd_soc_codec *codec; member
337 static void wm8996_set_retune_mobile(struct snd_soc_codec *codec, int block) in wm8996_set_retune_mobile() argument
339 struct wm8996_priv *wm8996 = snd_soc_codec_get_drvdata(codec); in wm8996_set_retune_mobile()
349 if (snd_soc_read(codec, WM8996_POWER_MANAGEMENT_8) & in wm8996_set_retune_mobile()
357 if (snd_soc_read(codec, WM8996_POWER_MANAGEMENT_8) & in wm8996_set_retune_mobile()
383 dev_dbg(codec->dev, "ReTune Mobile %d %s/%dHz for %dHz sample rate\n", in wm8996_set_retune_mobile()
392 save = snd_soc_read(codec, base); in wm8996_set_retune_mobile()
396 snd_soc_update_bits(codec, base + i, 0xffff, in wm8996_set_retune_mobile()
399 snd_soc_update_bits(codec, base, WM8996_DSP1RX_EQ_ENA, save); in wm8996_set_retune_mobile()
415 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); in wm8996_put_retune_mobile_enum() local
[all …]
Des8328.c98 static int es8328_set_deemph(struct snd_soc_codec *codec) in es8328_set_deemph() argument
100 struct es8328_priv *es8328 = snd_soc_codec_get_drvdata(codec); in es8328_set_deemph()
120 dev_dbg(codec->dev, "Set deemphasis %d\n", val); in es8328_set_deemph()
122 return snd_soc_update_bits(codec, ES8328_DACCONTROL6, in es8328_set_deemph()
129 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); in es8328_get_deemph() local
130 struct es8328_priv *es8328 = snd_soc_codec_get_drvdata(codec); in es8328_get_deemph()
139 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); in es8328_put_deemph() local
140 struct es8328_priv *es8328 = snd_soc_codec_get_drvdata(codec); in es8328_put_deemph()
147 ret = es8328_set_deemph(codec); in es8328_put_deemph()
437 return snd_soc_update_bits(dai->codec, ES8328_DACCONTROL3, in es8328_mute()
[all …]
Dcs4270.c257 struct snd_soc_codec *codec = codec_dai->codec; in cs4270_set_dai_sysclk() local
258 struct cs4270_private *cs4270 = snd_soc_codec_get_drvdata(codec); in cs4270_set_dai_sysclk()
280 struct snd_soc_codec *codec = codec_dai->codec; in cs4270_set_dai_fmt() local
281 struct cs4270_private *cs4270 = snd_soc_codec_get_drvdata(codec); in cs4270_set_dai_fmt()
290 dev_err(codec->dev, "invalid dai format\n"); in cs4270_set_dai_fmt()
304 dev_err(codec->dev, "Unknown master/slave configuration\n"); in cs4270_set_dai_fmt()
329 struct snd_soc_codec *codec = dai->codec; in cs4270_hw_params() local
330 struct cs4270_private *cs4270 = snd_soc_codec_get_drvdata(codec); in cs4270_hw_params()
349 dev_err(codec->dev, "could not find matching ratio\n"); in cs4270_hw_params()
355 reg = snd_soc_read(codec, CS4270_MODE); in cs4270_hw_params()
[all …]
Dad1980.c208 static int ad1980_reset(struct snd_soc_codec *codec, int try_warm) in ad1980_reset() argument
210 struct snd_ac97 *ac97 = snd_soc_codec_get_drvdata(codec); in ad1980_reset()
226 snd_soc_write(codec, AC97_AD_SERIAL_CFG, 0x9900); in ad1980_reset()
230 dev_err(codec->dev, "Failed to reset: AC97 link error\n"); in ad1980_reset()
235 static int ad1980_soc_probe(struct snd_soc_codec *codec) in ad1980_soc_probe() argument
243 ac97 = snd_soc_new_ac97_codec(codec, 0, 0); in ad1980_soc_probe()
246 dev_err(codec->dev, "Failed to register AC97 codec: %d\n", ret); in ad1980_soc_probe()
256 snd_soc_codec_init_regmap(codec, regmap); in ad1980_soc_probe()
257 snd_soc_codec_set_drvdata(codec, ac97); in ad1980_soc_probe()
259 ret = ad1980_reset(codec, 0); in ad1980_soc_probe()
[all …]
Dmax9850.c133 struct snd_soc_codec *codec = dai->codec; in max9850_hw_params() local
134 struct max9850_priv *max9850 = snd_soc_codec_get_drvdata(codec); in max9850_hw_params()
142 sf = (snd_soc_read(codec, MAX9850_CLOCK) >> 2) + 1; in max9850_hw_params()
148 snd_soc_write(codec, MAX9850_LRCLK_MSB, (lrclk_div >> 8) & 0x7f); in max9850_hw_params()
149 snd_soc_write(codec, MAX9850_LRCLK_LSB, lrclk_div & 0xff); in max9850_hw_params()
164 snd_soc_update_bits(codec, MAX9850_DIGITAL_AUDIO, 0x3, da); in max9850_hw_params()
172 struct snd_soc_codec *codec = codec_dai->codec; in max9850_set_dai_sysclk() local
173 struct max9850_priv *max9850 = snd_soc_codec_get_drvdata(codec); in max9850_set_dai_sysclk()
177 snd_soc_write(codec, MAX9850_CLOCK, 0x0); in max9850_set_dai_sysclk()
179 snd_soc_write(codec, MAX9850_CLOCK, 0x4); in max9850_set_dai_sysclk()
[all …]
Dwm8971.c436 struct snd_soc_codec *codec = codec_dai->codec; in wm8971_set_dai_sysclk() local
437 struct wm8971_priv *wm8971 = snd_soc_codec_get_drvdata(codec); in wm8971_set_dai_sysclk()
454 struct snd_soc_codec *codec = codec_dai->codec; in wm8971_set_dai_fmt() local
505 snd_soc_write(codec, WM8971_IFACE, iface); in wm8971_set_dai_fmt()
513 struct snd_soc_codec *codec = dai->codec; in wm8971_pcm_hw_params() local
514 struct wm8971_priv *wm8971 = snd_soc_codec_get_drvdata(codec); in wm8971_pcm_hw_params()
515 u16 iface = snd_soc_read(codec, WM8971_IFACE) & 0x1f3; in wm8971_pcm_hw_params()
516 u16 srate = snd_soc_read(codec, WM8971_SRATE) & 0x1c0; in wm8971_pcm_hw_params()
535 snd_soc_write(codec, WM8971_IFACE, iface); in wm8971_pcm_hw_params()
537 snd_soc_write(codec, WM8971_SRATE, srate | in wm8971_pcm_hw_params()
[all …]
Dwm8983.c495 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); in eqmode_get() local
498 reg = snd_soc_read(codec, WM8983_EQ1_LOW_SHELF); in eqmode_get()
510 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); in eqmode_put() local
518 reg_eq = snd_soc_read(codec, WM8983_EQ1_LOW_SHELF); in eqmode_put()
530 regpwr2 = snd_soc_read(codec, WM8983_POWER_MANAGEMENT_2); in eqmode_put()
531 regpwr3 = snd_soc_read(codec, WM8983_POWER_MANAGEMENT_3); in eqmode_put()
533 snd_soc_update_bits(codec, WM8983_POWER_MANAGEMENT_2, in eqmode_put()
535 snd_soc_update_bits(codec, WM8983_POWER_MANAGEMENT_3, in eqmode_put()
538 snd_soc_update_bits(codec, WM8983_EQ1_LOW_SHELF, in eqmode_put()
543 snd_soc_write(codec, WM8983_POWER_MANAGEMENT_2, regpwr2); in eqmode_put()
[all …]
Dak4642.c181 struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm); in ak4642_lout_event() local
187 snd_soc_update_bits(codec, SG_SL2, LOPS, LOPS); in ak4642_lout_event()
193 snd_soc_update_bits(codec, SG_SL2, LOPS, 0); in ak4642_lout_event()
285 struct snd_soc_codec *codec = dai->codec; in ak4642_dai_startup() local
298 snd_soc_write(codec, L_IVC, 0x91); /* volume */ in ak4642_dai_startup()
299 snd_soc_write(codec, R_IVC, 0x91); /* volume */ in ak4642_dai_startup()
314 snd_soc_update_bits(codec, SG_SL1, PMMP | MGAIN0, PMMP | MGAIN0); in ak4642_dai_startup()
315 snd_soc_write(codec, TIMER, ZTM(0x3) | WTM(0x3)); in ak4642_dai_startup()
316 snd_soc_write(codec, ALC_CTL1, ALC | LMTH0); in ak4642_dai_startup()
317 snd_soc_update_bits(codec, PW_MGMT1, PMADL, PMADL); in ak4642_dai_startup()
[all …]
Dwm8991.c126 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); in wm899x_outpga_put_volsw_vu() local
136 val = snd_soc_read(codec, reg); in wm899x_outpga_put_volsw_vu()
137 return snd_soc_write(codec, reg, val | 0x0100); in wm899x_outpga_put_volsw_vu()
354 struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm); in outmixer_event() local
361 reg = snd_soc_read(codec, WM8991_OUTPUT_MIXER1); in outmixer_event()
370 reg = snd_soc_read(codec, WM8991_OUTPUT_MIXER2); in outmixer_event()
379 reg = snd_soc_read(codec, WM8991_SPEAKER_MIXER); in outmixer_event()
388 reg = snd_soc_read(codec, WM8991_SPEAKER_MIXER); in outmixer_event()
920 struct snd_soc_codec *codec = codec_dai->codec; in wm8991_set_dai_pll() local
927 reg = snd_soc_read(codec, WM8991_POWER_MANAGEMENT_2); in wm8991_set_dai_pll()
[all …]
Dtlv320aic26.c33 struct snd_soc_codec *codec; member
67 struct snd_soc_codec *codec = dai->codec; in aic26_hw_params() local
68 struct aic26 *aic26 = snd_soc_codec_get_drvdata(codec); in aic26_hw_params()
115 snd_soc_write(codec, AIC26_REG_PLL_PROG1, reg); in aic26_hw_params()
117 snd_soc_write(codec, AIC26_REG_PLL_PROG2, reg); in aic26_hw_params()
124 snd_soc_update_bits(codec, AIC26_REG_AUDIO_CTRL3, 0xf800, reg); in aic26_hw_params()
128 snd_soc_update_bits(codec, AIC26_REG_AUDIO_CTRL1, 0xfff, reg); in aic26_hw_params()
138 struct snd_soc_codec *codec = dai->codec; in aic26_mute() local
139 struct aic26 *aic26 = snd_soc_codec_get_drvdata(codec); in aic26_mute()
149 snd_soc_update_bits(codec, AIC26_REG_DAC_GAIN, 0x8000, reg); in aic26_mute()
[all …]
Dwm8804.c140 struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm); in wm8804_aif_event() local
141 struct wm8804_priv *wm8804 = snd_soc_codec_get_drvdata(codec); in wm8804_aif_event()
147 snd_soc_update_bits(codec, WM8804_PWRDN, 0x10, 0x0); in wm8804_aif_event()
154 snd_soc_update_bits(codec, WM8804_PWRDN, 0x10, 0x10); in wm8804_aif_event()
164 struct snd_soc_codec *codec = snd_soc_dapm_kcontrol_codec(kcontrol); in txsrc_put() local
165 struct snd_soc_dapm_context *dapm = snd_soc_codec_get_dapm(codec); in txsrc_put()
176 if (snd_soc_test_bits(codec, e->reg, mask, val)) { in txsrc_put()
178 txpwr = snd_soc_read(codec, WM8804_PWRDN) & 0x4; in txsrc_put()
181 snd_soc_update_bits(codec, WM8804_PWRDN, 0x4, 0x4); in txsrc_put()
184 snd_soc_update_bits(codec, e->reg, mask, val); in txsrc_put()
[all …]
Dwm8523.c128 struct snd_soc_codec *codec = dai->codec; in wm8523_startup() local
129 struct wm8523_priv *wm8523 = snd_soc_codec_get_drvdata(codec); in wm8523_startup()
135 dev_err(codec->dev, in wm8523_startup()
151 struct snd_soc_codec *codec = dai->codec; in wm8523_hw_params() local
152 struct wm8523_priv *wm8523 = snd_soc_codec_get_drvdata(codec); in wm8523_hw_params()
154 u16 aifctrl1 = snd_soc_read(codec, WM8523_AIF_CTRL1); in wm8523_hw_params()
155 u16 aifctrl2 = snd_soc_read(codec, WM8523_AIF_CTRL2); in wm8523_hw_params()
166 dev_err(codec->dev, "MCLK/fs ratio %d unsupported\n", in wm8523_hw_params()
181 dev_err(codec->dev, in wm8523_hw_params()
206 snd_soc_write(codec, WM8523_AIF_CTRL1, aifctrl1); in wm8523_hw_params()
[all …]
Dalc5632.c119 struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm); in amp_mixer_event() local
125 snd_soc_write(codec, ALC5632_HID_CTRL_INDEX, 0x46); in amp_mixer_event()
129 snd_soc_write(codec, ALC5632_HID_CTRL_DATA, 0xFFFF); in amp_mixer_event()
132 snd_soc_write(codec, ALC5632_HID_CTRL_DATA, 0); in amp_mixer_event()
684 struct snd_soc_codec *codec = codec_dai->codec; in alc5632_set_dai_pll() local
692 snd_soc_update_bits(codec, ALC5632_PWR_MANAG_ADD2, in alc5632_set_dai_pll()
695 snd_soc_update_bits(codec, ALC5632_PWR_MANAG_ADD2, in alc5632_set_dai_pll()
700 reg = snd_soc_read(codec, ALC5632_DAI_CONTROL); in alc5632_set_dai_pll()
748 snd_soc_write(codec, ALC5632_GPCR2, gbl_clk); in alc5632_set_dai_pll()
750 snd_soc_write(codec, ALC5632_PLL1_CTRL, pll_div); in alc5632_set_dai_pll()
[all …]
Dcs4265.c325 struct snd_soc_codec *codec = codec_dai->codec; in cs4265_set_sysclk() local
326 struct cs4265_private *cs4265 = snd_soc_codec_get_drvdata(codec); in cs4265_set_sysclk()
330 dev_err(codec->dev, "Invalid clk_id %d\n", clk_id); in cs4265_set_sysclk()
340 dev_err(codec->dev, "Invalid freq parameter %d\n", freq); in cs4265_set_sysclk()
346 struct snd_soc_codec *codec = codec_dai->codec; in cs4265_set_fmt() local
347 struct cs4265_private *cs4265 = snd_soc_codec_get_drvdata(codec); in cs4265_set_fmt()
352 snd_soc_update_bits(codec, CS4265_ADC_CTL, in cs4265_set_fmt()
357 snd_soc_update_bits(codec, CS4265_ADC_CTL, in cs4265_set_fmt()
386 struct snd_soc_codec *codec = dai->codec; in cs4265_digital_mute() local
389 snd_soc_update_bits(codec, CS4265_DAC_CTL, in cs4265_digital_mute()
[all …]
Dadav80x.c215 struct snd_soc_codec *codec = snd_soc_dapm_to_codec(source->dapm); in adav80x_dapm_sysclk_check() local
216 struct adav80x *adav80x = snd_soc_codec_get_drvdata(codec); in adav80x_dapm_sysclk_check()
239 struct snd_soc_codec *codec = snd_soc_dapm_to_codec(source->dapm); in adav80x_dapm_pll_check() local
240 struct adav80x *adav80x = snd_soc_codec_get_drvdata(codec); in adav80x_dapm_pll_check()
284 static int adav80x_set_deemph(struct snd_soc_codec *codec) in adav80x_set_deemph() argument
286 struct adav80x *adav80x = snd_soc_codec_get_drvdata(codec); in adav80x_set_deemph()
318 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); in adav80x_put_deemph() local
319 struct adav80x *adav80x = snd_soc_codec_get_drvdata(codec); in adav80x_put_deemph()
327 return adav80x_set_deemph(codec); in adav80x_put_deemph()
333 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); in adav80x_get_deemph() local
[all …]
Dwm8776.c81 static int wm8776_reset(struct snd_soc_codec *codec) in wm8776_reset() argument
83 return snd_soc_write(codec, WM8776_RESET, 0); in wm8776_reset()
169 struct snd_soc_codec *codec = dai->codec; in wm8776_set_fmt() local
227 snd_soc_update_bits(codec, reg, 0xf, iface); in wm8776_set_fmt()
228 snd_soc_update_bits(codec, WM8776_MSTRCTRL, 0x180, master); in wm8776_set_fmt()
246 struct snd_soc_codec *codec = dai->codec; in wm8776_hw_params() local
247 struct wm8776_priv *wm8776 = snd_soc_codec_get_drvdata(codec); in wm8776_hw_params()
282 dev_err(codec->dev, "Unsupported sample size: %i\n", in wm8776_hw_params()
288 if (snd_soc_read(codec, WM8776_MSTRCTRL) & master) { in wm8776_hw_params()
296 dev_err(codec->dev, in wm8776_hw_params()
[all …]
Dak4641.c53 static int ak4641_set_deemph(struct snd_soc_codec *codec) in ak4641_set_deemph() argument
55 struct ak4641_priv *ak4641 = snd_soc_codec_get_drvdata(codec); in ak4641_set_deemph()
69 dev_dbg(codec->dev, "Set deemphasis %d\n", best); in ak4641_set_deemph()
71 return snd_soc_update_bits(codec, AK4641_DAC, 0x3, best); in ak4641_set_deemph()
77 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); in ak4641_put_deemph() local
78 struct ak4641_priv *ak4641 = snd_soc_codec_get_drvdata(codec); in ak4641_put_deemph()
86 return ak4641_set_deemph(codec); in ak4641_put_deemph()
92 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); in ak4641_get_deemph() local
93 struct ak4641_priv *ak4641 = snd_soc_codec_get_drvdata(codec); in ak4641_get_deemph()
290 struct snd_soc_codec *codec = codec_dai->codec; in ak4641_set_dai_sysclk() local
[all …]
Dcs42l51.c57 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); in cs42l51_get_chan_mix() local
58 unsigned long value = snd_soc_read(codec, CS42L51_PCM_MIXER)&3; in cs42l51_get_chan_mix()
85 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); in cs42l51_set_chan_mix() local
101 snd_soc_write(codec, CS42L51_PCM_MIXER, val); in cs42l51_set_chan_mix()
156 struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm); in cs42l51_pdn_event() local
160 snd_soc_update_bits(codec, CS42L51_POWER_CTL1, in cs42l51_pdn_event()
166 snd_soc_update_bits(codec, CS42L51_POWER_CTL1, in cs42l51_pdn_event()
266 struct snd_soc_codec *codec = codec_dai->codec; in cs42l51_set_dai_fmt() local
267 struct cs42l51_private *cs42l51 = snd_soc_codec_get_drvdata(codec); in cs42l51_set_dai_fmt()
276 dev_err(codec->dev, "invalid DAI format\n"); in cs42l51_set_dai_fmt()
[all …]
Dwm8988.c247 struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm); in wm8988_lrc_control() local
248 u16 adctl2 = snd_soc_read(codec, WM8988_ADCTL2); in wm8988_lrc_control()
251 if (snd_soc_read(codec, WM8988_PWR2) & 0x180) in wm8988_lrc_control()
256 return snd_soc_write(codec, WM8988_ADCTL2, adctl2); in wm8988_lrc_control()
558 struct snd_soc_codec *codec = codec_dai->codec; in wm8988_set_dai_sysclk() local
559 struct wm8988_priv *wm8988 = snd_soc_codec_get_drvdata(codec); in wm8988_set_dai_sysclk()
590 struct snd_soc_codec *codec = codec_dai->codec; in wm8988_set_dai_fmt() local
641 snd_soc_write(codec, WM8988_IFACE, iface); in wm8988_set_dai_fmt()
648 struct snd_soc_codec *codec = dai->codec; in wm8988_pcm_startup() local
649 struct wm8988_priv *wm8988 = snd_soc_codec_get_drvdata(codec); in wm8988_pcm_startup()
[all …]
Dsta529.c154 static int sta529_set_bias_level(struct snd_soc_codec *codec, enum in sta529_set_bias_level() argument
157 struct sta529 *sta529 = snd_soc_codec_get_drvdata(codec); in sta529_set_bias_level()
162 snd_soc_update_bits(codec, STA529_FFXCFG0, POWER_CNTLMSAK, in sta529_set_bias_level()
164 snd_soc_update_bits(codec, STA529_MISC, FFX_CLK_MSK, in sta529_set_bias_level()
168 if (snd_soc_codec_get_bias_level(codec) == SND_SOC_BIAS_OFF) in sta529_set_bias_level()
170 snd_soc_update_bits(codec, STA529_FFXCFG0, in sta529_set_bias_level()
173 snd_soc_update_bits(codec, STA529_FFXCFG0, FFX_MASK, in sta529_set_bias_level()
175 snd_soc_update_bits(codec, STA529_MISC, FFX_CLK_MSK, in sta529_set_bias_level()
190 struct snd_soc_codec *codec = dai->codec; in sta529_hw_params() local
208 dev_err(codec->dev, "Unsupported format\n"); in sta529_hw_params()
[all …]
Drt5645.c240 struct snd_soc_codec *codec; member
268 static int rt5645_reset(struct snd_soc_codec *codec) in rt5645_reset() argument
270 return snd_soc_write(codec, RT5645_RESET, 0); in rt5645_reset()
667 struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm); in set_dmic_clk() local
668 struct rt5645_priv *rt5645 = snd_soc_codec_get_drvdata(codec); in set_dmic_clk()
675 dev_err(codec->dev, "Failed to set DMIC clock\n"); in set_dmic_clk()
677 snd_soc_update_bits(codec, RT5645_DMIC_CTRL1, in set_dmic_clk()
685 struct snd_soc_codec *codec = snd_soc_dapm_to_codec(source->dapm); in is_sys_clk_from_pll() local
688 val = snd_soc_read(codec, RT5645_GLB_CLK); in is_sys_clk_from_pll()
699 struct snd_soc_codec *codec = snd_soc_dapm_to_codec(source->dapm); in is_using_asrc() local
[all …]
Drt5640.c169 static int rt5640_reset(struct snd_soc_codec *codec) in rt5640_reset() argument
171 return snd_soc_write(codec, RT5640_RESET, 0); in rt5640_reset()
462 struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm); in set_dmic_clk() local
463 struct rt5640_priv *rt5640 = snd_soc_codec_get_drvdata(codec); in set_dmic_clk()
470 dev_err(codec->dev, "Failed to set DMIC clock\n"); in set_dmic_clk()
472 snd_soc_update_bits(codec, RT5640_DMIC, RT5640_DMIC_CLK_MASK, in set_dmic_clk()
480 struct snd_soc_codec *codec = snd_soc_dapm_to_codec(source->dapm); in is_sys_clk_from_pll() local
483 val = snd_soc_read(codec, RT5640_GLB_CLK); in is_sys_clk_from_pll()
919 static void hp_amp_power_on(struct snd_soc_codec *codec) in hp_amp_power_on() argument
921 struct rt5640_priv *rt5640 = snd_soc_codec_get_drvdata(codec); in hp_amp_power_on()
[all …]
Dwl1273.c175 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); in snd_wl1273_get_audio_route() local
176 struct wl1273_priv *wl1273 = snd_soc_codec_get_drvdata(codec); in snd_wl1273_get_audio_route()
193 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); in snd_wl1273_set_audio_route() local
194 struct wl1273_priv *wl1273 = snd_soc_codec_get_drvdata(codec); in snd_wl1273_set_audio_route()
200 if (snd_soc_codec_is_active(codec)) in snd_wl1273_set_audio_route()
217 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); in snd_wl1273_fm_audio_get() local
218 struct wl1273_priv *wl1273 = snd_soc_codec_get_drvdata(codec); in snd_wl1273_fm_audio_get()
220 dev_dbg(codec->dev, "%s: enter.\n", __func__); in snd_wl1273_fm_audio_get()
230 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); in snd_wl1273_fm_audio_put() local
231 struct wl1273_priv *wl1273 = snd_soc_codec_get_drvdata(codec); in snd_wl1273_fm_audio_put()
[all …]
Dwm8728.c77 struct snd_soc_codec *codec = dai->codec; in wm8728_mute() local
78 u16 mute_reg = snd_soc_read(codec, WM8728_DACCTL); in wm8728_mute()
81 snd_soc_write(codec, WM8728_DACCTL, mute_reg | 1); in wm8728_mute()
83 snd_soc_write(codec, WM8728_DACCTL, mute_reg & ~1); in wm8728_mute()
92 struct snd_soc_codec *codec = dai->codec; in wm8728_hw_params() local
93 u16 dac = snd_soc_read(codec, WM8728_DACCTL); in wm8728_hw_params()
110 snd_soc_write(codec, WM8728_DACCTL, dac); in wm8728_hw_params()
118 struct snd_soc_codec *codec = codec_dai->codec; in wm8728_set_dai_fmt() local
119 u16 iface = snd_soc_read(codec, WM8728_IFCTL); in wm8728_set_dai_fmt()
159 snd_soc_write(codec, WM8728_IFCTL, iface); in wm8728_set_dai_fmt()
[all …]
Dak5386.c41 static int ak5386_soc_probe(struct snd_soc_codec *codec) in ak5386_soc_probe() argument
43 struct ak5386_priv *priv = snd_soc_codec_get_drvdata(codec); in ak5386_soc_probe()
47 static int ak5386_soc_remove(struct snd_soc_codec *codec) in ak5386_soc_remove() argument
49 struct ak5386_priv *priv = snd_soc_codec_get_drvdata(codec); in ak5386_soc_remove()
55 static int ak5386_soc_suspend(struct snd_soc_codec *codec) in ak5386_soc_suspend() argument
57 struct ak5386_priv *priv = snd_soc_codec_get_drvdata(codec); in ak5386_soc_suspend()
62 static int ak5386_soc_resume(struct snd_soc_codec *codec) in ak5386_soc_resume() argument
64 struct ak5386_priv *priv = snd_soc_codec_get_drvdata(codec); in ak5386_soc_resume()
86 struct snd_soc_codec *codec = codec_dai->codec; in ak5386_set_dai_fmt() local
91 dev_err(codec->dev, "Invalid DAI format\n"); in ak5386_set_dai_fmt()
[all …]
Dwm8750.c505 struct snd_soc_codec *codec = codec_dai->codec; in wm8750_set_dai_sysclk() local
506 struct wm8750_priv *wm8750 = snd_soc_codec_get_drvdata(codec); in wm8750_set_dai_sysclk()
523 struct snd_soc_codec *codec = codec_dai->codec; in wm8750_set_dai_fmt() local
574 snd_soc_write(codec, WM8750_IFACE, iface); in wm8750_set_dai_fmt()
582 struct snd_soc_codec *codec = dai->codec; in wm8750_pcm_hw_params() local
583 struct wm8750_priv *wm8750 = snd_soc_codec_get_drvdata(codec); in wm8750_pcm_hw_params()
584 u16 iface = snd_soc_read(codec, WM8750_IFACE) & 0x1f3; in wm8750_pcm_hw_params()
585 u16 srate = snd_soc_read(codec, WM8750_SRATE) & 0x1c0; in wm8750_pcm_hw_params()
604 snd_soc_write(codec, WM8750_IFACE, iface); in wm8750_pcm_hw_params()
606 snd_soc_write(codec, WM8750_SRATE, srate | in wm8750_pcm_hw_params()
[all …]
Drt5651.c378 struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm); in set_dmic_clk() local
379 struct rt5651_priv *rt5651 = snd_soc_codec_get_drvdata(codec); in set_dmic_clk()
386 dev_err(codec->dev, "Failed to set DMIC clock\n"); in set_dmic_clk()
388 snd_soc_update_bits(codec, RT5651_DMIC, RT5651_DMIC_CLK_MASK, in set_dmic_clk()
397 struct snd_soc_codec *codec = snd_soc_dapm_to_codec(source->dapm); in is_sysclk_from_pll() local
400 val = snd_soc_read(codec, RT5651_GLB_CLK); in is_sysclk_from_pll()
735 struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm); in rt5651_amp_power_event() local
736 struct rt5651_priv *rt5651 = snd_soc_codec_get_drvdata(codec); in rt5651_amp_power_event()
773 struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm); in rt5651_hp_event() local
774 struct rt5651_priv *rt5651 = snd_soc_codec_get_drvdata(codec); in rt5651_hp_event()
[all …]
Drt5670.c415 static int rt5670_headset_detect(struct snd_soc_codec *codec, int jack_insert) in rt5670_headset_detect() argument
418 struct snd_soc_dapm_context *dapm = snd_soc_codec_get_dapm(codec); in rt5670_headset_detect()
419 struct rt5670_priv *rt5670 = snd_soc_codec_get_drvdata(codec); in rt5670_headset_detect()
424 snd_soc_update_bits(codec, RT5670_GEN_CTRL3, 0x4, 0x0); in rt5670_headset_detect()
425 snd_soc_update_bits(codec, RT5670_CJ_CTRL2, in rt5670_headset_detect()
428 snd_soc_write(codec, RT5670_GPIO_CTRL2, 0x0004); in rt5670_headset_detect()
429 snd_soc_update_bits(codec, RT5670_GPIO_CTRL1, in rt5670_headset_detect()
431 snd_soc_update_bits(codec, RT5670_CJ_CTRL1, in rt5670_headset_detect()
433 snd_soc_write(codec, RT5670_JD_CTRL3, 0x00f0); in rt5670_headset_detect()
434 snd_soc_update_bits(codec, RT5670_CJ_CTRL2, in rt5670_headset_detect()
[all …]
D88pm860x-codec.c142 struct snd_soc_codec *codec; member
275 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); in snd_soc_get_volsw_2r_st() local
280 val[0] = snd_soc_read(codec, reg) & 0x3f; in snd_soc_get_volsw_2r_st()
281 val[1] = (snd_soc_read(codec, PM860X_SIDETONE_SHIFT) >> 4) & 0xf; in snd_soc_get_volsw_2r_st()
282 val2[0] = snd_soc_read(codec, reg2) & 0x3f; in snd_soc_get_volsw_2r_st()
283 val2[1] = (snd_soc_read(codec, PM860X_SIDETONE_SHIFT)) & 0xf; in snd_soc_get_volsw_2r_st()
299 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); in snd_soc_put_volsw_2r_st() local
311 err = snd_soc_update_bits(codec, reg, 0x3f, st_table[val].m); in snd_soc_put_volsw_2r_st()
314 err = snd_soc_update_bits(codec, PM860X_SIDETONE_SHIFT, 0xf0, in snd_soc_put_volsw_2r_st()
319 err = snd_soc_update_bits(codec, reg2, 0x3f, st_table[val2].m); in snd_soc_put_volsw_2r_st()
[all …]
Dwm8903.c263 struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm); in wm8903_dcs_event() local
264 struct wm8903_priv *wm8903 = snd_soc_codec_get_drvdata(codec); in wm8903_dcs_event()
271 snd_soc_update_bits(codec, WM8903_DC_SERVO_0, in wm8903_dcs_event()
285 struct snd_soc_codec *codec = snd_soc_dapm_to_codec(dapm); in wm8903_seq_notifier() local
286 struct wm8903_priv *wm8903 = snd_soc_codec_get_drvdata(codec); in wm8903_seq_notifier()
292 dev_dbg(codec->dev, "Starting DC servo for %x\n", in wm8903_seq_notifier()
301 dev_dbg(codec->dev, in wm8903_seq_notifier()
305 snd_soc_write(codec, WM8903_DC_SERVO_4 + i, in wm8903_seq_notifier()
308 dev_dbg(codec->dev, in wm8903_seq_notifier()
318 snd_soc_update_bits(codec, WM8903_DC_SERVO_2, in wm8903_seq_notifier()
[all …]
Dak4535.c254 struct snd_soc_codec *codec = codec_dai->codec; in ak4535_set_dai_sysclk() local
255 struct ak4535_priv *ak4535 = snd_soc_codec_get_drvdata(codec); in ak4535_set_dai_sysclk()
265 struct snd_soc_codec *codec = dai->codec; in ak4535_hw_params() local
266 struct ak4535_priv *ak4535 = snd_soc_codec_get_drvdata(codec); in ak4535_hw_params()
267 u8 mode2 = snd_soc_read(codec, AK4535_MODE2) & ~(0x3 << 5); in ak4535_hw_params()
286 snd_soc_write(codec, AK4535_MODE2, mode2); in ak4535_hw_params()
293 struct snd_soc_codec *codec = codec_dai->codec; in ak4535_set_dai_fmt() local
311 snd_soc_write(codec, AK4535_MODE1, mode1); in ak4535_set_dai_fmt()
317 struct snd_soc_codec *codec = dai->codec; in ak4535_mute() local
318 u16 mute_reg = snd_soc_read(codec, AK4535_DAC); in ak4535_mute()
[all …]
Dwm9712.c35 static unsigned int ac97_read(struct snd_soc_codec *codec,
37 static int ac97_write(struct snd_soc_codec *codec,
184 struct snd_soc_codec *codec = snd_soc_dapm_to_codec(dapm); in wm9712_hp_mixer_put() local
185 struct wm9712_priv *wm9712 = snd_soc_codec_get_drvdata(codec); in wm9712_hp_mixer_put()
228 struct snd_soc_codec *codec = snd_soc_dapm_to_codec(dapm); in wm9712_hp_mixer_get() local
229 struct wm9712_priv *wm9712 = snd_soc_codec_get_drvdata(codec); in wm9712_hp_mixer_get()
488 static unsigned int ac97_read(struct snd_soc_codec *codec, in ac97_read() argument
491 struct wm9712_priv *wm9712 = snd_soc_codec_get_drvdata(codec); in ac97_read()
492 u16 *cache = codec->reg_cache; in ac97_read()
508 static int ac97_write(struct snd_soc_codec *codec, unsigned int reg, in ac97_write() argument
[all …]
Dcs4271.c203 struct snd_soc_codec *codec = codec_dai->codec; in cs4271_set_dai_sysclk() local
204 struct cs4271_private *cs4271 = snd_soc_codec_get_drvdata(codec); in cs4271_set_dai_sysclk()
213 struct snd_soc_codec *codec = codec_dai->codec; in cs4271_set_dai_fmt() local
214 struct cs4271_private *cs4271 = snd_soc_codec_get_drvdata(codec); in cs4271_set_dai_fmt()
227 dev_err(codec->dev, "Invalid DAI format\n"); in cs4271_set_dai_fmt()
247 dev_err(codec->dev, "Invalid DAI format\n"); in cs4271_set_dai_fmt()
260 static int cs4271_set_deemph(struct snd_soc_codec *codec) in cs4271_set_deemph() argument
262 struct cs4271_private *cs4271 = snd_soc_codec_get_drvdata(codec); in cs4271_set_deemph()
286 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); in cs4271_get_deemph() local
287 struct cs4271_private *cs4271 = snd_soc_codec_get_drvdata(codec); in cs4271_get_deemph()
[all …]
Dcs42l56.c48 struct snd_soc_codec *codec; member
731 struct snd_soc_codec *codec = codec_dai->codec; in cs42l56_set_sysclk() local
732 struct cs42l56_private *cs42l56 = snd_soc_codec_get_drvdata(codec); in cs42l56_set_sysclk()
758 snd_soc_update_bits(codec, CS42L56_CLKCTL_1, in cs42l56_set_sysclk()
761 snd_soc_update_bits(codec, CS42L56_CLKCTL_1, in cs42l56_set_sysclk()
770 struct snd_soc_codec *codec = codec_dai->codec; in cs42l56_set_dai_fmt() local
771 struct cs42l56_private *cs42l56 = snd_soc_codec_get_drvdata(codec); in cs42l56_set_dai_fmt()
808 snd_soc_update_bits(codec, CS42L56_CLKCTL_1, in cs42l56_set_dai_fmt()
810 snd_soc_update_bits(codec, CS42L56_SERIAL_FMT, in cs42l56_set_dai_fmt()
812 snd_soc_update_bits(codec, CS42L56_CLKCTL_1, in cs42l56_set_dai_fmt()
[all …]
Darizona.c86 struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm); in arizona_spk_ev() local
87 struct arizona *arizona = dev_get_drvdata(codec->dev->parent); in arizona_spk_ev()
88 struct arizona_priv *priv = snd_soc_codec_get_drvdata(codec); in arizona_spk_ev()
113 val = snd_soc_read(codec, ARIZONA_INTERRUPT_RAW_STATUS_3); in arizona_spk_ev()
211 int arizona_init_spk(struct snd_soc_codec *codec) in arizona_init_spk() argument
213 struct snd_soc_dapm_context *dapm = snd_soc_codec_get_dapm(codec); in arizona_init_spk()
214 struct arizona_priv *priv = snd_soc_codec_get_drvdata(codec); in arizona_init_spk()
261 int arizona_init_mono(struct snd_soc_codec *codec) in arizona_init_mono() argument
263 struct snd_soc_dapm_context *dapm = snd_soc_codec_get_dapm(codec); in arizona_init_mono()
264 struct arizona_priv *priv = snd_soc_codec_get_drvdata(codec); in arizona_init_mono()
[all …]
Dwm8737.c77 static int wm8737_reset(struct snd_soc_codec *codec) in wm8737_reset() argument
79 return snd_soc_write(codec, WM8737_RESET, 0); in wm8737_reset()
331 struct snd_soc_codec *codec = dai->codec; in wm8737_hw_params() local
332 struct wm8737_priv *wm8737 = snd_soc_codec_get_drvdata(codec); in wm8737_hw_params()
351 dev_err(codec->dev, "%dHz MCLK can't support %dHz\n", in wm8737_hw_params()
374 snd_soc_update_bits(codec, WM8737_AUDIO_FORMAT, WM8737_WL_MASK, af); in wm8737_hw_params()
375 snd_soc_update_bits(codec, WM8737_CLOCKING, in wm8737_hw_params()
385 struct snd_soc_codec *codec = codec_dai->codec; in wm8737_set_dai_sysclk() local
386 struct wm8737_priv *wm8737 = snd_soc_codec_get_drvdata(codec); in wm8737_set_dai_sysclk()
397 dev_err(codec->dev, "MCLK rate %dHz not supported\n", freq); in wm8737_set_dai_sysclk()
[all …]
Dwm9705.c207 static unsigned int ac97_read(struct snd_soc_codec *codec, unsigned int reg) in ac97_read() argument
209 struct snd_ac97 *ac97 = snd_soc_codec_get_drvdata(codec); in ac97_read()
210 u16 *cache = codec->reg_cache; in ac97_read()
227 static int ac97_write(struct snd_soc_codec *codec, unsigned int reg, in ac97_write() argument
230 struct snd_ac97 *ac97 = snd_soc_codec_get_drvdata(codec); in ac97_write()
231 u16 *cache = codec->reg_cache; in ac97_write()
244 struct snd_soc_codec *codec = dai->codec; in ac97_prepare() local
248 vra = ac97_read(codec, AC97_EXTENDED_STATUS); in ac97_prepare()
249 ac97_write(codec, AC97_EXTENDED_STATUS, vra | 0x1); in ac97_prepare()
256 return ac97_write(codec, reg, substream->runtime->rate); in ac97_prepare()
[all …]
Dpcm512x.c232 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); in pcm512x_overclock_pll_get() local
233 struct pcm512x_priv *pcm512x = snd_soc_codec_get_drvdata(codec); in pcm512x_overclock_pll_get()
242 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); in pcm512x_overclock_pll_put() local
243 struct pcm512x_priv *pcm512x = snd_soc_codec_get_drvdata(codec); in pcm512x_overclock_pll_put()
245 switch (snd_soc_codec_get_bias_level(codec)) { in pcm512x_overclock_pll_put()
260 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); in pcm512x_overclock_dsp_get() local
261 struct pcm512x_priv *pcm512x = snd_soc_codec_get_drvdata(codec); in pcm512x_overclock_dsp_get()
270 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); in pcm512x_overclock_dsp_put() local
271 struct pcm512x_priv *pcm512x = snd_soc_codec_get_drvdata(codec); in pcm512x_overclock_dsp_put()
273 switch (snd_soc_codec_get_bias_level(codec)) { in pcm512x_overclock_dsp_put()
[all …]
Dwm8350.c259 struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm); in pga_event() local
260 struct wm8350_data *wm8350_data = snd_soc_codec_get_drvdata(codec); in pga_event()
302 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); in wm8350_put_volsw_2r_vu() local
303 struct wm8350_data *wm8350_priv = snd_soc_codec_get_drvdata(codec); in wm8350_put_volsw_2r_vu()
337 val = snd_soc_read(codec, reg); in wm8350_put_volsw_2r_vu()
338 snd_soc_write(codec, reg, val | WM8350_OUT1_VU); in wm8350_put_volsw_2r_vu()
345 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); in wm8350_get_volsw_2r() local
346 struct wm8350_data *wm8350_priv = snd_soc_codec_get_drvdata(codec); in wm8350_get_volsw_2r()
756 struct snd_soc_codec *codec = codec_dai->codec; in wm8350_set_dai_sysclk() local
757 struct wm8350_data *wm8350_data = snd_soc_codec_get_drvdata(codec); in wm8350_set_dai_sysclk()
[all …]
Dpcm1681.c93 static int pcm1681_set_deemph(struct snd_soc_codec *codec) in pcm1681_set_deemph() argument
95 struct pcm1681_private *priv = snd_soc_codec_get_drvdata(codec); in pcm1681_set_deemph()
123 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); in pcm1681_get_deemph() local
124 struct pcm1681_private *priv = snd_soc_codec_get_drvdata(codec); in pcm1681_get_deemph()
134 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); in pcm1681_put_deemph() local
135 struct pcm1681_private *priv = snd_soc_codec_get_drvdata(codec); in pcm1681_put_deemph()
139 return pcm1681_set_deemph(codec); in pcm1681_put_deemph()
145 struct snd_soc_codec *codec = codec_dai->codec; in pcm1681_set_dai_fmt() local
146 struct pcm1681_private *priv = snd_soc_codec_get_drvdata(codec); in pcm1681_set_dai_fmt()
150 dev_err(codec->dev, "Invalid clocking mode\n"); in pcm1681_set_dai_fmt()
[all …]
Dcs42l52.c45 struct snd_soc_codec *codec; member
476 static int cs42l52_add_mic_controls(struct snd_soc_codec *codec) in cs42l52_add_mic_controls() argument
478 struct cs42l52_private *cs42l52 = snd_soc_codec_get_drvdata(codec); in cs42l52_add_mic_controls()
482 snd_soc_add_codec_controls(codec, cs42l52_mica_controls, in cs42l52_add_mic_controls()
486 snd_soc_add_codec_controls(codec, cs42l52_micb_controls, in cs42l52_add_mic_controls()
719 struct snd_soc_codec *codec = codec_dai->codec; in cs42l52_set_sysclk() local
720 struct cs42l52_private *cs42l52 = snd_soc_codec_get_drvdata(codec); in cs42l52_set_sysclk()
725 dev_err(codec->dev, "Invalid freq parameter\n"); in cs42l52_set_sysclk()
733 struct snd_soc_codec *codec = codec_dai->codec; in cs42l52_set_fmt() local
734 struct cs42l52_private *cs42l52 = snd_soc_codec_get_drvdata(codec); in cs42l52_set_fmt()
[all …]
Duda134x.c113 static inline void uda134x_reset(struct snd_soc_codec *codec) in uda134x_reset() argument
115 struct uda134x_priv *uda134x = snd_soc_codec_get_drvdata(codec); in uda134x_reset()
125 struct uda134x_priv *uda134x = snd_soc_codec_get_drvdata(dai->codec); in uda134x_mute()
142 struct snd_soc_codec *codec = dai->codec; in uda134x_startup() local
143 struct uda134x_priv *uda134x = snd_soc_codec_get_drvdata(codec); in uda134x_startup()
171 struct snd_soc_codec *codec = dai->codec; in uda134x_shutdown() local
172 struct uda134x_priv *uda134x = snd_soc_codec_get_drvdata(codec); in uda134x_shutdown()
184 struct snd_soc_codec *codec = dai->codec; in uda134x_hw_params() local
185 struct uda134x_priv *uda134x = snd_soc_codec_get_drvdata(codec); in uda134x_hw_params()
251 struct snd_soc_codec *codec = codec_dai->codec; in uda134x_set_dai_sysclk() local
[all …]
Dwm8731.c91 static int wm8731_set_deemph(struct snd_soc_codec *codec) in wm8731_set_deemph() argument
93 struct wm8731_priv *wm8731 = snd_soc_codec_get_drvdata(codec); in wm8731_set_deemph()
113 dev_dbg(codec->dev, "Set deemphasis %d (%dHz)\n", in wm8731_set_deemph()
116 return snd_soc_update_bits(codec, WM8731_APDIGI, 0x6, val); in wm8731_set_deemph()
122 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); in wm8731_get_deemph() local
123 struct wm8731_priv *wm8731 = snd_soc_codec_get_drvdata(codec); in wm8731_get_deemph()
133 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); in wm8731_put_deemph() local
134 struct wm8731_priv *wm8731 = snd_soc_codec_get_drvdata(codec); in wm8731_put_deemph()
145 wm8731_set_deemph(codec); in wm8731_put_deemph()
217 struct snd_soc_codec *codec = snd_soc_dapm_to_codec(source->dapm); in wm8731_check_osc() local
[all …]
Dtas5086.c264 static int tas5086_set_deemph(struct snd_soc_codec *codec) in tas5086_set_deemph() argument
266 struct tas5086_private *priv = snd_soc_codec_get_drvdata(codec); in tas5086_set_deemph()
285 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); in tas5086_get_deemph() local
286 struct tas5086_private *priv = snd_soc_codec_get_drvdata(codec); in tas5086_get_deemph()
296 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); in tas5086_put_deemph() local
297 struct tas5086_private *priv = snd_soc_codec_get_drvdata(codec); in tas5086_put_deemph()
301 return tas5086_set_deemph(codec); in tas5086_put_deemph()
308 struct snd_soc_codec *codec = codec_dai->codec; in tas5086_set_dai_sysclk() local
309 struct tas5086_private *priv = snd_soc_codec_get_drvdata(codec); in tas5086_set_dai_sysclk()
326 struct snd_soc_codec *codec = codec_dai->codec; in tas5086_set_dai_fmt() local
[all …]
Dssm2602.c276 struct snd_soc_codec *codec = dai->codec; in ssm2602_hw_params() local
277 struct ssm2602_priv *ssm2602 = snd_soc_codec_get_drvdata(codec); in ssm2602_hw_params()
311 struct snd_soc_codec *codec = dai->codec; in ssm2602_startup() local
312 struct ssm2602_priv *ssm2602 = snd_soc_codec_get_drvdata(codec); in ssm2602_startup()
325 struct ssm2602_priv *ssm2602 = snd_soc_codec_get_drvdata(dai->codec); in ssm2602_mute()
340 struct snd_soc_codec *codec = codec_dai->codec; in ssm2602_set_dai_sysclk() local
341 struct ssm2602_priv *ssm2602 = snd_soc_codec_get_drvdata(codec); in ssm2602_set_dai_sysclk()
392 struct ssm2602_priv *ssm2602 = snd_soc_codec_get_drvdata(codec_dai->codec); in ssm2602_set_dai_fmt()
448 static int ssm2602_set_bias_level(struct snd_soc_codec *codec, in ssm2602_set_bias_level() argument
451 struct ssm2602_priv *ssm2602 = snd_soc_codec_get_drvdata(codec); in ssm2602_set_bias_level()
[all …]
Dwm5100.c57 struct snd_soc_codec *codec; member
120 static int wm5100_alloc_sr(struct snd_soc_codec *codec, int rate) in wm5100_alloc_sr() argument
122 struct wm5100_priv *wm5100 = snd_soc_codec_get_drvdata(codec); in wm5100_alloc_sr()
129 dev_err(codec->dev, "Unsupported sample rate: %dHz\n", rate); in wm5100_alloc_sr()
142 if ((snd_soc_read(codec, wm5100_sr_regs[i]) & in wm5100_alloc_sr()
149 dev_dbg(codec->dev, "SR %dHz, slot %d, ref %d\n", in wm5100_alloc_sr()
155 dev_err(codec->dev, "All SR slots already in use\n"); in wm5100_alloc_sr()
159 dev_dbg(codec->dev, "Allocating SR slot %d for %dHz\n", in wm5100_alloc_sr()
162 snd_soc_update_bits(codec, wm5100_sr_regs[sr_free], in wm5100_alloc_sr()
169 dev_err(codec->dev, in wm5100_alloc_sr()
[all …]
Dadau1701.c301 static int adau1701_reset(struct snd_soc_codec *codec, unsigned int clkdiv, in adau1701_reset() argument
304 struct adau1701 *adau1701 = snd_soc_codec_get_drvdata(codec); in adau1701_reset()
351 dev_warn(codec->dev, "Failed to load firmware\n"); in adau1701_reset()
365 static int adau1701_set_capture_pcm_format(struct snd_soc_codec *codec, in adau1701_set_capture_pcm_format() argument
368 struct adau1701 *adau1701 = snd_soc_codec_get_drvdata(codec); in adau1701_set_capture_pcm_format()
406 static int adau1701_set_playback_pcm_format(struct snd_soc_codec *codec, in adau1701_set_playback_pcm_format() argument
409 struct adau1701 *adau1701 = snd_soc_codec_get_drvdata(codec); in adau1701_set_playback_pcm_format()
438 struct snd_soc_codec *codec = dai->codec; in adau1701_hw_params() local
439 struct adau1701 *adau1701 = snd_soc_codec_get_drvdata(codec); in adau1701_hw_params()
450 ret = adau1701_reset(codec, clkdiv, params_rate(params)); in adau1701_hw_params()
[all …]
Dcs42l73.c493 struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm); in cs42l73_spklo_spk_amp_event() local
494 struct cs42l73_private *priv = snd_soc_codec_get_drvdata(codec); in cs42l73_spklo_spk_amp_event()
509 struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm); in cs42l73_ear_amp_event() local
510 struct cs42l73_private *priv = snd_soc_codec_get_drvdata(codec); in cs42l73_ear_amp_event()
527 struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm); in cs42l73_hp_amp_event() local
528 struct cs42l73_private *priv = snd_soc_codec_get_drvdata(codec); in cs42l73_hp_amp_event()
887 struct snd_soc_codec *codec = dai->codec; in cs42l73_set_mclk() local
888 struct cs42l73_private *priv = snd_soc_codec_get_drvdata(codec); in cs42l73_set_mclk()
902 dev_dbg(codec->dev, "MCLK%u %u <-> internal MCLK %u\n", in cs42l73_set_mclk()
909 snd_soc_write(codec, CS42L73_DMMCC, dmmcc); in cs42l73_set_mclk()
[all …]
Dsta32x.c146 struct snd_soc_codec *codec; member
273 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); in sta32x_coefficient_get() local
274 struct sta32x_priv *sta32x = snd_soc_codec_get_drvdata(codec); in sta32x_coefficient_get()
315 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); in sta32x_coefficient_put() local
316 struct sta32x_priv *sta32x = snd_soc_codec_get_drvdata(codec); in sta32x_coefficient_put()
350 static int sta32x_sync_coef_shadow(struct snd_soc_codec *codec) in sta32x_sync_coef_shadow() argument
352 struct sta32x_priv *sta32x = snd_soc_codec_get_drvdata(codec); in sta32x_sync_coef_shadow()
378 static int sta32x_cache_sync(struct snd_soc_codec *codec) in sta32x_cache_sync() argument
380 struct sta32x_priv *sta32x = snd_soc_codec_get_drvdata(codec); in sta32x_cache_sync()
387 sta32x_sync_coef_shadow(codec); in sta32x_cache_sync()
[all …]
Dac97.c39 struct snd_soc_codec *codec = dai->codec; in ac97_prepare() local
40 struct snd_ac97 *ac97 = snd_soc_codec_get_drvdata(codec); in ac97_prepare()
68 static int ac97_soc_probe(struct snd_soc_codec *codec) in ac97_soc_probe() argument
76 ret = snd_ac97_bus(codec->component.card->snd_card, 0, soc_ac97_ops, in ac97_soc_probe()
86 snd_soc_codec_set_drvdata(codec, ac97); in ac97_soc_probe()
92 static int ac97_soc_suspend(struct snd_soc_codec *codec) in ac97_soc_suspend() argument
94 struct snd_ac97 *ac97 = snd_soc_codec_get_drvdata(codec); in ac97_soc_suspend()
101 static int ac97_soc_resume(struct snd_soc_codec *codec) in ac97_soc_resume() argument
104 struct snd_ac97 *ac97 = snd_soc_codec_get_drvdata(codec); in ac97_soc_resume()
Dak4104.c68 struct snd_soc_codec *codec = codec_dai->codec; in ak4104_set_dai_fmt() local
69 struct ak4104_private *ak4104 = snd_soc_codec_get_drvdata(codec); in ak4104_set_dai_fmt()
84 dev_err(codec->dev, "invalid dai format\n"); in ak4104_set_dai_fmt()
105 struct snd_soc_codec *codec = dai->codec; in ak4104_hw_params() local
106 struct ak4104_private *ak4104 = snd_soc_codec_get_drvdata(codec); in ak4104_hw_params()
144 dev_err(codec->dev, "unsupported sampling rate\n"); in ak4104_hw_params()
174 static int ak4104_probe(struct snd_soc_codec *codec) in ak4104_probe() argument
176 struct ak4104_private *ak4104 = snd_soc_codec_get_drvdata(codec); in ak4104_probe()
181 dev_err(codec->dev, "Unable to enable regulator: %d\n", ret); in ak4104_probe()
205 static int ak4104_remove(struct snd_soc_codec *codec) in ak4104_remove() argument
[all …]
Dak4671.c166 struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm); in ak4671_out2_event() local
170 snd_soc_update_bits(codec, AK4671_LOUT2_POWER_MANAGERMENT, in ak4671_out2_event()
174 snd_soc_update_bits(codec, AK4671_LOUT2_POWER_MANAGERMENT, in ak4671_out2_event()
430 struct snd_soc_codec *codec = dai->codec; in ak4671_hw_params() local
433 fs = snd_soc_read(codec, AK4671_PLL_MODE_SELECT0); in ak4671_hw_params()
468 snd_soc_write(codec, AK4671_PLL_MODE_SELECT0, fs); in ak4671_hw_params()
476 struct snd_soc_codec *codec = dai->codec; in ak4671_set_dai_sysclk() local
479 pll = snd_soc_read(codec, AK4671_PLL_MODE_SELECT0); in ak4671_set_dai_sysclk()
514 snd_soc_write(codec, AK4671_PLL_MODE_SELECT0, pll); in ak4671_set_dai_sysclk()
521 struct snd_soc_codec *codec = dai->codec; in ak4671_set_dai_fmt() local
[all …]
Dadau17x1.c64 struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm); in adau17x1_pll_event() local
65 struct adau *adau = snd_soc_codec_get_drvdata(codec); in adau17x1_pll_event()
157 struct snd_soc_codec *codec = snd_soc_dapm_kcontrol_codec(kcontrol); in adau17x1_dsp_mux_enum_put() local
158 struct snd_soc_dapm_context *dapm = snd_soc_codec_get_dapm(codec); in adau17x1_dsp_mux_enum_put()
159 struct adau *adau = snd_soc_codec_get_drvdata(codec); in adau17x1_dsp_mux_enum_put()
185 change = snd_soc_test_bits(codec, reg, 0xff, val); in adau17x1_dsp_mux_enum_put()
202 struct snd_soc_codec *codec = snd_soc_dapm_kcontrol_codec(kcontrol); in adau17x1_dsp_mux_enum_get() local
203 struct adau *adau = snd_soc_codec_get_drvdata(codec); in adau17x1_dsp_mux_enum_get()
308 struct snd_soc_codec *codec = dai->codec; in adau17x1_hw_params() local
309 struct adau *adau = snd_soc_codec_get_drvdata(codec); in adau17x1_hw_params()
[all …]
Dmax98925.c102 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); in max98925_dac_event() local
103 struct max98925_priv *max98925 = snd_soc_codec_get_drvdata(codec); in max98925_dac_event()
259 static inline int max98925_rate_value(struct snd_soc_codec *codec, in max98925_rate_value() argument
300 struct snd_soc_codec *codec = codec_dai->codec; in max98925_dai_set_fmt() local
301 struct max98925_priv *max98925 = snd_soc_codec_get_drvdata(codec); in max98925_dai_set_fmt()
304 dev_dbg(codec->dev, "%s: fmt 0x%08X\n", __func__, fmt); in max98925_dai_set_fmt()
325 dev_err(codec->dev, "DAI clock mode unsupported"); in max98925_dai_set_fmt()
342 dev_err(codec->dev, "DAI invert mode unsupported"); in max98925_dai_set_fmt()
355 struct snd_soc_codec *codec = max98925->codec; in max98925_set_clock() local
398 dev_info(max98925->codec->dev, "unsupported sysclk %d\n", in max98925_set_clock()
[all …]
Dadau1761.c258 struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm); in adau1761_dejitter_fixup() local
259 struct adau *adau = snd_soc_codec_get_drvdata(codec); in adau1761_dejitter_fixup()
448 static int adau1761_set_bias_level(struct snd_soc_codec *codec, in adau1761_set_bias_level() argument
451 struct adau *adau = snd_soc_codec_get_drvdata(codec); in adau1761_set_bias_level()
473 struct snd_soc_codec *codec) in adau1761_get_lineout_mode() argument
475 struct adau1761_platform_data *pdata = codec->dev->platform_data; in adau1761_get_lineout_mode()
483 static int adau1761_setup_digmic_jackdetect(struct snd_soc_codec *codec) in adau1761_setup_digmic_jackdetect() argument
485 struct snd_soc_dapm_context *dapm = snd_soc_codec_get_dapm(codec); in adau1761_setup_digmic_jackdetect()
486 struct adau1761_platform_data *pdata = codec->dev->platform_data; in adau1761_setup_digmic_jackdetect()
487 struct adau *adau = snd_soc_codec_get_drvdata(codec); in adau1761_setup_digmic_jackdetect()
[all …]
Dtfa9879.c33 struct snd_soc_codec *codec = dai->codec; in tfa9879_hw_params() local
34 struct tfa9879_priv *tfa9879 = snd_soc_codec_get_drvdata(codec); in tfa9879_hw_params()
91 snd_soc_update_bits(codec, TFA9879_SERIAL_INTERFACE_1, in tfa9879_hw_params()
95 snd_soc_update_bits(codec, TFA9879_SERIAL_INTERFACE_1, in tfa9879_hw_params()
103 struct snd_soc_codec *codec = dai->codec; in tfa9879_digital_mute() local
105 snd_soc_update_bits(codec, TFA9879_MISC_CONTROL, in tfa9879_digital_mute()
114 struct snd_soc_codec *codec = dai->codec; in tfa9879_set_fmt() local
115 struct tfa9879_priv *tfa9879 = snd_soc_codec_get_drvdata(codec); in tfa9879_set_fmt()
154 snd_soc_update_bits(codec, TFA9879_SERIAL_INTERFACE_1, in tfa9879_set_fmt()
157 snd_soc_update_bits(codec, TFA9879_SERIAL_INTERFACE_1, in tfa9879_set_fmt()
Dwm2200.c90 struct snd_soc_codec *codec; member
1551 static int wm2200_probe(struct snd_soc_codec *codec) in wm2200_probe() argument
1553 struct wm2200_priv *wm2200 = dev_get_drvdata(codec->dev); in wm2200_probe()
1556 wm2200->codec = codec; in wm2200_probe()
1558 ret = snd_soc_add_codec_controls(codec, wm_adsp_fw_controls, 2); in wm2200_probe()
1567 struct snd_soc_codec *codec = dai->codec; in wm2200_set_fmt() local
1581 dev_err(codec->dev, "Unsupported DAI format %d\n", in wm2200_set_fmt()
1600 dev_err(codec->dev, "Unsupported master mode %d\n", in wm2200_set_fmt()
1622 snd_soc_update_bits(codec, WM2200_AUDIO_IF_1_1, WM2200_AIF1_BCLK_MSTR | in wm2200_set_fmt()
1624 snd_soc_update_bits(codec, WM2200_AUDIO_IF_1_2, in wm2200_set_fmt()
[all …]
Dsta350.c312 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); in sta350_coefficient_get() local
313 struct sta350_priv *sta350 = snd_soc_codec_get_drvdata(codec); in sta350_coefficient_get()
354 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); in sta350_coefficient_put() local
355 struct sta350_priv *sta350 = snd_soc_codec_get_drvdata(codec); in sta350_coefficient_put()
389 static int sta350_sync_coef_shadow(struct snd_soc_codec *codec) in sta350_sync_coef_shadow() argument
391 struct sta350_priv *sta350 = snd_soc_codec_get_drvdata(codec); in sta350_sync_coef_shadow()
417 static int sta350_cache_sync(struct snd_soc_codec *codec) in sta350_cache_sync() argument
419 struct sta350_priv *sta350 = snd_soc_codec_get_drvdata(codec); in sta350_cache_sync()
426 sta350_sync_coef_shadow(codec); in sta350_cache_sync()
616 struct snd_soc_codec *codec = codec_dai->codec; in sta350_set_dai_sysclk() local
[all …]
Dak4613.c232 struct snd_soc_codec *codec = dai->codec; in ak4613_dai_shutdown() local
233 struct ak4613_priv *priv = snd_soc_codec_get_drvdata(codec); in ak4613_dai_shutdown()
234 struct device *dev = codec->dev; in ak4613_dai_shutdown()
249 struct snd_soc_codec *codec = dai->codec; in ak4613_dai_set_fmt() local
250 struct ak4613_priv *priv = snd_soc_codec_get_drvdata(codec); in ak4613_dai_set_fmt()
272 struct snd_soc_codec *codec = dai->codec; in ak4613_dai_hw_params() local
273 struct ak4613_priv *priv = snd_soc_codec_get_drvdata(codec); in ak4613_dai_hw_params()
275 struct device *dev = codec->dev; in ak4613_dai_hw_params()
343 snd_soc_update_bits(codec, CTRL1, FMT_MASK, fmt_ctrl); in ak4613_dai_hw_params()
344 snd_soc_write(codec, CTRL2, ctrl2); in ak4613_dai_hw_params()
[all …]
Dpcm1792a.c82 struct snd_soc_codec *codec = codec_dai->codec; in pcm1792a_set_dai_fmt() local
83 struct pcm1792a_private *priv = snd_soc_codec_get_drvdata(codec); in pcm1792a_set_dai_fmt()
92 struct snd_soc_codec *codec = dai->codec; in pcm1792a_digital_mute() local
93 struct pcm1792a_private *priv = snd_soc_codec_get_drvdata(codec); in pcm1792a_digital_mute()
108 struct snd_soc_codec *codec = dai->codec; in pcm1792a_hw_params() local
109 struct pcm1792a_private *priv = snd_soc_codec_get_drvdata(codec); in pcm1792a_hw_params()
142 dev_err(codec->dev, "Invalid DAI format\n"); in pcm1792a_hw_params()
Dtwl6040.h37 int twl6040_get_dl1_gain(struct snd_soc_codec *codec);
38 void twl6040_hs_jack_detect(struct snd_soc_codec *codec,
40 int twl6040_get_clk_id(struct snd_soc_codec *codec);
41 int twl6040_get_trim_value(struct snd_soc_codec *codec, enum twl6040_trim trim);
42 int twl6040_get_hs_step_size(struct snd_soc_codec *codec);
Dcq93vc.c48 struct snd_soc_codec *codec = dai->codec; in cq93vc_mute() local
56 snd_soc_update_bits(codec, DAVINCI_VC_REG09, DAVINCI_VC_REG09_MUTE, in cq93vc_mute()
75 static int cq93vc_set_bias_level(struct snd_soc_codec *codec, in cq93vc_set_bias_level() argument
80 snd_soc_write(codec, DAVINCI_VC_REG12, in cq93vc_set_bias_level()
86 snd_soc_write(codec, DAVINCI_VC_REG12, in cq93vc_set_bias_level()
91 snd_soc_write(codec, DAVINCI_VC_REG12, in cq93vc_set_bias_level()
Dcs42xx8.c196 struct snd_soc_codec *codec = codec_dai->codec; in cs42xx8_set_dai_sysclk() local
197 struct cs42xx8_priv *cs42xx8 = snd_soc_codec_get_drvdata(codec); in cs42xx8_set_dai_sysclk()
207 struct snd_soc_codec *codec = codec_dai->codec; in cs42xx8_set_dai_fmt() local
208 struct cs42xx8_priv *cs42xx8 = snd_soc_codec_get_drvdata(codec); in cs42xx8_set_dai_fmt()
226 dev_err(codec->dev, "unsupported dai format\n"); in cs42xx8_set_dai_fmt()
243 dev_err(codec->dev, "unsupported master/slave mode\n"); in cs42xx8_set_dai_fmt()
254 struct snd_soc_codec *codec = dai->codec; in cs42xx8_hw_params() local
255 struct cs42xx8_priv *cs42xx8 = snd_soc_codec_get_drvdata(codec); in cs42xx8_hw_params()
266 dev_err(codec->dev, "unsupported sysclk ratio\n"); in cs42xx8_hw_params()
284 struct snd_soc_codec *codec = dai->codec; in cs42xx8_digital_mute() local
[all …]
Dmc13783.c110 struct snd_soc_codec *codec = dai->codec; in mc13783_pcm_hw_params_dac() local
116 snd_soc_update_bits(codec, MC13783_AUDIO_DAC, in mc13783_pcm_hw_params_dac()
129 struct snd_soc_codec *codec = dai->codec; in mc13783_pcm_hw_params_codec() local
144 snd_soc_update_bits(codec, MC13783_AUDIO_CODEC, AUDIO_CODEC_CDCFS8K16K, in mc13783_pcm_hw_params_codec()
163 struct snd_soc_codec *codec = dai->codec; in mc13783_set_fmt() local
211 snd_soc_update_bits(codec, reg, mask, val); in mc13783_set_fmt()
258 struct snd_soc_codec *codec = dai->codec; in mc13783_set_sysclk() local
278 snd_soc_update_bits(codec, reg, mask, val); in mc13783_set_sysclk()
311 struct snd_soc_codec *codec = dai->codec; in mc13783_set_tdm_slot_dac() local
347 snd_soc_update_bits(codec, MC13783_SSI_NETWORK, mask, val); in mc13783_set_tdm_slot_dac()
[all …]
Dsirf-audio-codec.c123 struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm); in atlas6_codec_enable_and_reset_event() local
124 struct sirf_audio_codec *sirf_audio_codec = snd_soc_codec_get_drvdata(codec); in atlas6_codec_enable_and_reset_event()
146 struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm); in prima2_codec_enable_and_reset_event() local
147 struct sirf_audio_codec *sirf_audio_codec = snd_soc_codec_get_drvdata(codec); in prima2_codec_enable_and_reset_event()
336 struct snd_soc_codec *codec = dai->codec; in sirf_audio_codec_trigger() local
337 struct sirf_audio_codec *sirf_audio_codec = snd_soc_codec_get_drvdata(codec); in sirf_audio_codec_trigger()
349 snd_soc_update_bits(codec, AUDIO_IC_CODEC_CTRL0, in sirf_audio_codec_trigger()
360 snd_soc_update_bits(codec, AUDIO_IC_CODEC_CTRL0, in sirf_audio_codec_trigger()
396 static int sirf_audio_codec_probe(struct snd_soc_codec *codec) in sirf_audio_codec_probe() argument
398 struct snd_soc_dapm_context *dapm = snd_soc_codec_get_dapm(codec); in sirf_audio_codec_probe()
[all …]
Dad1836.c167 struct ad1836_priv *ad1836 = snd_soc_codec_get_drvdata(dai->codec); in ad1836_hw_params()
231 static int ad1836_suspend(struct snd_soc_codec *codec) in ad1836_suspend() argument
233 struct ad1836_priv *ad1836 = snd_soc_codec_get_drvdata(codec); in ad1836_suspend()
239 static int ad1836_resume(struct snd_soc_codec *codec) in ad1836_resume() argument
241 struct ad1836_priv *ad1836 = snd_soc_codec_get_drvdata(codec); in ad1836_resume()
251 static int ad1836_probe(struct snd_soc_codec *codec) in ad1836_probe() argument
253 struct ad1836_priv *ad1836 = snd_soc_codec_get_drvdata(codec); in ad1836_probe()
254 struct snd_soc_dapm_context *dapm = snd_soc_codec_get_dapm(codec); in ad1836_probe()
280 ret = snd_soc_add_codec_controls(codec, ad1836_controls, in ad1836_probe()
288 ret = snd_soc_add_codec_controls(codec, ad183x_dac_controls, num_dacs * 2); in ad1836_probe()
[all …]
Dad193x.c133 struct ad193x_priv *ad193x = snd_soc_codec_get_drvdata(dai->codec); in ad193x_mute()
149 struct ad193x_priv *ad193x = snd_soc_codec_get_drvdata(dai->codec); in ad193x_set_tdm_slot()
182 struct ad193x_priv *ad193x = snd_soc_codec_get_drvdata(codec_dai->codec); in ad193x_set_dai_fmt()
260 struct snd_soc_codec *codec = codec_dai->codec; in ad193x_set_dai_sysclk() local
261 struct ad193x_priv *ad193x = snd_soc_codec_get_drvdata(codec); in ad193x_set_dai_sysclk()
278 struct snd_soc_codec *codec = dai->codec; in ad193x_hw_params() local
279 struct ad193x_priv *ad193x = snd_soc_codec_get_drvdata(codec); in ad193x_hw_params()
354 static int ad193x_codec_probe(struct snd_soc_codec *codec) in ad193x_codec_probe() argument
356 struct ad193x_priv *ad193x = snd_soc_codec_get_drvdata(codec); in ad193x_codec_probe()
357 struct snd_soc_dapm_context *dapm = snd_soc_codec_get_dapm(codec); in ad193x_codec_probe()
[all …]
Dcs4349.c77 struct snd_soc_codec *codec = codec_dai->codec; in cs4349_set_dai_fmt() local
78 struct cs4349_private *cs4349 = snd_soc_codec_get_drvdata(codec); in cs4349_set_dai_fmt()
100 struct snd_soc_codec *codec = dai->codec; in cs4349_pcm_hw_params() local
101 struct cs4349_private *cs4349 = snd_soc_codec_get_drvdata(codec); in cs4349_pcm_hw_params()
129 ret = snd_soc_update_bits(codec, CS4349_MODE, DIF_MASK, in cs4349_pcm_hw_params()
139 struct snd_soc_codec *codec = dai->codec; in cs4349_digital_mute() local
146 return snd_soc_update_bits(codec, CS4349_MUTE, MUTE_AB_MASK, reg); in cs4349_digital_mute()
Drt5677.c557 struct snd_soc_codec *codec = rt5677->codec; in rt5677_dsp_mode_i2c_write_addr() local
565 dev_err(codec->dev, "Failed to set addr msb value: %d\n", ret); in rt5677_dsp_mode_i2c_write_addr()
572 dev_err(codec->dev, "Failed to set addr lsb value: %d\n", ret); in rt5677_dsp_mode_i2c_write_addr()
579 dev_err(codec->dev, "Failed to set data msb value: %d\n", ret); in rt5677_dsp_mode_i2c_write_addr()
586 dev_err(codec->dev, "Failed to set data lsb value: %d\n", ret); in rt5677_dsp_mode_i2c_write_addr()
593 dev_err(codec->dev, "Failed to set op code value: %d\n", ret); in rt5677_dsp_mode_i2c_write_addr()
615 struct snd_soc_codec *codec = rt5677->codec; in rt5677_dsp_mode_i2c_read_addr() local
624 dev_err(codec->dev, "Failed to set addr msb value: %d\n", ret); in rt5677_dsp_mode_i2c_read_addr()
631 dev_err(codec->dev, "Failed to set addr lsb value: %d\n", ret); in rt5677_dsp_mode_i2c_read_addr()
638 dev_err(codec->dev, "Failed to set op code value: %d\n", ret); in rt5677_dsp_mode_i2c_read_addr()
[all …]
/linux-4.4.14/include/sound/
Dhda_regmap.h14 int snd_hdac_regmap_init(struct hdac_device *codec);
15 void snd_hdac_regmap_exit(struct hdac_device *codec);
16 int snd_hdac_regmap_add_vendor_verb(struct hdac_device *codec,
18 int snd_hdac_regmap_read_raw(struct hdac_device *codec, unsigned int reg,
20 int snd_hdac_regmap_write_raw(struct hdac_device *codec, unsigned int reg,
22 int snd_hdac_regmap_update_raw(struct hdac_device *codec, unsigned int reg,
73 snd_hdac_regmap_write(struct hdac_device *codec, hda_nid_t nid, in snd_hdac_regmap_write() argument
78 return snd_hdac_regmap_write_raw(codec, cmd, val); in snd_hdac_regmap_write()
91 snd_hdac_regmap_update(struct hdac_device *codec, hda_nid_t nid, in snd_hdac_regmap_update() argument
97 return snd_hdac_regmap_update_raw(codec, cmd, mask, val); in snd_hdac_regmap_update()
[all …]
Dhdaudio.h109 int snd_hdac_device_register(struct hdac_device *codec);
110 void snd_hdac_device_unregister(struct hdac_device *codec);
111 int snd_hdac_device_set_chip_name(struct hdac_device *codec, const char *name);
114 int snd_hdac_refresh_widgets(struct hdac_device *codec);
115 int snd_hdac_refresh_widget_sysfs(struct hdac_device *codec);
117 unsigned int snd_hdac_make_cmd(struct hdac_device *codec, hda_nid_t nid,
119 int snd_hdac_exec_verb(struct hdac_device *codec, unsigned int cmd,
121 int snd_hdac_read(struct hdac_device *codec, hda_nid_t nid,
123 int _snd_hdac_read_parm(struct hdac_device *codec, hda_nid_t nid, int parm,
125 int snd_hdac_read_parm_uncached(struct hdac_device *codec, hda_nid_t nid,
[all …]
/linux-4.4.14/sound/aoa/core/
Dcore.c58 int aoa_codec_register(struct aoa_codec *codec) in aoa_codec_register() argument
66 err = attach_codec_to_fabric(codec); in aoa_codec_register()
68 list_add(&codec->list, &codec_list); in aoa_codec_register()
73 void aoa_codec_unregister(struct aoa_codec *codec) in aoa_codec_unregister() argument
75 list_del(&codec->list); in aoa_codec_unregister()
76 if (codec->fabric && codec->exit) in aoa_codec_unregister()
77 codec->exit(codec); in aoa_codec_unregister()
79 fabric->remove_codec(codec); in aoa_codec_unregister()
80 codec->fabric = NULL; in aoa_codec_unregister()
81 module_put(codec->owner); in aoa_codec_unregister()
[all …]
/linux-4.4.14/sound/aoa/codecs/
Dtoonie.c26 struct aoa_codec codec; member
28 #define codec_to_toonie(c) container_of(c, struct toonie, codec)
87 static int toonie_init_codec(struct aoa_codec *codec) in toonie_init_codec() argument
89 struct toonie *toonie = codec_to_toonie(codec); in toonie_init_codec()
92 if (toonie->codec.connected != 1) in toonie_init_codec()
100 if (toonie->codec.soundbus_dev->attach_codec(toonie->codec.soundbus_dev, in toonie_init_codec()
111 static void toonie_exit_codec(struct aoa_codec *codec) in toonie_exit_codec() argument
113 struct toonie *toonie = codec_to_toonie(codec); in toonie_exit_codec()
115 if (!toonie->codec.soundbus_dev) { in toonie_exit_codec()
119 toonie->codec.soundbus_dev->detach_codec(toonie->codec.soundbus_dev, toonie); in toonie_exit_codec()
[all …]
Donyx.c52 struct aoa_codec codec; member
65 #define codec_to_onyx(c) container_of(c, struct onyx, codec)
779 onyx->codec.gpio->methods->all_amps_off(onyx->codec.gpio); in onyx_switch_clock()
782 onyx->codec.gpio->methods->all_amps_restore(onyx->codec.gpio); in onyx_switch_clock()
821 onyx->codec.gpio->methods->set_hw_reset(onyx->codec.gpio, 0); in onyx_resume()
823 onyx->codec.gpio->methods->set_hw_reset(onyx->codec.gpio, 1); in onyx_resume()
825 onyx->codec.gpio->methods->set_hw_reset(onyx->codec.gpio, 0); in onyx_resume()
861 static int onyx_init_codec(struct aoa_codec *codec) in onyx_init_codec() argument
863 struct onyx *onyx = codec_to_onyx(codec); in onyx_init_codec()
869 if (!onyx->codec.gpio || !onyx->codec.gpio->methods) { in onyx_init_codec()
[all …]
DMakefile1 snd-aoa-codec-onyx-objs := onyx.o
2 snd-aoa-codec-tas-objs := tas.o
3 snd-aoa-codec-toonie-objs := toonie.o
5 obj-$(CONFIG_SND_AOA_ONYX) += snd-aoa-codec-onyx.o
6 obj-$(CONFIG_SND_AOA_TAS) += snd-aoa-codec-tas.o
7 obj-$(CONFIG_SND_AOA_TOONIE) += snd-aoa-codec-toonie.o
Dtas.c85 struct aoa_codec codec; member
104 static struct tas *codec_to_tas(struct aoa_codec *codec) in codec_to_tas() argument
106 return container_of(codec, struct tas, codec); in codec_to_tas()
676 tas->codec.gpio->methods->all_amps_off(tas->codec.gpio); in tas_reset_init()
678 tas->codec.gpio->methods->set_hw_reset(tas->codec.gpio, 0); in tas_reset_init()
680 tas->codec.gpio->methods->set_hw_reset(tas->codec.gpio, 1); in tas_reset_init()
682 tas->codec.gpio->methods->set_hw_reset(tas->codec.gpio, 0); in tas_reset_init()
684 tas->codec.gpio->methods->all_amps_restore(tas->codec.gpio); in tas_reset_init()
722 tas->codec.gpio->methods->all_amps_off(tas->codec.gpio); in tas_switch_clock()
732 tas->codec.gpio->methods->all_amps_restore(tas->codec.gpio); in tas_switch_clock()
[all …]
/linux-4.4.14/sound/soc/
Dsoc-cache.c18 int snd_soc_cache_init(struct snd_soc_codec *codec) in snd_soc_cache_init() argument
20 const struct snd_soc_codec_driver *codec_drv = codec->driver; in snd_soc_cache_init()
28 dev_dbg(codec->dev, "ASoC: Initializing cache for %s codec\n", in snd_soc_cache_init()
29 codec->component.name); in snd_soc_cache_init()
32 codec->reg_cache = kmemdup(codec_drv->reg_cache_default, in snd_soc_cache_init()
35 codec->reg_cache = kzalloc(reg_size, GFP_KERNEL); in snd_soc_cache_init()
36 if (!codec->reg_cache) in snd_soc_cache_init()
46 int snd_soc_cache_exit(struct snd_soc_codec *codec) in snd_soc_cache_exit() argument
48 dev_dbg(codec->dev, "ASoC: Destroying cache for %s codec\n", in snd_soc_cache_exit()
49 codec->component.name); in snd_soc_cache_exit()
[all …]
Dsoc-core.c90 static int format_register_str(struct snd_soc_codec *codec, in format_register_str() argument
93 int wordsize = min_bytes_needed(codec->driver->reg_cache_size) * 2; in format_register_str()
94 int regsize = codec->driver->reg_word_size * 2; in format_register_str()
104 ret = snd_soc_read(codec, reg); in format_register_str()
115 static ssize_t soc_codec_reg_show(struct snd_soc_codec *codec, char *buf, in soc_codec_reg_show() argument
124 wordsize = min_bytes_needed(codec->driver->reg_cache_size) * 2; in soc_codec_reg_show()
125 regsize = codec->driver->reg_word_size * 2; in soc_codec_reg_show()
129 if (!codec->driver->reg_cache_size) in soc_codec_reg_show()
132 if (codec->driver->reg_cache_step) in soc_codec_reg_show()
133 step = codec->driver->reg_cache_step; in soc_codec_reg_show()
[all …]
Dsoc-io.c196 unsigned int snd_soc_read(struct snd_soc_codec *codec, unsigned int reg) in snd_soc_read() argument
201 ret = snd_soc_component_read(&codec->component, reg, &val); in snd_soc_read()
209 int snd_soc_write(struct snd_soc_codec *codec, unsigned int reg, in snd_soc_write() argument
212 return snd_soc_component_write(&codec->component, reg, val); in snd_soc_write()
227 int snd_soc_update_bits(struct snd_soc_codec *codec, unsigned int reg, in snd_soc_update_bits() argument
230 return snd_soc_component_update_bits(&codec->component, reg, mask, in snd_soc_update_bits()
247 int snd_soc_test_bits(struct snd_soc_codec *codec, unsigned int reg, in snd_soc_test_bits() argument
250 return snd_soc_component_test_bits(&codec->component, reg, mask, value); in snd_soc_test_bits()
/linux-4.4.14/drivers/media/usb/usbvision/
Dusbvision-cards.c37 .codec = CODEC_SAA7113,
51 .codec = CODEC_SAA7113,
67 .codec = CODEC_SAA7111,
81 .codec = CODEC_SAA7113,
97 .codec = CODEC_SAA7111,
113 .codec = CODEC_SAA7111,
127 .codec = CODEC_SAA7113,
143 .codec = CODEC_SAA7111,
157 .codec = CODEC_SAA7111,
173 .codec = CODEC_SAA7113,
[all …]
/linux-4.4.14/sound/soc/pxa/
Dmioa701_wm9713.c62 static int rear_amp_power(struct snd_soc_codec *codec, int power) in rear_amp_power() argument
67 reg = snd_soc_read(codec, AC97_GPIO_CFG); in rear_amp_power()
68 snd_soc_write(codec, AC97_GPIO_CFG, reg | 0x0100); in rear_amp_power()
69 reg = snd_soc_read(codec, AC97_GPIO_PULL); in rear_amp_power()
70 snd_soc_write(codec, AC97_GPIO_PULL, reg | (1<<15)); in rear_amp_power()
72 reg = snd_soc_read(codec, AC97_GPIO_CFG); in rear_amp_power()
73 snd_soc_write(codec, AC97_GPIO_CFG, reg & ~0x0100); in rear_amp_power()
74 reg = snd_soc_read(codec, AC97_GPIO_PULL); in rear_amp_power()
75 snd_soc_write(codec, AC97_GPIO_PULL, reg & ~(1<<15)); in rear_amp_power()
84 struct snd_soc_codec *codec = widget->dapm->card->rtd[0].codec; in rear_amp_event() local
[all …]
/linux-4.4.14/sound/aoa/
Daoa.h28 int (*init)(struct aoa_codec *codec);
32 void (*exit)(struct aoa_codec *codec);
62 aoa_codec_register(struct aoa_codec *codec);
64 aoa_codec_unregister(struct aoa_codec *codec);
77 int (*found_codec)(struct aoa_codec *codec);
84 void (*remove_codec)(struct aoa_codec *codec);
87 void (*attached_codec)(struct aoa_codec *codec);
112 aoa_fabric_unlink_codec(struct aoa_codec *codec);
/linux-4.4.14/Documentation/sound/alsa/soc/
Dcodec.txt4 The codec class driver is generic and hardware independent code that configures
5 the codec, FM, MODEM, BT or external DSP to provide audio capture and playback.
10 Each codec class driver *must* provide the following features:-
19 Optionally, codec drivers can also provide:-
23 Its probably best to use this guide in conjunction with the existing codec
31 Each codec driver must have a struct snd_soc_dai_driver to define its DAI and
67 The codec can usually be controlled via an I2C or SPI style interface
68 (AC97 combines control with data in the DAI). The codec driver should use the
69 Regmap API for all codec IO. Please see include/linux/regmap.h and existing
70 codec drivers for example regmap usage.
[all …]
Doverview.txt20 * Drivers tended to power up the entire codec when playing (or
23 power via changing codec oversampling rates, bias currents, etc.
32 * Codec independence. Allows reuse of codec drivers on other platforms
35 * Easy I2S/PCM audio interface setup between codec and SoC. Each SoC
36 interface and codec registers its audio interface capabilities with the
40 * Dynamic Audio Power Management (DAPM). DAPM automatically sets the codec to
42 internal power blocks depending on the internal codec audio routing and any
46 codec up/down in the correct sequence (including using digital mute). ASoC
47 signals the codec when to change power states.
55 * Codec class drivers: The codec class driver is platform independent and
[all …]
/linux-4.4.14/sound/pci/
Dazt3328.c352 snd_azf3328_codec_outb(const struct snd_azf3328_codec_data *codec, in snd_azf3328_codec_outb() argument
357 outb(value, codec->io_base + reg); in snd_azf3328_codec_outb()
361 snd_azf3328_codec_inb(const struct snd_azf3328_codec_data *codec, unsigned reg) in snd_azf3328_codec_inb() argument
363 return inb(codec->io_base + reg); in snd_azf3328_codec_inb()
367 snd_azf3328_codec_outw(const struct snd_azf3328_codec_data *codec, in snd_azf3328_codec_outw() argument
372 outw(value, codec->io_base + reg); in snd_azf3328_codec_outw()
376 snd_azf3328_codec_inw(const struct snd_azf3328_codec_data *codec, unsigned reg) in snd_azf3328_codec_inw() argument
378 return inw(codec->io_base + reg); in snd_azf3328_codec_inw()
382 snd_azf3328_codec_outl(const struct snd_azf3328_codec_data *codec, in snd_azf3328_codec_outl() argument
387 outl(value, codec->io_base + reg); in snd_azf3328_codec_outl()
[all …]
/linux-4.4.14/sound/soc/intel/boards/
Dbroadwell.c81 struct snd_soc_codec *codec = rtd->codec; in broadwell_rt286_codec_init() local
89 rt286_mic_detect(codec, &broadwell_headset); in broadwell_rt286_codec_init()
223 struct snd_soc_codec *codec; in broadwell_suspend() local
225 list_for_each_entry(codec, &card->codec_dev_list, card_list) { in broadwell_suspend()
226 if (!strcmp(codec->component.name, "i2c-INT343A:00")) { in broadwell_suspend()
227 dev_dbg(codec->dev, "disabling jack detect before going to suspend.\n"); in broadwell_suspend()
228 rt286_mic_detect(codec, NULL); in broadwell_suspend()
236 struct snd_soc_codec *codec; in broadwell_resume() local
238 list_for_each_entry(codec, &card->codec_dev_list, card_list) { in broadwell_resume()
239 if (!strcmp(codec->component.name, "i2c-INT343A:00")) { in broadwell_resume()
[all …]
Dcht_bsw_rt5672.c174 struct snd_soc_codec *codec = codec_dai->codec; in cht_codec_init() local
188 rt5670_sel_asrc_clk_src(codec, in cht_codec_init()
204 rt5670_set_jack_detect(codec, &cht_bsw_headset); in cht_codec_init()
286 struct snd_soc_codec *codec; in cht_suspend_pre() local
288 list_for_each_entry(codec, &card->codec_dev_list, card_list) { in cht_suspend_pre()
289 if (!strcmp(codec->component.name, "i2c-10EC5670:00")) { in cht_suspend_pre()
290 dev_dbg(codec->dev, "disabling jack detect before going to suspend.\n"); in cht_suspend_pre()
291 rt5670_jack_suspend(codec); in cht_suspend_pre()
300 struct snd_soc_codec *codec; in cht_resume_post() local
302 list_for_each_entry(codec, &card->codec_dev_list, card_list) { in cht_resume_post()
[all …]
/linux-4.4.14/Documentation/devicetree/bindings/sound/
Dsun4i-codec.txt4 - compatible: must be either "allwinner,sun4i-a10-codec" or
5 "allwinner,sun7i-a20-codec"
7 - interrupts: must contain the codec interrupt
15 - "codec": the parent module clock
18 codec: codec@01c22c00 {
20 compatible = "allwinner,sun7i-a20-codec";
24 clock-names = "apb", "codec";
Dux500-mop500.txt10 - stericsson,audio-codec : Phandle to the Audio CODEC
19 stericsson,audio-codec = <&codec>;
36 codec: ab8500-codec {
37 compatible = "stericsson,ab8500-codec";
Ddavinci-evm-audio.txt6 - ti,audio-codec : The phandle of the TLV320AIC3x audio codec
11 sinks are the codec's pins, and the jacks on the board:
14 - ti,codec-clock-rate : The Codec Clock rate (in Hz) applied to the Codec.
17 - Either codec-clock-rate or the codec-clock reference has to be defined. If
34 ti,audio-codec = <&tlv320aic3x>;
36 ti,codec-clock-rate = <12000000>;
Dst,sti-asoc-card.txt4 codec or external codecs.
46 - IP mode: IP working mode depending on associated codec.
47 "HDMI" connected to HDMI codec IP and IEC HDMI formats.
48 "SPDIF"connected to SPDIF codec and support SPDIF formats.
104 2) sti-sas-codec: internal audio codec IPs driver
108 - compatible: "st,sti<chip>-sas-codec" .
109 Should be chip "st,stih416-sas-codec" or "st,stih407-sas-codec"
118 sti_sas_codec: sti-sas-codec {
119 compatible = "st,stih407-sas-codec";
140 codec {
[all …]
Drockchip-max98090.txt8 - rockchip,audio-codec: The phandle of the MAX98090 audio codec
9 - rockchip,headset-codec: The phandle of Ext chip for jack detection
17 rockchip,audio-codec = <&max98090>;
18 rockchip,headset-codec = <&headsetcodec>;
Dsirf-audio-codec.txt5 - compatible : "sirf,atlas6-audio-codec" or "sirf,prima2-audio-codec"
9 - clocks: the clock of SiRF internal audio codec
14 compatible = "sirf,atlas6-audio-codec";
Dsimple-card.txt3 Simple-Card specifies audio DAI connections of SoC <-> codec.
18 - simple-audio-card,mclk-fs : Multiplication factor between stream rate and codec
44 - codec : CODEC sub-node
52 phandle to a cpu or codec subnode.
54 phandle to a cpu or codec subnode.
60 rate and codec mclk, applied only for
64 properties can be used as booleans in codec subnode to indicate if the
65 codec is the dai-link frame or bit clock master. In this case there
68 properties should also be placed in the codec node if needed.
109 dailink0_master: simple-audio-card,codec {
[all …]
/linux-4.4.14/sound/soc/samsung/
Dbells.c62 struct snd_soc_codec *codec = codec_dai->codec; in bells_set_bias_level() local
74 ret = snd_soc_codec_set_pll(codec, WM5102_FLL1, in bells_set_bias_level()
82 ret = snd_soc_codec_set_pll(codec, WM5102_FLL2, in bells_set_bias_level()
103 struct snd_soc_codec *codec = codec_dai->codec; in bells_set_bias_level_post() local
112 ret = snd_soc_codec_set_pll(codec, WM5102_FLL1, 0, 0, 0); in bells_set_bias_level_post()
119 ret = snd_soc_codec_set_pll(codec, WM5102_FLL2, in bells_set_bias_level_post()
140 struct snd_soc_codec *wm0010 = card->rtd[DAI_AP_DSP].codec; in bells_late_probe()
141 struct snd_soc_codec *codec = card->rtd[DAI_DSP_CODEC].codec; in bells_late_probe() local
148 ret = snd_soc_codec_set_sysclk(codec, ARIZONA_CLK_SYSCLK, in bells_late_probe()
153 dev_err(codec->dev, "Failed to set SYSCLK: %d\n", ret); in bells_late_probe()
[all …]
Dlowland.c40 struct snd_soc_codec *codec = rtd->codec; in lowland_wm5100_init() local
43 ret = snd_soc_codec_set_sysclk(codec, WM5100_CLK_SYSCLK, in lowland_wm5100_init()
52 ret = snd_soc_codec_set_sysclk(codec, WM5100_CLK_OPCLK, 0, in lowland_wm5100_init()
66 wm5100_detect(codec, &lowland_headset); in lowland_wm5100_init()
73 struct snd_soc_codec *codec = rtd->codec; in lowland_wm9081_init() local
78 return snd_soc_codec_set_sysclk(codec, WM9081_SYSCLK_MCLK, 0, in lowland_wm9081_init()
/linux-4.4.14/Documentation/sound/alsa/
DHD-Audio.txt17 the codec chips on the HD-audio bus. Linux provides a single driver
27 codec and optionally one modem codec. In theory, there might be
32 The snd-hda-intel driver has several different codec parsers depending
33 on the codec. It has a generic parser as a fallback, but this
35 parser, usually the codec-specific parser (coded in patch_*.c) is used
36 for the codec-specific implementations. The details about the
37 codec-specific problems are explained in the later sections.
88 A less often but a more severe problem is the codec probing. When
89 BIOS reports the available codec slots wrongly, the driver gets
90 confused and tries to access the non-existing codec slot. This often
[all …]
/linux-4.4.14/sound/aoa/fabrics/
Dlayout.c762 static int check_codec(struct aoa_codec *codec, in check_codec() argument
771 if (codec->node && (strcmp(codec->node->name, "codec") == 0)) { in check_codec()
773 "platform-%s-codec-ref", codec->name); in check_codec()
780 if (*ref != codec->node->phandle) { in check_codec()
792 codec->soundbus_dev = ldev->sdev; in check_codec()
793 codec->gpio = &ldev->gpio; in check_codec()
801 codec->connected = 0; in check_codec()
802 codec->fabric_data = cc; in check_codec()
805 codec->connected |= 1<<cc->codec_bit; in check_codec()
812 static int layout_found_codec(struct aoa_codec *codec) in layout_found_codec() argument
[all …]
/linux-4.4.14/sound/soc/intel/atom/
Dsst-mfld-platform-compress.c123 switch (params->codec.id) { in sst_platform_compr_set_params()
125 str_params.codec = SST_CODEC_TYPE_MP3; in sst_platform_compr_set_params()
126 str_params.sparams.uc.mp3_params.num_chan = params->codec.ch_in; in sst_platform_compr_set_params()
132 str_params.codec = SST_CODEC_TYPE_AAC; in sst_platform_compr_set_params()
133 str_params.sparams.uc.aac_params.num_chan = params->codec.ch_in; in sst_platform_compr_set_params()
135 if (params->codec.format == SND_AUDIOSTREAMFORMAT_MP4ADTS) in sst_platform_compr_set_params()
138 else if (params->codec.format == SND_AUDIOSTREAMFORMAT_RAW) in sst_platform_compr_set_params()
142 pr_err("Undefined format%d\n", params->codec.format); in sst_platform_compr_set_params()
146 params->codec.sample_rate; in sst_platform_compr_set_params()
151 pr_err("codec not supported, id =%d\n", params->codec.id); in sst_platform_compr_set_params()
[all …]
/linux-4.4.14/sound/pci/ac97/
Dac97_pcm.c426 rates &= pcm->r[dbl].codec[cidx]->rates[idx]; in get_rates()
458 struct snd_ac97 *codec; in snd_ac97_pcm_assign() local
467 codec = bus->codec[i]; in snd_ac97_pcm_assign()
468 if (!codec) in snd_ac97_pcm_assign()
470 avail_slots[0][i] = get_pslots(codec, &rate_table[0][i], &spdif_slots[i]); in snd_ac97_pcm_assign()
471 avail_slots[1][i] = get_cslots(codec); in snd_ac97_pcm_assign()
472 if (!(codec->scaps & AC97_SCAP_INDEP_SDIN)) { in snd_ac97_pcm_assign()
474 if (bus->codec[j]) in snd_ac97_pcm_assign()
496 if (!bus->codec[j]) in snd_ac97_pcm_assign()
516 rpcm->r[0].codec[j] = bus->codec[j]; in snd_ac97_pcm_assign()
[all …]
/linux-4.4.14/sound/soc/tegra/
Dtegra_wm9712.c37 struct platform_device *codec; member
89 machine->codec = platform_device_alloc("wm9712-codec", -1); in tegra_wm9712_driver_probe()
90 if (!machine->codec) { in tegra_wm9712_driver_probe()
95 ret = platform_device_add(machine->codec); in tegra_wm9712_driver_probe()
138 platform_device_del(machine->codec); in tegra_wm9712_driver_probe()
140 platform_device_put(machine->codec); in tegra_wm9712_driver_probe()
153 platform_device_unregister(machine->codec); in tegra_wm9712_driver_remove()
/linux-4.4.14/sound/soc/atmel/
Datmel-classd.c247 static int atmel_classd_codec_probe(struct snd_soc_codec *codec) in atmel_classd_codec_probe() argument
249 struct snd_soc_card *card = snd_soc_codec_get_drvdata(codec); in atmel_classd_codec_probe()
283 dev_warn(codec->dev, in atmel_classd_codec_probe()
290 snd_soc_update_bits(codec, CLASSD_MR, mask, val); in atmel_classd_codec_probe()
292 dev_info(codec->dev, in atmel_classd_codec_probe()
330 struct snd_soc_codec *codec = codec_dai->codec; in atmel_classd_codec_dai_digital_mute() local
340 snd_soc_update_bits(codec, CLASSD_MR, mask, val); in atmel_classd_codec_dai_digital_mute()
379 struct snd_soc_codec *codec = codec_dai->codec; in atmel_classd_codec_dai_hw_params() local
397 dev_dbg(codec->dev, in atmel_classd_codec_dai_hw_params()
412 snd_soc_update_bits(codec, CLASSD_INTPMR, mask, val); in atmel_classd_codec_dai_hw_params()
[all …]

1234