Home
last modified time | relevance | path

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

1234

/linux-4.1.27/sound/hda/
Dhdac_device.c15 static void setup_fg_nodes(struct hdac_device *codec);
16 static int get_codec_vendor_name(struct hdac_device *codec);
37 int snd_hdac_device_init(struct hdac_device *codec, struct hdac_bus *bus, in snd_hdac_device_init() argument
44 dev = &codec->dev; in snd_hdac_device_init()
53 codec->bus = bus; in snd_hdac_device_init()
54 codec->addr = addr; in snd_hdac_device_init()
55 codec->type = HDA_DEV_CORE; in snd_hdac_device_init()
56 pm_runtime_set_active(&codec->dev); in snd_hdac_device_init()
57 pm_runtime_get_noresume(&codec->dev); in snd_hdac_device_init()
58 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 : ""); \
80 ssize_t (*show)(struct hdac_device *codec, hda_nid_t nid,
82 ssize_t (*store)(struct hdac_device *codec, hda_nid_t nid,
105 struct hdac_device *codec; in widget_attr_show() local
110 nid = get_codec_nid(kobj, &codec); in widget_attr_show()
113 return wid_attr->show(codec, nid, wid_attr, buf); in widget_attr_show()
121 struct hdac_device *codec; in widget_attr_store() local
[all …]
Dhdac_bus.c138 struct hdac_device *codec; in process_unsol_events() local
150 codec = bus->caddr_tbl[caddr & 0x0f]; in process_unsol_events()
151 if (!codec || !codec->dev.driver) in process_unsol_events()
153 drv = drv_to_hdac_driver(codec->dev.driver); in process_unsol_events()
155 drv->unsol_event(codec, res); in process_unsol_events()
159 int snd_hdac_bus_add_device(struct hdac_bus *bus, struct hdac_device *codec) in snd_hdac_bus_add_device() argument
161 if (bus->caddr_tbl[codec->addr]) { in snd_hdac_bus_add_device()
163 codec->addr); in snd_hdac_bus_add_device()
167 list_add_tail(&codec->list, &bus->codec_list); in snd_hdac_bus_add_device()
168 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.1.27/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()
32 if (preset->afg && preset->afg != codec->core.afg) in hda_codec_match()
34 if (preset->mfg && preset->mfg != codec->core.mfg) in hda_codec_match()
39 (!preset->rev || preset->rev == codec->core.revision_id)) { in hda_codec_match()
40 codec->preset = preset; in hda_codec_match()
50 struct hda_codec *codec = container_of(dev, struct hda_codec, core); in hda_codec_unsol_event() local
52 if (codec->patch_ops.unsol_event) in hda_codec_unsol_event()
53 codec->patch_ops.unsol_event(codec, ev); in hda_codec_unsol_event()
57 static int codec_refresh_name(struct hda_codec *codec, const char *name) in codec_refresh_name() argument
[all …]
Dpatch_via.c114 static enum VIA_HDA_CODEC get_codec_type(struct hda_codec *codec);
116 struct hda_codec *codec,
120 static struct via_spec *via_new_spec(struct hda_codec *codec) in via_new_spec() argument
128 codec->spec = spec; in via_new_spec()
130 spec->codec_type = get_codec_type(codec); in via_new_spec()
138 codec->power_save_node = 1; in via_new_spec()
143 static enum VIA_HDA_CODEC get_codec_type(struct hda_codec *codec) in get_codec_type() argument
145 u32 vendor_id = codec->core.vendor_id; in get_codec_type()
161 if (snd_hda_param_read(codec, 0x16, AC_PAR_CONNLIST_LEN) == 0x7) in get_codec_type()
195 static void analog_low_current_mode(struct hda_codec *codec);
[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)
132 struct hda_codec *codec = container_of(dev, struct hda_codec, core); in codec_exec_verb() local
[all …]
Dpatch_ca0132.c749 struct hda_codec *codec; member
760 static unsigned int codec_send_command(struct hda_codec *codec, hda_nid_t nid, in codec_send_command() argument
764 response = snd_hda_codec_read(codec, nid, 0, verb, parm); in codec_send_command()
770 static int codec_set_converter_format(struct hda_codec *codec, hda_nid_t nid, in codec_set_converter_format() argument
773 return codec_send_command(codec, nid, VENDOR_CHIPIO_STREAM_FORMAT, in codec_set_converter_format()
777 static int codec_set_converter_stream_channel(struct hda_codec *codec, in codec_set_converter_stream_channel() argument
784 return codec_send_command(codec, nid, AC_VERB_SET_CHANNEL_STREAMID, in codec_set_converter_stream_channel()
789 static int chipio_send(struct hda_codec *codec, in chipio_send() argument
798 res = snd_hda_codec_read(codec, WIDGET_CHIP_CTRL, 0, in chipio_send()
811 static int chipio_write_address(struct hda_codec *codec, in chipio_write_address() argument
[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.c109 void (*init_hook)(struct hda_codec *codec);
111 void (*power_hook)(struct hda_codec *codec);
113 void (*shutup)(struct hda_codec *codec);
114 void (*reboot_notify)(struct hda_codec *codec);
132 static int alc_read_coefex_idx(struct hda_codec *codec, hda_nid_t nid, in alc_read_coefex_idx() argument
137 snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_COEF_INDEX, coef_idx); in alc_read_coefex_idx()
138 val = snd_hda_codec_read(codec, nid, 0, AC_VERB_GET_PROC_COEF, 0); in alc_read_coefex_idx()
142 #define alc_read_coef_idx(codec, coef_idx) \ argument
143 alc_read_coefex_idx(codec, 0x20, coef_idx)
145 static void alc_write_coefex_idx(struct hda_codec *codec, hda_nid_t nid, in alc_write_coefex_idx() 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_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 …]
Dhda_codec.h52 int (*attach_pcm)(struct hda_bus *bus, struct hda_codec *codec,
117 int (*patch)(struct hda_codec *codec);
139 int (*build_controls)(struct hda_codec *codec);
140 int (*build_pcms)(struct hda_codec *codec);
141 int (*init)(struct hda_codec *codec);
142 void (*free)(struct hda_codec *codec);
143 void (*unsol_event)(struct hda_codec *codec, unsigned int res);
144 void (*set_power_state)(struct hda_codec *codec, hda_nid_t fg,
147 int (*suspend)(struct hda_codec *codec);
148 int (*resume)(struct hda_codec *codec);
[all …]
Dpatch_hdmi.c48 #define is_haswell(codec) ((codec)->core.vendor_id == 0x80862807) argument
49 #define is_broadwell(codec) ((codec)->core.vendor_id == 0x80862808) argument
50 #define is_skylake(codec) ((codec)->core.vendor_id == 0x80862809) argument
51 #define is_broxton(codec) ((codec)->core.vendor_id == 0x8086280a) argument
52 #define is_haswell_plus(codec) (is_haswell(codec) || is_broadwell(codec) \ argument
53 || is_skylake(codec) || is_broxton(codec))
55 #define is_valleyview(codec) ((codec)->core.vendor_id == 0x80862882) argument
56 #define is_cherryview(codec) ((codec)->core.vendor_id == 0x80862883) argument
57 #define is_valleyview_plus(codec) (is_valleyview(codec) || is_cherryview(codec)) argument
79 struct hda_codec *codec; member
[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_proc.c36 #define param_read(codec, nid, parm) \ argument
37 snd_hdac_read_parm_uncached(&(codec)->core, nid, parm)
77 struct hda_codec *codec, hda_nid_t nid, in print_nid_array() argument
104 struct hda_codec *codec, hda_nid_t nid) in print_nid_pcms() argument
109 list_for_each_entry(cpcm, &codec->pcm_list_head, list) { in print_nid_pcms()
123 struct hda_codec *codec, hda_nid_t nid, int dir) in print_amp_caps() argument
126 caps = param_read(codec, nid, dir == HDA_OUTPUT ? in print_amp_caps()
141 static bool is_stereo_amps(struct hda_codec *codec, hda_nid_t nid, in is_stereo_amps() argument
155 if (snd_hda_get_raw_connections(codec, nid, &conn, 1) < 0) in is_stereo_amps()
158 wcaps = snd_hda_param_read(codec, conn, AC_PAR_AUDIO_WIDGET_CAP); in is_stereo_amps()
[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_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_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_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 …]
DMakefile7 snd-hda-codec-y := hda_bind.o hda_codec.o hda_jack.o hda_auto_parser.o hda_sysfs.o
8 snd-hda-codec-$(CONFIG_PROC_FS) += hda_proc.o
9 snd-hda-codec-$(CONFIG_SND_HDA_HWDEP) += hda_hwdep.o
10 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
20 snd-hda-codec-si3054-objs := patch_si3054.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.h50 snd_hda_jack_tbl_get(struct hda_codec *codec, hda_nid_t nid);
52 snd_hda_jack_tbl_get_from_tag(struct hda_codec *codec, unsigned char tag);
54 void snd_hda_jack_tbl_clear(struct hda_codec *codec);
56 void snd_hda_jack_set_dirty_all(struct hda_codec *codec);
58 int snd_hda_jack_detect_enable(struct hda_codec *codec, hda_nid_t nid);
60 snd_hda_jack_detect_enable_callback(struct hda_codec *codec, hda_nid_t nid,
63 int snd_hda_jack_set_gating_jack(struct hda_codec *codec, hda_nid_t gated_nid,
66 u32 snd_hda_pin_sense(struct hda_codec *codec, hda_nid_t nid);
73 int snd_hda_jack_detect_state(struct hda_codec *codec, hda_nid_t nid);
80 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()
63 err = snd_hda_parse_pin_defcfg(codec, cfg, NULL, 0); in patch_cmi9880()
66 err = snd_hda_gen_parse_auto_config(codec, cfg); in patch_cmi9880()
70 codec->patch_ops = cmi_auto_patch_ops; 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()
97 err = snd_hda_parse_pin_defcfg(codec, cfg, NULL, 0); in patch_cmi8888()
100 err = snd_hda_gen_parse_auto_config(codec, cfg); 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()
68 codec->bus->needs_damn_long_delay = 1; in patch_ca0110()
70 err = ca0110_parse_auto_config(codec); in patch_ca0110()
74 codec->patch_ops = ca0110_patch_ops; in patch_ca0110()
79 snd_hda_gen_free(codec); in patch_ca0110()
DKconfig19 to choose the appropriate codec options below.
66 bool "Allow dynamic codec reconfiguration"
68 Say Y here to enable the HD-audio codec re-configuration feature.
70 codec configuration, change the codec setup, add extra verbs,
71 and re-configure the codec dynamically.
109 tristate "Build Realtek HD-audio codec support"
113 Say Y or M here to include Realtek HD-audio codec support in
116 comment "Set to Y if you want auto-loading the codec driver"
120 tristate "Build Analog Device HD-audio codec support"
123 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.1.27/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.1.27/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.1.27/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 …]
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.c517 static void m98095_eq_band(struct snd_soc_codec *codec, unsigned int dai, in m98095_eq_band() argument
535 snd_soc_write(codec, eq_reg++, M98095_BYTE1(coefs[i])); in m98095_eq_band()
536 snd_soc_write(codec, eq_reg++, M98095_BYTE0(coefs[i])); in m98095_eq_band()
543 static void m98095_biquad_band(struct snd_soc_codec *codec, unsigned int dai, in m98095_biquad_band() argument
561 snd_soc_write(codec, bq_reg++, M98095_BYTE1(coefs[i])); in m98095_biquad_band()
562 snd_soc_write(codec, bq_reg++, M98095_BYTE0(coefs[i])); in m98095_biquad_band()
619 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); in max98095_mic1pre_set() local
620 struct max98095_priv *max98095 = snd_soc_codec_get_drvdata(codec); in max98095_mic1pre_set()
624 snd_soc_update_bits(codec, M98095_05F_LVL_MIC1, M98095_MICPRE_MASK, in max98095_mic1pre_set()
633 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()
191 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); in rt5631_dmic_get() local
192 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.c64 static void wait_for_dc_servo(struct snd_soc_codec *codec, unsigned int op) in wait_for_dc_servo() argument
66 struct wm_hubs_data *hubs = snd_soc_codec_get_drvdata(codec); in wait_for_dc_servo()
75 snd_soc_write(codec, WM8993_DC_SERVO_0, val); in wait_for_dc_servo()
77 dev_dbg(codec->dev, "Waiting for DC servo...\n"); in wait_for_dc_servo()
93 reg = snd_soc_read(codec, WM8993_DC_SERVO_0); in wait_for_dc_servo()
94 dev_dbg(codec->dev, "DC servo: %x\n", reg); in wait_for_dc_servo()
98 dev_err(codec->dev, "Timed out waiting for DC Servo %x\n", in wait_for_dc_servo()
112 static bool wm_hubs_dac_hp_direct(struct snd_soc_codec *codec) in wm_hubs_dac_hp_direct() argument
117 reg = snd_soc_read(codec, WM8993_OUTPUT_MIXER1); in wm_hubs_dac_hp_direct()
120 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,
238 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); in wm8753_get_dai() local
239 struct wm8753_priv *wm8753 = snd_soc_codec_get_drvdata(codec); in wm8753_get_dai()
248 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); in wm8753_set_dai() local
249 struct wm8753_priv *wm8753 = snd_soc_codec_get_drvdata(codec); in wm8753_set_dai()
255 if (snd_soc_codec_is_active(codec)) in wm8753_set_dai()
258 ioctl = snd_soc_read(codec, WM8753_IOCTL); in wm8753_set_dai()
266 snd_soc_write(codec, WM8753_IOCTL, ioctl); in wm8753_set_dai()
269 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 …]
Dmax98088.c565 static void m98088_eq_band(struct snd_soc_codec *codec, unsigned int dai, in m98088_eq_band() argument
583 snd_soc_write(codec, eq_reg++, M98088_BYTE1(coefs[i])); in m98088_eq_band()
584 snd_soc_write(codec, eq_reg++, M98088_BYTE0(coefs[i])); in m98088_eq_band()
638 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); in max98088_mic1pre_set() local
639 struct max98088_priv *max98088 = snd_soc_codec_get_drvdata(codec); in max98088_mic1pre_set()
643 snd_soc_update_bits(codec, M98088_REG_35_LVL_MIC1, M98088_MICPRE_MASK, in max98088_mic1pre_set()
652 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); in max98088_mic1pre_get() local
653 struct max98088_priv *max98088 = snd_soc_codec_get_drvdata(codec); in max98088_mic1pre_get()
662 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); in max98088_mic2pre_set() local
663 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 …]
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 …]
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 …]
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 …]
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 …]
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 …]
Dwm9713.c39 static unsigned int ac97_read(struct snd_soc_codec *codec,
41 static int ac97_write(struct snd_soc_codec *codec,
220 struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm); in wm9713_voice_shutdown() local
227 status = ac97_read(codec, AC97_EXTENDED_MID) | 0x1000; in wm9713_voice_shutdown()
228 rate = ac97_read(codec, AC97_HANDSET_RATE) & 0xF0FF; in wm9713_voice_shutdown()
229 ac97_write(codec, AC97_HANDSET_RATE, rate | 0x0200); in wm9713_voice_shutdown()
231 ac97_write(codec, AC97_HANDSET_RATE, rate | 0x0F00); in wm9713_voice_shutdown()
232 ac97_write(codec, AC97_EXTENDED_MID, status); in wm9713_voice_shutdown()
256 struct snd_soc_codec *codec = snd_soc_dapm_to_codec(dapm); in wm9713_hp_mixer_put() local
257 struct wm9713_priv *wm9713 = snd_soc_codec_get_drvdata(codec); in wm9713_hp_mixer_put()
[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
149 struct snd_soc_codec *codec = snd_soc_dapm_kcontrol_codec(kcontrol); in snd_soc_dapm_put_volsw_aic3x() local
175 change = snd_soc_test_bits(codec, reg, mask, val); in snd_soc_dapm_put_volsw_aic3x()
182 snd_soc_dapm_mixer_update_power(&codec->dapm, kcontrol, connect, in snd_soc_dapm_put_volsw_aic3x()
201 struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm); in mic_bias_event() local
202 struct aic3x_priv *aic3x = snd_soc_codec_get_drvdata(codec); in mic_bias_event()
207 snd_soc_update_bits(codec, MICBIAS_CTRL, in mic_bias_event()
213 snd_soc_update_bits(codec, MICBIAS_CTRL, in mic_bias_event()
979 static int aic3x_add_widgets(struct snd_soc_codec *codec) in aic3x_add_widgets() argument
981 struct aic3x_priv *aic3x = snd_soc_codec_get_drvdata(codec); in aic3x_add_widgets()
[all …]
Dstac9766.c139 static int stac9766_ac97_write(struct snd_soc_codec *codec, unsigned int reg, in stac9766_ac97_write() argument
142 struct snd_ac97 *ac97 = snd_soc_codec_get_drvdata(codec); in stac9766_ac97_write()
143 u16 *cache = codec->reg_cache; in stac9766_ac97_write()
146 stac9766_ac97_write(codec, AC97_INT_PAGING, 0); in stac9766_ac97_write()
148 stac9766_ac97_write(codec, AC97_INT_PAGING, 1); in stac9766_ac97_write()
159 static unsigned int stac9766_ac97_read(struct snd_soc_codec *codec, in stac9766_ac97_read() argument
162 struct snd_ac97 *ac97 = snd_soc_codec_get_drvdata(codec); in stac9766_ac97_read()
163 u16 val = 0, *cache = codec->reg_cache; in stac9766_ac97_read()
166 stac9766_ac97_write(codec, AC97_INT_PAGING, 0); in stac9766_ac97_read()
168 stac9766_ac97_write(codec, AC97_INT_PAGING, 1); in stac9766_ac97_read()
[all …]
Dwm9081.c343 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); in speaker_mode_get() local
346 reg = snd_soc_read(codec, WM9081_ANALOGUE_SPEAKER_2); in speaker_mode_get()
364 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); in speaker_mode_put() local
365 unsigned int reg_pwr = snd_soc_read(codec, WM9081_POWER_MANAGEMENT); in speaker_mode_put()
366 unsigned int reg2 = snd_soc_read(codec, WM9081_ANALOGUE_SPEAKER_2); in speaker_mode_put()
387 snd_soc_write(codec, WM9081_ANALOGUE_SPEAKER_2, reg2); in speaker_mode_put()
550 static int wm9081_set_fll(struct snd_soc_codec *codec, int fll_id, in wm9081_set_fll() argument
553 struct wm9081_priv *wm9081 = snd_soc_codec_get_drvdata(codec); in wm9081_set_fll()
565 dev_dbg(codec->dev, "FLL disabled\n"); in wm9081_set_fll()
576 reg5 = snd_soc_read(codec, WM9081_FLL_CONTROL_5); in wm9081_set_fll()
[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()
353 snd_soc_update_bits(codec, ML26124_CLK_CTL, in ml26124_hw_params()
357 snd_soc_update_bits(codec, ML26124_CLK_CTL, in ml26124_hw_params()
361 snd_soc_update_bits(codec, ML26124_CLK_CTL, in ml26124_hw_params()
365 dev_err(codec->dev, "Unsupported MCLKI\n"); in ml26124_hw_params()
369 snd_soc_update_bits(codec, ML26124_CLK_CTL, in ml26124_hw_params()
375 snd_soc_update_bits(codec, ML26124_SMPLING_RATE, 0xf, in ml26124_hw_params()
377 snd_soc_update_bits(codec, ML26124_PLLNL, 0xff, in ml26124_hw_params()
379 snd_soc_update_bits(codec, ML26124_PLLNH, 0x1, in ml26124_hw_params()
[all …]
Dwm8960.c154 static int wm8960_set_deemph(struct snd_soc_codec *codec) in wm8960_set_deemph() argument
156 struct wm8960_priv *wm8960 = snd_soc_codec_get_drvdata(codec); in wm8960_set_deemph()
175 dev_dbg(codec->dev, "Set deemphasis %d\n", val); in wm8960_set_deemph()
177 return snd_soc_update_bits(codec, WM8960_DACCTL1, in wm8960_set_deemph()
184 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); in wm8960_get_deemph() local
185 struct wm8960_priv *wm8960 = snd_soc_codec_get_drvdata(codec); in wm8960_get_deemph()
194 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); in wm8960_put_deemph() local
195 struct wm8960_priv *wm8960 = snd_soc_codec_get_drvdata(codec); in wm8960_put_deemph()
203 return wm8960_set_deemph(codec); in wm8960_put_deemph()
444 static int wm8960_add_widgets(struct snd_soc_codec *codec) in wm8960_add_widgets() argument
[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()
200 if ((snd_soc_read(codec, SGTL5000_CHIP_ANA_POWER) & in power_vag_event()
202 snd_soc_update_bits(codec, SGTL5000_CHIP_ANA_POWER, in power_vag_event()
328 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); in dac_get_volsw() local
333 reg = snd_soc_read(codec, SGTL5000_CHIP_DAC_VOL); in dac_get_volsw()
[all …]
Drt286.c41 struct snd_soc_codec *codec; member
277 static void rt286_index_sync(struct snd_soc_codec *codec) in rt286_index_sync() argument
279 struct rt286_priv *rt286 = snd_soc_codec_get_drvdata(codec); in rt286_index_sync()
283 snd_soc_write(codec, rt286->index_cache[i].reg, in rt286_index_sync()
309 if (!rt286->codec) in rt286_jack_detect()
319 snd_soc_dapm_force_enable_pin(&rt286->codec->dapm, in rt286_jack_detect()
321 snd_soc_dapm_force_enable_pin(&rt286->codec->dapm, in rt286_jack_detect()
324 snd_soc_dapm_force_enable_pin(&rt286->codec->dapm, in rt286_jack_detect()
326 snd_soc_dapm_sync(&rt286->codec->dapm); in rt286_jack_detect()
363 snd_soc_dapm_disable_pin(&rt286->codec->dapm, "HV"); in rt286_jack_detect()
[all …]
Duda134x.c53 static inline unsigned int uda134x_read_reg_cache(struct snd_soc_codec *codec, in uda134x_read_reg_cache() argument
56 u8 *cache = codec->reg_cache; in uda134x_read_reg_cache()
66 static inline void uda134x_write_reg_cache(struct snd_soc_codec *codec, in uda134x_write_reg_cache() argument
69 u8 *cache = codec->reg_cache; in uda134x_write_reg_cache()
80 static int uda134x_write(struct snd_soc_codec *codec, unsigned int reg, in uda134x_write() argument
86 struct uda134x_platform_data *pd = codec->control_data; in uda134x_write()
96 uda134x_write_reg_cache(codec, reg, value); in uda134x_write()
134 static inline void uda134x_reset(struct snd_soc_codec *codec) in uda134x_reset() argument
136 u8 reset_reg = uda134x_read_reg_cache(codec, UDA134X_STATUS0); in uda134x_reset()
137 uda134x_write(codec, UDA134X_STATUS0, reset_reg | (1<<6)); in uda134x_reset()
[all …]
Dtas2552.c72 struct snd_soc_codec *codec; member
123 if (!tas_data->codec) in tas2552_sw_shutdown()
131 snd_soc_update_bits(tas_data->codec, TAS2552_CFG_1, in tas2552_sw_shutdown()
140 struct snd_soc_codec *codec = dai->codec; in tas2552_hw_params() local
141 struct tas2552_data *tas2552 = dev_get_drvdata(codec->dev); in tas2552_hw_params()
149 snd_soc_update_bits(codec, TAS2552_CFG_2, TAS2552_PLL_ENABLE, 0); in tas2552_hw_params()
154 snd_soc_update_bits(codec, TAS2552_PLL_CTRL_2, in tas2552_hw_params()
162 p = snd_soc_read(codec, TAS2552_PLL_CTRL_1); in tas2552_hw_params()
171 dev_vdbg(codec->dev, "Substream sample rate is not found %i\n", in tas2552_hw_params()
179 snd_soc_update_bits(codec, TAS2552_PLL_CTRL_1, in tas2552_hw_params()
[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 …]
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 …]
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 …]
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 …]
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 …]
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 …]
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 …]
Dda7213.c196 static int da7213_get_alc_data(struct snd_soc_codec *codec, u8 reg_val) in da7213_get_alc_data() argument
205 snd_soc_write(codec, DA7213_ALC_CIC_OP_LVL_CTRL, reg_val); in da7213_get_alc_data()
208 snd_soc_write(codec, DA7213_ALC_CIC_OP_LVL_CTRL, in da7213_get_alc_data()
210 mid_data = snd_soc_read(codec, DA7213_ALC_CIC_OP_LVL_DATA); in da7213_get_alc_data()
213 snd_soc_write(codec, DA7213_ALC_CIC_OP_LVL_CTRL, in da7213_get_alc_data()
215 top_data = snd_soc_read(codec, DA7213_ALC_CIC_OP_LVL_DATA); in da7213_get_alc_data()
223 static void da7213_alc_calib_man(struct snd_soc_codec *codec) in da7213_alc_calib_man() argument
230 avg_left_data = da7213_get_alc_data(codec, in da7213_alc_calib_man()
233 avg_right_data = da7213_get_alc_data(codec, in da7213_alc_calib_man()
241 snd_soc_write(codec, DA7213_ALC_OFFSET_MAN_M_L, reg_val); in da7213_alc_calib_man()
[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 …]
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()
257 struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm); in hp_ev() local
258 unsigned int reg = snd_soc_read(codec, WM9090_ANALOGUE_HP_0); in hp_ev()
262 snd_soc_update_bits(codec, WM9090_CHARGE_PUMP_1, in hp_ev()
267 snd_soc_update_bits(codec, WM9090_POWER_MANAGEMENT_1, in hp_ev()
272 snd_soc_write(codec, WM9090_ANALOGUE_HP_0, reg); in hp_ev()
[all …]
Dad1980.c205 static int ad1980_reset(struct snd_soc_codec *codec, int try_warm) in ad1980_reset() argument
207 struct snd_ac97 *ac97 = snd_soc_codec_get_drvdata(codec); in ad1980_reset()
213 if (snd_soc_read(codec, AC97_RESET) == 0x0090) in ad1980_reset()
224 snd_soc_write(codec, AC97_AD_SERIAL_CFG, 0x9900); in ad1980_reset()
226 if (snd_soc_read(codec, AC97_RESET) == 0x0090) 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); 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()
[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()
940 struct snd_soc_codec *codec = codec_dai->codec; in wm8990_set_dai_pll() local
947 snd_soc_update_bits(codec, WM8990_POWER_MANAGEMENT_2, in wm8990_set_dai_pll()
[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 …]
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 …]
Dda9055.c457 static int da9055_get_alc_data(struct snd_soc_codec *codec, u8 reg_val) in da9055_get_alc_data() argument
466 snd_soc_write(codec, DA9055_ALC_CIC_OP_LVL_CTRL, reg_val); in da9055_get_alc_data()
469 snd_soc_write(codec, DA9055_ALC_CIC_OP_LVL_CTRL, in da9055_get_alc_data()
471 mid_data = snd_soc_read(codec, DA9055_ALC_CIC_OP_LVL_DATA); in da9055_get_alc_data()
474 snd_soc_write(codec, DA9055_ALC_CIC_OP_LVL_CTRL, in da9055_get_alc_data()
476 top_data = snd_soc_read(codec, DA9055_ALC_CIC_OP_LVL_DATA); in da9055_get_alc_data()
487 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); in da9055_put_alc_sw() local
498 mic_left = snd_soc_read(codec, DA9055_MIC_L_CTRL); in da9055_put_alc_sw()
499 mic_right = snd_soc_read(codec, DA9055_MIC_R_CTRL); in da9055_put_alc_sw()
502 snd_soc_update_bits(codec, DA9055_MIC_L_CTRL, in da9055_put_alc_sw()
[all …]
Dmax98090.c354 dev_err(max98090->codec->dev, in max98090_reset()
430 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); in max98090_get_enab_tlv() local
431 struct max98090_priv *max98090 = snd_soc_codec_get_drvdata(codec); in max98090_get_enab_tlv()
435 unsigned int val = snd_soc_read(codec, mc->reg); in max98090_get_enab_tlv()
470 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); in max98090_put_enab_tlv() local
471 struct max98090_priv *max98090 = snd_soc_codec_get_drvdata(codec); in max98090_put_enab_tlv()
476 unsigned int val = snd_soc_read(codec, mc->reg); in max98090_put_enab_tlv()
505 snd_soc_update_bits(codec, mc->reg, in max98090_put_enab_tlv()
809 struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm); in max98090_micinput_event() local
810 struct max98090_priv *max98090 = snd_soc_codec_get_drvdata(codec); in max98090_micinput_event()
[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 …]
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 …]
Dwm8962.c58 struct snd_soc_codec *codec; member
1481 static int wm8962_dsp2_write_config(struct snd_soc_codec *codec) in wm8962_dsp2_write_config() argument
1483 struct wm8962_priv *wm8962 = snd_soc_codec_get_drvdata(codec); in wm8962_dsp2_write_config()
1489 static int wm8962_dsp2_set_enable(struct snd_soc_codec *codec, u16 val) in wm8962_dsp2_set_enable() argument
1491 u16 adcl = snd_soc_read(codec, WM8962_LEFT_ADC_VOLUME); in wm8962_dsp2_set_enable()
1492 u16 adcr = snd_soc_read(codec, WM8962_RIGHT_ADC_VOLUME); in wm8962_dsp2_set_enable()
1493 u16 dac = snd_soc_read(codec, WM8962_ADC_DAC_CONTROL_1); in wm8962_dsp2_set_enable()
1496 snd_soc_write(codec, WM8962_LEFT_ADC_VOLUME, 0); in wm8962_dsp2_set_enable()
1497 snd_soc_write(codec, WM8962_RIGHT_ADC_VOLUME, WM8962_ADC_VU); in wm8962_dsp2_set_enable()
1498 snd_soc_update_bits(codec, WM8962_ADC_DAC_CONTROL_1, in wm8962_dsp2_set_enable()
[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 …]
Dda7210.c338 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); in da7210_put_alc_sw() local
342 if (snd_soc_read(codec, DA7210_CONTROL) & DA7210_NOISE_SUP_EN) { in da7210_put_alc_sw()
343 dev_dbg(codec->dev, in da7210_put_alc_sw()
361 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); in da7210_put_noise_sup_sw() local
366 if (snd_soc_read(codec, DA7210_ADC) & DA7210_ADC_ALC_EN) in da7210_put_noise_sup_sw()
370 if ((snd_soc_read(codec, DA7210_ZERO_CROSS) & in da7210_put_noise_sup_sw()
377 val = snd_soc_read(codec, DA7210_IN_GAIN); in da7210_put_noise_sup_sw()
384 if (((snd_soc_read(codec, DA7210_AUX1_L) & DA7210_AUX1_L_VOL) < in da7210_put_noise_sup_sw()
386 ((snd_soc_read(codec, DA7210_AUX1_R) & DA7210_AUX1_R_VOL) < in da7210_put_noise_sup_sw()
767 struct snd_soc_codec *codec = dai->codec; in da7210_hw_params() local
[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 …]
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()
530 struct snd_soc_codec *codec = codec_dai->codec; in alc5623_set_dai_pll() local
538 snd_soc_update_bits(codec, ALC5623_PWR_MANAG_ADD2, in alc5623_set_dai_pll()
543 reg = snd_soc_read(codec, ALC5623_DAI_CONTROL); in alc5623_set_dai_pll()
579 snd_soc_write(codec, ALC5623_GLOBAL_CLK_CTRL_REG, gbl_clk); in alc5623_set_dai_pll()
[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 …]
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 …]
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 …]
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 …]
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 …]
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 …]
Dwm8731.c96 static int wm8731_set_deemph(struct snd_soc_codec *codec) in wm8731_set_deemph() argument
98 struct wm8731_priv *wm8731 = snd_soc_codec_get_drvdata(codec); in wm8731_set_deemph()
118 dev_dbg(codec->dev, "Set deemphasis %d (%dHz)\n", in wm8731_set_deemph()
121 return snd_soc_update_bits(codec, WM8731_APDIGI, 0x6, val); in wm8731_set_deemph()
127 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); in wm8731_get_deemph() local
128 struct wm8731_priv *wm8731 = snd_soc_codec_get_drvdata(codec); in wm8731_get_deemph()
138 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); in wm8731_put_deemph() local
139 struct wm8731_priv *wm8731 = snd_soc_codec_get_drvdata(codec); in wm8731_put_deemph()
150 wm8731_set_deemph(codec); in wm8731_put_deemph()
222 struct snd_soc_codec *codec = snd_soc_dapm_to_codec(source->dapm); in wm8731_check_osc() local
[all …]
Dwm8983.c555 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); in eqmode_get() local
558 reg = snd_soc_read(codec, WM8983_EQ1_LOW_SHELF); in eqmode_get()
570 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); in eqmode_put() local
578 reg_eq = snd_soc_read(codec, WM8983_EQ1_LOW_SHELF); in eqmode_put()
590 regpwr2 = snd_soc_read(codec, WM8983_POWER_MANAGEMENT_2); in eqmode_put()
591 regpwr3 = snd_soc_read(codec, WM8983_POWER_MANAGEMENT_3); in eqmode_put()
593 snd_soc_update_bits(codec, WM8983_POWER_MANAGEMENT_2, in eqmode_put()
595 snd_soc_update_bits(codec, WM8983_POWER_MANAGEMENT_3, in eqmode_put()
598 snd_soc_update_bits(codec, WM8983_EQ1_LOW_SHELF, in eqmode_put()
603 snd_soc_write(codec, WM8983_POWER_MANAGEMENT_2, regpwr2); in eqmode_put()
[all …]
Dmax9850.c134 struct snd_soc_codec *codec = dai->codec; in max9850_hw_params() local
135 struct max9850_priv *max9850 = snd_soc_codec_get_drvdata(codec); in max9850_hw_params()
143 sf = (snd_soc_read(codec, MAX9850_CLOCK) >> 2) + 1; in max9850_hw_params()
149 snd_soc_write(codec, MAX9850_LRCLK_MSB, (lrclk_div >> 8) & 0x7f); in max9850_hw_params()
150 snd_soc_write(codec, MAX9850_LRCLK_LSB, lrclk_div & 0xff); in max9850_hw_params()
165 snd_soc_update_bits(codec, MAX9850_DIGITAL_AUDIO, 0x3, da); in max9850_hw_params()
173 struct snd_soc_codec *codec = codec_dai->codec; in max9850_set_dai_sysclk() local
174 struct max9850_priv *max9850 = snd_soc_codec_get_drvdata(codec); in max9850_set_dai_sysclk()
178 snd_soc_write(codec, MAX9850_CLOCK, 0x0); in max9850_set_dai_sysclk()
180 snd_soc_write(codec, MAX9850_CLOCK, 0x4); in max9850_set_dai_sysclk()
[all …]
Dwm8991.c157 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); in wm899x_outpga_put_volsw_vu() local
167 val = snd_soc_read(codec, reg); in wm899x_outpga_put_volsw_vu()
168 return snd_soc_write(codec, reg, val | 0x0100); in wm899x_outpga_put_volsw_vu()
385 struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm); in outmixer_event() local
392 reg = snd_soc_read(codec, WM8991_OUTPUT_MIXER1); in outmixer_event()
401 reg = snd_soc_read(codec, WM8991_OUTPUT_MIXER2); in outmixer_event()
410 reg = snd_soc_read(codec, WM8991_SPEAKER_MIXER); in outmixer_event()
419 reg = snd_soc_read(codec, WM8991_SPEAKER_MIXER); in outmixer_event()
954 struct snd_soc_codec *codec = codec_dai->codec; in wm8991_set_dai_pll() local
961 reg = snd_soc_read(codec, WM8991_POWER_MANAGEMENT_2); in wm8991_set_dai_pll()
[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()
685 struct snd_soc_codec *codec = codec_dai->codec; in alc5632_set_dai_pll() local
693 snd_soc_update_bits(codec, ALC5632_PWR_MANAG_ADD2, in alc5632_set_dai_pll()
696 snd_soc_update_bits(codec, ALC5632_PWR_MANAG_ADD2, in alc5632_set_dai_pll()
701 reg = snd_soc_read(codec, ALC5632_DAI_CONTROL); in alc5632_set_dai_pll()
749 snd_soc_write(codec, ALC5632_GPCR2, gbl_clk); in alc5632_set_dai_pll()
751 snd_soc_write(codec, ALC5632_PLL1_CTRL, pll_div); in alc5632_set_dai_pll()
[all …]
Dcs4265.c341 struct snd_soc_codec *codec = codec_dai->codec; in cs4265_set_sysclk() local
342 struct cs4265_private *cs4265 = snd_soc_codec_get_drvdata(codec); in cs4265_set_sysclk()
346 dev_err(codec->dev, "Invalid clk_id %d\n", clk_id); in cs4265_set_sysclk()
356 dev_err(codec->dev, "Invalid freq parameter %d\n", freq); in cs4265_set_sysclk()
362 struct snd_soc_codec *codec = codec_dai->codec; in cs4265_set_fmt() local
363 struct cs4265_private *cs4265 = snd_soc_codec_get_drvdata(codec); in cs4265_set_fmt()
368 snd_soc_update_bits(codec, CS4265_ADC_CTL, in cs4265_set_fmt()
373 snd_soc_update_bits(codec, CS4265_ADC_CTL, in cs4265_set_fmt()
402 struct snd_soc_codec *codec = dai->codec; in cs4265_digital_mute() local
405 snd_soc_update_bits(codec, CS4265_DAC_CTL, in cs4265_digital_mute()
[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 = &codec->dapm; 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.c119 struct snd_soc_codec *codec = dai->codec; in wm8523_startup() local
120 struct wm8523_priv *wm8523 = snd_soc_codec_get_drvdata(codec); in wm8523_startup()
126 dev_err(codec->dev, in wm8523_startup()
142 struct snd_soc_codec *codec = dai->codec; in wm8523_hw_params() local
143 struct wm8523_priv *wm8523 = snd_soc_codec_get_drvdata(codec); in wm8523_hw_params()
145 u16 aifctrl1 = snd_soc_read(codec, WM8523_AIF_CTRL1); in wm8523_hw_params()
146 u16 aifctrl2 = snd_soc_read(codec, WM8523_AIF_CTRL2); in wm8523_hw_params()
157 dev_err(codec->dev, "MCLK/fs ratio %d unsupported\n", in wm8523_hw_params()
180 snd_soc_write(codec, WM8523_AIF_CTRL1, aifctrl1); in wm8523_hw_params()
181 snd_soc_write(codec, WM8523_AIF_CTRL2, aifctrl2); in wm8523_hw_params()
[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 …]
Dwm9705.c204 static unsigned int ac97_read(struct snd_soc_codec *codec, unsigned int reg) in ac97_read() argument
206 struct snd_ac97 *ac97 = snd_soc_codec_get_drvdata(codec); in ac97_read()
207 u16 *cache = codec->reg_cache; in ac97_read()
224 static int ac97_write(struct snd_soc_codec *codec, unsigned int reg, in ac97_write() argument
227 struct snd_ac97 *ac97 = snd_soc_codec_get_drvdata(codec); in ac97_write()
228 u16 *cache = codec->reg_cache; in ac97_write()
241 struct snd_soc_codec *codec = dai->codec; in ac97_prepare() local
245 vra = ac97_read(codec, AC97_EXTENDED_STATUS); in ac97_prepare()
246 ac97_write(codec, AC97_EXTENDED_STATUS, vra | 0x1); in ac97_prepare()
253 return ac97_write(codec, reg, substream->runtime->rate); in ac97_prepare()
[all …]
Drt5645.c224 static int rt5645_reset(struct snd_soc_codec *codec) in rt5645_reset() argument
226 return snd_soc_write(codec, RT5645_RESET, 0); in rt5645_reset()
543 struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm); in set_dmic_clk() local
544 struct rt5645_priv *rt5645 = snd_soc_codec_get_drvdata(codec); in set_dmic_clk()
550 dev_err(codec->dev, "Failed to set DMIC clock\n"); in set_dmic_clk()
552 snd_soc_update_bits(codec, RT5645_DMIC_CTRL1, in set_dmic_clk()
560 struct snd_soc_codec *codec = snd_soc_dapm_to_codec(source->dapm); in is_sys_clk_from_pll() local
563 val = snd_soc_read(codec, RT5645_GLB_CLK); in is_sys_clk_from_pll()
574 struct snd_soc_codec *codec = snd_soc_dapm_to_codec(source->dapm); in is_using_asrc() local
606 val = (snd_soc_read(codec, reg) >> shift) & 0xf; in is_using_asrc()
[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 …]
Dwm9712.c32 static unsigned int ac97_read(struct snd_soc_codec *codec,
34 static int ac97_write(struct snd_soc_codec *codec,
181 struct snd_soc_codec *codec = snd_soc_dapm_to_codec(dapm); in wm9712_hp_mixer_put() local
182 struct wm9712_priv *wm9712 = snd_soc_codec_get_drvdata(codec); in wm9712_hp_mixer_put()
225 struct snd_soc_codec *codec = snd_soc_dapm_to_codec(dapm); in wm9712_hp_mixer_get() local
226 struct wm9712_priv *wm9712 = snd_soc_codec_get_drvdata(codec); in wm9712_hp_mixer_get()
485 static unsigned int ac97_read(struct snd_soc_codec *codec, in ac97_read() argument
488 struct wm9712_priv *wm9712 = snd_soc_codec_get_drvdata(codec); in ac97_read()
489 u16 *cache = codec->reg_cache; in ac97_read()
505 static int ac97_write(struct snd_soc_codec *codec, unsigned int reg, in ac97_write() argument
[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 …]
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 (codec->dapm.bias_level == 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()
186 codec->dapm.bias_level = level; in sta529_set_bias_level()
196 struct snd_soc_codec *codec = dai->codec; in sta529_hw_params() local
[all …]
Dwm8741.c82 static int wm8741_reset(struct snd_soc_codec *codec) in wm8741_reset() argument
84 return snd_soc_write(codec, WM8741_RESET, 0); in wm8741_reset()
201 struct snd_soc_codec *codec = dai->codec; in wm8741_startup() local
202 struct wm8741_priv *wm8741 = snd_soc_codec_get_drvdata(codec); in wm8741_startup()
208 dev_err(codec->dev, in wm8741_startup()
224 struct snd_soc_codec *codec = dai->codec; in wm8741_hw_params() local
225 struct wm8741_priv *wm8741 = snd_soc_codec_get_drvdata(codec); in wm8741_hw_params()
226 u16 iface = snd_soc_read(codec, WM8741_FORMAT_CONTROL) & 0x1FC; in wm8741_hw_params()
238 dev_err(codec->dev, "MCLK/fs ratio %d unsupported\n", in wm8741_hw_params()
257 dev_dbg(codec->dev, "wm8741_hw_params: Unsupported bit size param = %d", in wm8741_hw_params()
[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 …]
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 …]
Drt5640.c170 static int rt5640_reset(struct snd_soc_codec *codec) in rt5640_reset() argument
172 return snd_soc_write(codec, RT5640_RESET, 0); in rt5640_reset()
461 struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm); in set_dmic_clk() local
462 struct rt5640_priv *rt5640 = snd_soc_codec_get_drvdata(codec); in set_dmic_clk()
468 dev_err(codec->dev, "Failed to set DMIC clock\n"); in set_dmic_clk()
470 snd_soc_update_bits(codec, RT5640_DMIC, RT5640_DMIC_CLK_MASK, in set_dmic_clk()
478 struct snd_soc_codec *codec = snd_soc_dapm_to_codec(source->dapm); in is_sys_clk_from_pll() local
481 val = snd_soc_read(codec, RT5640_GLB_CLK); in is_sys_clk_from_pll()
913 static void hp_amp_power_on(struct snd_soc_codec *codec) in hp_amp_power_on() argument
915 struct rt5640_priv *rt5640 = snd_soc_codec_get_drvdata(codec); in hp_amp_power_on()
[all …]
Drt5670.c416 static int rt5670_headset_detect(struct snd_soc_codec *codec, int jack_insert) in rt5670_headset_detect() argument
419 struct rt5670_priv *rt5670 = snd_soc_codec_get_drvdata(codec); in rt5670_headset_detect()
422 snd_soc_dapm_force_enable_pin(&codec->dapm, in rt5670_headset_detect()
424 snd_soc_dapm_sync(&codec->dapm); in rt5670_headset_detect()
425 snd_soc_update_bits(codec, RT5670_GEN_CTRL3, 0x4, 0x0); in rt5670_headset_detect()
426 snd_soc_update_bits(codec, RT5670_CJ_CTRL2, in rt5670_headset_detect()
429 snd_soc_write(codec, RT5670_GPIO_CTRL2, 0x0004); in rt5670_headset_detect()
430 snd_soc_update_bits(codec, RT5670_GPIO_CTRL1, in rt5670_headset_detect()
432 snd_soc_update_bits(codec, RT5670_CJ_CTRL1, in rt5670_headset_detect()
434 snd_soc_write(codec, RT5670_JD_CTRL3, 0x00f0); in rt5670_headset_detect()
[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 …]
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 …]
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 …]
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 …]
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 …]
D88pm860x-codec.c142 struct snd_soc_codec *codec; member
279 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); in snd_soc_get_volsw_2r_st() local
284 val[0] = snd_soc_read(codec, reg) & 0x3f; in snd_soc_get_volsw_2r_st()
285 val[1] = (snd_soc_read(codec, PM860X_SIDETONE_SHIFT) >> 4) & 0xf; in snd_soc_get_volsw_2r_st()
286 val2[0] = snd_soc_read(codec, reg2) & 0x3f; in snd_soc_get_volsw_2r_st()
287 val2[1] = (snd_soc_read(codec, PM860X_SIDETONE_SHIFT)) & 0xf; in snd_soc_get_volsw_2r_st()
303 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); in snd_soc_put_volsw_2r_st() local
315 err = snd_soc_update_bits(codec, reg, 0x3f, st_table[val].m); in snd_soc_put_volsw_2r_st()
318 err = snd_soc_update_bits(codec, PM860X_SIDETONE_SHIFT, 0xf0, in snd_soc_put_volsw_2r_st()
323 err = snd_soc_update_bits(codec, reg2, 0x3f, st_table[val2].m); in snd_soc_put_volsw_2r_st()
[all …]
Drt5651.c379 struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm); in set_dmic_clk() local
380 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 …]
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 …]
Dcs42l56.c48 struct snd_soc_codec *codec; member
779 struct snd_soc_codec *codec = codec_dai->codec; in cs42l56_set_sysclk() local
780 struct cs42l56_private *cs42l56 = snd_soc_codec_get_drvdata(codec); in cs42l56_set_sysclk()
806 snd_soc_update_bits(codec, CS42L56_CLKCTL_1, in cs42l56_set_sysclk()
809 snd_soc_update_bits(codec, CS42L56_CLKCTL_1, in cs42l56_set_sysclk()
818 struct snd_soc_codec *codec = codec_dai->codec; in cs42l56_set_dai_fmt() local
819 struct cs42l56_private *cs42l56 = snd_soc_codec_get_drvdata(codec); in cs42l56_set_dai_fmt()
856 snd_soc_update_bits(codec, CS42L56_CLKCTL_1, in cs42l56_set_dai_fmt()
858 snd_soc_update_bits(codec, CS42L56_SERIAL_FMT, in cs42l56_set_dai_fmt()
860 snd_soc_update_bits(codec, CS42L56_CLKCTL_1, in cs42l56_set_dai_fmt()
[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 …]
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 (codec->dapm.bias_level) { 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 (codec->dapm.bias_level) { 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()
757 struct snd_soc_codec *codec = codec_dai->codec; in wm8350_set_dai_sysclk() local
758 struct wm8350_data *wm8350_data = snd_soc_codec_get_drvdata(codec); in wm8350_set_dai_sysclk()
[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()
332 struct snd_soc_codec *codec = dai->codec; in wm8737_hw_params() local
333 struct wm8737_priv *wm8737 = snd_soc_codec_get_drvdata(codec); in wm8737_hw_params()
352 dev_err(codec->dev, "%dHz MCLK can't support %dHz\n", in wm8737_hw_params()
375 snd_soc_update_bits(codec, WM8737_AUDIO_FORMAT, WM8737_WL_MASK, af); in wm8737_hw_params()
376 snd_soc_update_bits(codec, WM8737_CLOCKING, in wm8737_hw_params()
386 struct snd_soc_codec *codec = codec_dai->codec; in wm8737_set_dai_sysclk() local
387 struct wm8737_priv *wm8737 = snd_soc_codec_get_drvdata(codec); in wm8737_set_dai_sysclk()
398 dev_err(codec->dev, "MCLK rate %dHz not supported\n", freq); in wm8737_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()
118 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); in pcm1681_get_deemph() local
119 struct pcm1681_private *priv = snd_soc_codec_get_drvdata(codec); in pcm1681_get_deemph()
129 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); in pcm1681_put_deemph() local
130 struct pcm1681_private *priv = snd_soc_codec_get_drvdata(codec); in pcm1681_put_deemph()
134 return pcm1681_set_deemph(codec); in pcm1681_put_deemph()
140 struct snd_soc_codec *codec = codec_dai->codec; in pcm1681_set_dai_fmt() local
141 struct pcm1681_private *priv = snd_soc_codec_get_drvdata(codec); in pcm1681_set_dai_fmt()
145 dev_err(codec->dev, "Invalid clocking mode\n"); in pcm1681_set_dai_fmt()
[all …]
Dcs42l52.c45 struct snd_soc_codec *codec; member
528 static int cs42l52_add_mic_controls(struct snd_soc_codec *codec) in cs42l52_add_mic_controls() argument
530 struct cs42l52_private *cs42l52 = snd_soc_codec_get_drvdata(codec); in cs42l52_add_mic_controls()
534 snd_soc_add_codec_controls(codec, cs42l52_mica_controls, in cs42l52_add_mic_controls()
538 snd_soc_add_codec_controls(codec, cs42l52_micb_controls, in cs42l52_add_mic_controls()
771 struct snd_soc_codec *codec = codec_dai->codec; in cs42l52_set_sysclk() local
772 struct cs42l52_private *cs42l52 = snd_soc_codec_get_drvdata(codec); in cs42l52_set_sysclk()
777 dev_err(codec->dev, "Invalid freq parameter\n"); in cs42l52_set_sysclk()
785 struct snd_soc_codec *codec = codec_dai->codec; in cs42l52_set_fmt() local
786 struct cs42l52_private *cs42l52 = snd_soc_codec_get_drvdata(codec); in cs42l52_set_fmt()
[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()
469 codec->dapm.bias_level = level; in adau1761_set_bias_level()
474 struct snd_soc_codec *codec) in adau1761_get_lineout_mode() argument
476 struct adau1761_platform_data *pdata = codec->dev->platform_data; in adau1761_get_lineout_mode()
484 static int adau1761_setup_digmic_jackdetect(struct snd_soc_codec *codec) in adau1761_setup_digmic_jackdetect() argument
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 …]
Dssm2602.c277 struct snd_soc_codec *codec = dai->codec; in ssm2602_hw_params() local
278 struct ssm2602_priv *ssm2602 = snd_soc_codec_get_drvdata(codec); in ssm2602_hw_params()
312 struct snd_soc_codec *codec = dai->codec; in ssm2602_startup() local
313 struct ssm2602_priv *ssm2602 = snd_soc_codec_get_drvdata(codec); in ssm2602_startup()
326 struct ssm2602_priv *ssm2602 = snd_soc_codec_get_drvdata(dai->codec); in ssm2602_mute()
341 struct snd_soc_codec *codec = codec_dai->codec; in ssm2602_set_dai_sysclk() local
342 struct ssm2602_priv *ssm2602 = snd_soc_codec_get_drvdata(codec); in ssm2602_set_dai_sysclk()
393 struct ssm2602_priv *ssm2602 = snd_soc_codec_get_drvdata(codec_dai->codec); in ssm2602_set_dai_fmt()
449 static int ssm2602_set_bias_level(struct snd_soc_codec *codec, in ssm2602_set_bias_level() argument
452 struct ssm2602_priv *ssm2602 = snd_soc_codec_get_drvdata(codec); in ssm2602_set_bias_level()
[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()
209 int arizona_init_spk(struct snd_soc_codec *codec) in arizona_init_spk() argument
211 struct arizona_priv *priv = snd_soc_codec_get_drvdata(codec); in arizona_init_spk()
215 ret = snd_soc_dapm_new_controls(&codec->dapm, &arizona_spkl, 1); in arizona_init_spk()
223 ret = snd_soc_dapm_new_controls(&codec->dapm, in arizona_init_spk()
259 int arizona_init_mono(struct snd_soc_codec *codec) in arizona_init_mono() argument
261 struct arizona_priv *priv = snd_soc_codec_get_drvdata(codec); in arizona_init_mono()
[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()
281 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); in tas5086_get_deemph() local
282 struct tas5086_private *priv = snd_soc_codec_get_drvdata(codec); in tas5086_get_deemph()
292 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); in tas5086_put_deemph() local
293 struct tas5086_private *priv = snd_soc_codec_get_drvdata(codec); in tas5086_put_deemph()
297 return tas5086_set_deemph(codec); in tas5086_put_deemph()
304 struct snd_soc_codec *codec = codec_dai->codec; in tas5086_set_dai_sysclk() local
305 struct tas5086_private *priv = snd_soc_codec_get_drvdata(codec); in tas5086_set_dai_sysclk()
322 struct snd_soc_codec *codec = codec_dai->codec; in tas5086_set_dai_fmt() local
[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 …]
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 …]
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 adau *adau = snd_soc_codec_get_drvdata(codec); in adau17x1_dsp_mux_enum_put()
184 change = snd_soc_test_bits(codec, reg, 0xff, val); in adau17x1_dsp_mux_enum_put()
191 snd_soc_dapm_mux_update_power(&codec->dapm, kcontrol, in adau17x1_dsp_mux_enum_put()
201 struct snd_soc_codec *codec = snd_soc_dapm_kcontrol_codec(kcontrol); in adau17x1_dsp_mux_enum_get() local
202 struct adau *adau = snd_soc_codec_get_drvdata(codec); in adau17x1_dsp_mux_enum_get()
307 struct snd_soc_codec *codec = dai->codec; in adau17x1_hw_params() local
308 struct adau *adau = snd_soc_codec_get_drvdata(codec); in adau17x1_hw_params()
[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 …]
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()
72 static int ac97_soc_probe(struct snd_soc_codec *codec) in ac97_soc_probe() argument
80 ret = snd_ac97_bus(codec->component.card->snd_card, 0, soc_ac97_ops, in ac97_soc_probe()
90 snd_soc_codec_set_drvdata(codec, ac97); in ac97_soc_probe()
96 static int ac97_soc_suspend(struct snd_soc_codec *codec) in ac97_soc_suspend() argument
98 struct snd_ac97 *ac97 = snd_soc_codec_get_drvdata(codec); in ac97_soc_suspend()
105 static int ac97_soc_resume(struct snd_soc_codec *codec) in ac97_soc_resume() argument
108 struct snd_ac97 *ac97 = snd_soc_codec_get_drvdata(codec); in ac97_soc_resume()
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
274 dev_dbg(codec->dev, "%s: sample rate is %d, returning %d\n", in max98925_rate_value()
302 struct snd_soc_codec *codec = codec_dai->codec; in max98925_dai_set_fmt() local
303 struct max98925_priv *max98925 = snd_soc_codec_get_drvdata(codec); in max98925_dai_set_fmt()
306 dev_dbg(codec->dev, "%s: fmt 0x%08X\n", __func__, fmt); in max98925_dai_set_fmt()
327 dev_err(codec->dev, "DAI clock mode unsupported"); in max98925_dai_set_fmt()
344 dev_err(codec->dev, "DAI invert mode unsupported"); in max98925_dai_set_fmt()
357 struct snd_soc_codec *codec = max98925->codec; in max98925_set_clock() local
[all …]
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 …]
Dcs42l73.c587 struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm); in cs42l73_spklo_spk_amp_event() local
588 struct cs42l73_private *priv = snd_soc_codec_get_drvdata(codec); in cs42l73_spklo_spk_amp_event()
603 struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm); in cs42l73_ear_amp_event() local
604 struct cs42l73_private *priv = snd_soc_codec_get_drvdata(codec); in cs42l73_ear_amp_event()
621 struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm); in cs42l73_hp_amp_event() local
622 struct cs42l73_private *priv = snd_soc_codec_get_drvdata(codec); in cs42l73_hp_amp_event()
981 struct snd_soc_codec *codec = dai->codec; in cs42l73_set_mclk() local
982 struct cs42l73_private *priv = snd_soc_codec_get_drvdata(codec); in cs42l73_set_mclk()
996 dev_dbg(codec->dev, "MCLK%u %u <-> internal MCLK %u\n", in cs42l73_set_mclk()
1003 snd_soc_write(codec, CS42L73_DMMCC, dmmcc); in cs42l73_set_mclk()
[all …]
Dadau1701.c295 static int adau1701_reset(struct snd_soc_codec *codec, unsigned int clkdiv, in adau1701_reset() argument
298 struct adau1701 *adau1701 = snd_soc_codec_get_drvdata(codec); in adau1701_reset()
345 dev_warn(codec->dev, "Failed to load firmware\n"); in adau1701_reset()
359 static int adau1701_set_capture_pcm_format(struct snd_soc_codec *codec, in adau1701_set_capture_pcm_format() argument
362 struct adau1701 *adau1701 = snd_soc_codec_get_drvdata(codec); in adau1701_set_capture_pcm_format()
400 static int adau1701_set_playback_pcm_format(struct snd_soc_codec *codec, in adau1701_set_playback_pcm_format() argument
403 struct adau1701 *adau1701 = snd_soc_codec_get_drvdata(codec); in adau1701_set_playback_pcm_format()
432 struct snd_soc_codec *codec = dai->codec; in adau1701_hw_params() local
433 struct adau1701 *adau1701 = snd_soc_codec_get_drvdata(codec); in adau1701_hw_params()
444 ret = adau1701_reset(codec, clkdiv, params_rate(params)); in adau1701_hw_params()
[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()
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()
95 codec->dapm.bias_level = level; in cq93vc_set_bias_level()
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 …]
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_adsp1_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 …]
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);
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 = &codec->dapm; 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 = &codec->dapm; 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 …]
Dlm4857.c52 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); in lm4857_get_mode() local
53 struct lm4857 *lm4857 = snd_soc_codec_get_drvdata(codec); in lm4857_get_mode()
63 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); in lm4857_set_mode() local
64 struct lm4857 *lm4857 = snd_soc_codec_get_drvdata(codec); in lm4857_set_mode()
69 if (codec->dapm.bias_level == SND_SOC_BIAS_ON) in lm4857_set_mode()
75 static int lm4857_set_bias_level(struct snd_soc_codec *codec, in lm4857_set_bias_level() argument
78 struct lm4857 *lm4857 = snd_soc_codec_get_drvdata(codec); in lm4857_set_bias_level()
92 codec->dapm.bias_level = level; in lm4857_set_bias_level()
Dadau1781.c177 struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm); in adau1781_dejitter_fixup() local
178 struct adau *adau = snd_soc_codec_get_drvdata(codec); in adau1781_dejitter_fixup()
317 static int adau1781_set_bias_level(struct snd_soc_codec *codec, in adau1781_set_bias_level() argument
320 struct adau *adau = snd_soc_codec_get_drvdata(codec); in adau1781_set_bias_level()
342 codec->dapm.bias_level = level; in adau1781_set_bias_level()
384 static int adau1781_codec_probe(struct snd_soc_codec *codec) in adau1781_codec_probe() argument
386 struct adau1781_platform_data *pdata = dev_get_platdata(codec->dev); in adau1781_codec_probe()
387 struct adau *adau = snd_soc_codec_get_drvdata(codec); in adau1781_codec_probe()
390 ret = adau17x1_add_widgets(codec); in adau1781_codec_probe()
406 ret = snd_soc_dapm_new_controls(&codec->dapm, in adau1781_codec_probe()
[all …]
Dad193x.c112 struct ad193x_priv *ad193x = snd_soc_codec_get_drvdata(dai->codec); in ad193x_mute()
128 struct ad193x_priv *ad193x = snd_soc_codec_get_drvdata(dai->codec); in ad193x_set_tdm_slot()
159 struct ad193x_priv *ad193x = snd_soc_codec_get_drvdata(codec_dai->codec); in ad193x_set_dai_fmt()
233 struct snd_soc_codec *codec = codec_dai->codec; in ad193x_set_dai_sysclk() local
234 struct ad193x_priv *ad193x = snd_soc_codec_get_drvdata(codec); in ad193x_set_dai_sysclk()
251 struct snd_soc_codec *codec = dai->codec; in ad193x_hw_params() local
252 struct ad193x_priv *ad193x = snd_soc_codec_get_drvdata(codec); in ad193x_hw_params()
326 static int ad193x_codec_probe(struct snd_soc_codec *codec) in ad193x_codec_probe() argument
328 struct ad193x_priv *ad193x = snd_soc_codec_get_drvdata(codec); in ad193x_codec_probe()
Drt5677.c558 struct snd_soc_codec *codec = rt5677->codec; in rt5677_dsp_mode_i2c_write_addr() local
566 dev_err(codec->dev, "Failed to set addr msb value: %d\n", ret); in rt5677_dsp_mode_i2c_write_addr()
573 dev_err(codec->dev, "Failed to set addr lsb value: %d\n", ret); in rt5677_dsp_mode_i2c_write_addr()
580 dev_err(codec->dev, "Failed to set data msb value: %d\n", ret); in rt5677_dsp_mode_i2c_write_addr()
587 dev_err(codec->dev, "Failed to set data lsb value: %d\n", ret); in rt5677_dsp_mode_i2c_write_addr()
594 dev_err(codec->dev, "Failed to set op code value: %d\n", ret); in rt5677_dsp_mode_i2c_write_addr()
616 struct snd_soc_codec *codec = rt5677->codec; in rt5677_dsp_mode_i2c_read_addr() local
625 dev_err(codec->dev, "Failed to set addr msb value: %d\n", ret); in rt5677_dsp_mode_i2c_read_addr()
632 dev_err(codec->dev, "Failed to set addr lsb value: %d\n", ret); in rt5677_dsp_mode_i2c_read_addr()
639 dev_err(codec->dev, "Failed to set op code value: %d\n", ret); in rt5677_dsp_mode_i2c_read_addr()
[all …]
Dsi476x.c143 err = snd_soc_update_bits(codec_dai->codec, SI476X_DIGITAL_IO_OUTPUT_FORMAT, in si476x_codec_set_dai_fmt()
150 dev_err(codec_dai->codec->dev, "Failed to set output format\n"); in si476x_codec_set_dai_fmt()
166 dev_err(dai->codec->dev, "Rate: %d is not supported\n", rate); in si476x_codec_hw_params()
189 err = snd_soc_write(dai->codec, SI476X_DIGITAL_IO_OUTPUT_SAMPLE_RATE, in si476x_codec_hw_params()
192 dev_err(dai->codec->dev, "Failed to set sample rate\n"); in si476x_codec_hw_params()
196 err = snd_soc_update_bits(dai->codec, SI476X_DIGITAL_IO_OUTPUT_FORMAT, in si476x_codec_hw_params()
201 dev_err(dai->codec->dev, "Failed to set output width\n"); in si476x_codec_hw_params()
Dmax9768.c46 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); in max9768_get_gpio() local
47 struct max9768 *max9768 = snd_soc_codec_get_drvdata(codec); in max9768_get_gpio()
58 struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); in max9768_set_gpio() local
59 struct max9768 *max9768 = snd_soc_codec_get_drvdata(codec); in max9768_set_gpio()
133 static int max9768_probe(struct snd_soc_codec *codec) in max9768_probe() argument
135 struct max9768 *max9768 = snd_soc_codec_get_drvdata(codec); in max9768_probe()
139 ret = snd_soc_write(codec, MAX9768_CTRL, MAX9768_CTRL_PWM); in max9768_probe()
145 ret = snd_soc_add_codec_controls(codec, max9768_mute, in max9768_probe()
Dlm49453.c1114 struct snd_soc_codec *codec = dai->codec; in lm49453_hw_params() local
1115 struct lm49453_priv *lm49453 = snd_soc_codec_get_drvdata(codec); in lm49453_hw_params()
1141 snd_soc_write(codec, LM49453_P0_ADC_CLK_DIV_REG, clk_div); in lm49453_hw_params()
1142 snd_soc_write(codec, LM49453_P0_DAC_HP_CLK_DIV_REG, clk_div); in lm49453_hw_params()
1149 struct snd_soc_codec *codec = codec_dai->codec; in lm49453_set_dai_fmt() local
1192 snd_soc_update_bits(codec, LM49453_P0_AUDIO_PORT1_BASIC_REG, in lm49453_set_dai_fmt()
1196 snd_soc_write(codec, LM49453_P0_AUDIO_PORT1_RX_MSB_REG, clk_shift); in lm49453_set_dai_fmt()
1204 struct snd_soc_codec *codec = dai->codec; in lm49453_set_dai_sysclk() local
1223 snd_soc_update_bits(codec, LM49453_P0_PMC_SETUP_REG, BIT(4), pll_clk); in lm49453_set_dai_sysclk()
1230 snd_soc_update_bits(dai->codec, LM49453_P0_DAC_DSP_REG, BIT(1)|BIT(0), in lm49453_hp_mute()
[all …]
Dwm_hubs.h53 struct snd_soc_codec *codec; member
66 extern void wm_hubs_vmid_ena(struct snd_soc_codec *codec);
67 extern void wm_hubs_set_bias_level(struct snd_soc_codec *codec,
69 extern void wm_hubs_update_class_w(struct snd_soc_codec *codec);
/linux-4.1.27/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.h100 int snd_hdac_device_register(struct hdac_device *codec);
101 void snd_hdac_device_unregister(struct hdac_device *codec);
103 int snd_hdac_refresh_widgets(struct hdac_device *codec);
105 unsigned int snd_hdac_make_cmd(struct hdac_device *codec, hda_nid_t nid,
107 int snd_hdac_exec_verb(struct hdac_device *codec, unsigned int cmd,
109 int snd_hdac_read(struct hdac_device *codec, hda_nid_t nid,
111 int _snd_hdac_read_parm(struct hdac_device *codec, hda_nid_t nid, int parm,
113 int snd_hdac_read_parm_uncached(struct hdac_device *codec, hda_nid_t nid,
115 int snd_hdac_override_parm(struct hdac_device *codec, hda_nid_t nid,
117 int snd_hdac_get_connections(struct hdac_device *codec, hda_nid_t nid,
[all …]
/linux-4.1.27/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.1.27/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.1.27/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.c89 static int format_register_str(struct snd_soc_codec *codec, in format_register_str() argument
92 int wordsize = min_bytes_needed(codec->driver->reg_cache_size) * 2; in format_register_str()
93 int regsize = codec->driver->reg_word_size * 2; in format_register_str()
106 ret = snd_soc_read(codec, reg); in format_register_str()
123 static ssize_t soc_codec_reg_show(struct snd_soc_codec *codec, char *buf, in soc_codec_reg_show() argument
132 wordsize = min_bytes_needed(codec->driver->reg_cache_size) * 2; in soc_codec_reg_show()
133 regsize = codec->driver->reg_word_size * 2; in soc_codec_reg_show()
137 if (!codec->driver->reg_cache_size) in soc_codec_reg_show()
140 if (codec->driver->reg_cache_step) in soc_codec_reg_show()
141 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.1.27/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.1.27/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.1.27/Documentation/sound/alsa/
Dhda_codec.txt13 The snd-hda-codec module supports the generic access function for the
15 from the controller code like ac97 codec module. The real accessors
19 Each codec chip belongs to a bus class which communicates with the
41 string is passed to the codec parser, and it depends on the parser how
48 int (*command)(struct hda_codec *codec, hda_nid_t nid, int direct,
50 unsigned int (*get_response)(struct hda_codec *codec);
53 void (*pm_notify)(struct hda_codec *codec);
57 The command callback is called when the codec module needs to send a
59 The get_response callback is called when the codec requires the answer
66 CONFIG_SND_HDA_POWER_SAVE kconfig. It's called when the codec needs
[all …]
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.1.27/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.1.27/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 …]
Dmachine.txt9 The machine driver can contain codec and platform specific code. It registers
23 * after the codec and DAIs do any PM work. */
46 of any machine audio tasks that have to be done before or after the codec, DAIs
52 The machine DAI configuration glues all the codec and CPU DAIs together. It can
54 initialisation e.g. the machine audio map can be connected to the codec audio
55 map, unconnected codec pins can be set as such.
59 /* corgi digital audio interface glue - connects codec <--> CPU */
66 .codec_name = "wm8713-codec.0-001a",
84 The machine driver can optionally extend the codec power map and to become an
/linux-4.1.27/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.1.27/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()
296 struct snd_soc_codec *codec; in cht_suspend_pre() local
298 list_for_each_entry(codec, &card->codec_dev_list, card_list) { in cht_suspend_pre()
299 if (!strcmp(codec->component.name, "i2c-10EC5670:00")) { in cht_suspend_pre()
300 dev_dbg(codec->dev, "disabling jack detect before going to suspend.\n"); in cht_suspend_pre()
301 rt5670_jack_suspend(codec); in cht_suspend_pre()
310 struct snd_soc_codec *codec; in cht_resume_post() local
312 list_for_each_entry(codec, &card->codec_dev_list, card_list) { in cht_resume_post()
[all …]
/linux-4.1.27/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
75 snd_soc_dapm_nc_pin(&codec->dapm, "LINEOUT"); in lowland_wm9081_init()
78 return snd_soc_codec_set_sysclk(codec, WM9081_SYSCLK_MCLK, 0, in lowland_wm9081_init()
/linux-4.1.27/Documentation/devicetree/bindings/sound/
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>;
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";
Dux500-msp.txt19 stericsson,audio-codec = <&codec>;
40 codec: ab8500-codec {
41 compatible = "stericsson,ab8500-codec";
Dmxs-audio-sgtl5000.txt1 * Freescale MXS audio complex with SGTL5000 codec
7 - audio-codec: The phandle of the SGTL5000 audio codec
16 audio-codec = <&sgtl5000>;
/linux-4.1.27/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.1.27/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.1.27/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.1.27/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.1.27/drivers/media/platform/s5p-mfc/
Ds5p_mfc_enc.c1444 p->codec.h264.cpb_size = ctrl->val; in s5p_mfc_enc_s_ctrl()
1461 p->codec.h264.profile = in s5p_mfc_enc_s_ctrl()
1465 p->codec.h264.profile = in s5p_mfc_enc_s_ctrl()
1469 p->codec.h264.profile = in s5p_mfc_enc_s_ctrl()
1474 p->codec.h264.profile = in s5p_mfc_enc_s_ctrl()
1484 p->codec.h264.level_v4l2 = ctrl->val; in s5p_mfc_enc_s_ctrl()
1485 p->codec.h264.level = h264_level(ctrl->val); in s5p_mfc_enc_s_ctrl()
1486 if (p->codec.h264.level < 0) { in s5p_mfc_enc_s_ctrl()
1488 ret = p->codec.h264.level; in s5p_mfc_enc_s_ctrl()
1492 p->codec.mpeg4.level_v4l2 = ctrl->val; in s5p_mfc_enc_s_ctrl()
[all …]

1234