Home
last modified time | relevance | path

Searched refs:codec (Results 1 – 25 of 322) sorted by relevance

12345678910>>...13

/linux-2.6.39/sound/oss/
Dac97_codec.c59 static int ac97_read_mixer(struct ac97_codec *codec, int oss_channel);
60 static void ac97_write_mixer(struct ac97_codec *codec, int oss_channel,
62 static void ac97_set_mixer(struct ac97_codec *codec, unsigned int oss_mixer, unsigned int val );
63 static int ac97_recmask_io(struct ac97_codec *codec, int rw, int mask);
64 static int ac97_mixer_ioctl(struct ac97_codec *codec, unsigned int cmd, unsigned long arg);
66 static int ac97_init_mixer(struct ac97_codec *codec);
68 static int wolfson_init03(struct ac97_codec * codec);
69 static int wolfson_init04(struct ac97_codec * codec);
70 static int wolfson_init05(struct ac97_codec * codec);
71 static int wolfson_init11(struct ac97_codec * codec);
[all …]
/linux-2.6.39/sound/soc/
Dsoc-cache.c23 static unsigned int snd_soc_4_12_read(struct snd_soc_codec *codec, in snd_soc_4_12_read() argument
29 if (reg >= codec->driver->reg_cache_size || in snd_soc_4_12_read()
30 snd_soc_codec_volatile_register(codec, reg) || in snd_soc_4_12_read()
31 codec->cache_bypass) { in snd_soc_4_12_read()
32 if (codec->cache_only) in snd_soc_4_12_read()
35 BUG_ON(!codec->hw_read); in snd_soc_4_12_read()
36 return codec->hw_read(codec, reg); in snd_soc_4_12_read()
39 ret = snd_soc_cache_read(codec, reg, &val); in snd_soc_4_12_read()
45 static int snd_soc_4_12_write(struct snd_soc_codec *codec, unsigned int reg, in snd_soc_4_12_write() argument
54 if (!snd_soc_codec_volatile_register(codec, reg) && in snd_soc_4_12_write()
[all …]
/linux-2.6.39/sound/pci/ali5451/
Dali5451.c168 #define ALI_REG(codec, x) ((codec)->port + x) argument
207 struct snd_ali *codec; member
293 static inline unsigned int snd_ali_5451_peek(struct snd_ali *codec, in snd_ali_5451_peek() argument
296 return (unsigned int)inl(ALI_REG(codec, port)); in snd_ali_5451_peek()
299 static inline void snd_ali_5451_poke(struct snd_ali *codec, in snd_ali_5451_poke() argument
303 outl((unsigned int)val, ALI_REG(codec, port)); in snd_ali_5451_poke()
306 static int snd_ali_codec_ready(struct snd_ali *codec, in snd_ali_codec_ready() argument
315 res = snd_ali_5451_peek(codec,port); in snd_ali_codec_ready()
323 snd_ali_5451_poke(codec, port, res & ~0x8000); in snd_ali_codec_ready()
328 static int snd_ali_stimer_ready(struct snd_ali *codec) in snd_ali_stimer_ready() argument
[all …]
/linux-2.6.39/sound/pci/hda/
Dhda_codec.c93 static void hda_keep_power_on(struct hda_codec *codec);
95 static inline void hda_keep_power_on(struct hda_codec *codec) {} in hda_keep_power_on() argument
172 make_codec_cmd(struct hda_codec *codec, hda_nid_t nid, int direct, in make_codec_cmd() argument
177 if ((codec->addr & ~0xf) || (direct & ~1) || (nid & ~0x7f) || in make_codec_cmd()
180 codec->addr, direct, nid, verb, parm); in make_codec_cmd()
184 val = (u32)codec->addr << 28; in make_codec_cmd()
195 static int codec_exec_verb(struct hda_codec *codec, unsigned int cmd, in codec_exec_verb() argument
198 struct hda_bus *bus = codec->bus; in codec_exec_verb()
207 snd_hda_power_up(codec); in codec_exec_verb()
211 *res = bus->ops.get_response(bus, codec->addr); in codec_exec_verb()
[all …]
Dpatch_ca0110.c51 struct hda_codec *codec, in ca0110_playback_pcm_open() argument
54 struct ca0110_spec *spec = codec->spec; in ca0110_playback_pcm_open()
55 return snd_hda_multi_out_analog_open(codec, &spec->multiout, substream, in ca0110_playback_pcm_open()
60 struct hda_codec *codec, in ca0110_playback_pcm_prepare() argument
65 struct ca0110_spec *spec = codec->spec; in ca0110_playback_pcm_prepare()
66 return snd_hda_multi_out_analog_prepare(codec, &spec->multiout, in ca0110_playback_pcm_prepare()
71 struct hda_codec *codec, in ca0110_playback_pcm_cleanup() argument
74 struct ca0110_spec *spec = codec->spec; in ca0110_playback_pcm_cleanup()
75 return snd_hda_multi_out_analog_cleanup(codec, &spec->multiout); in ca0110_playback_pcm_cleanup()
82 struct hda_codec *codec, in ca0110_dig_playback_pcm_open() argument
[all …]
Dpatch_cirrus.c115 static inline int cs_vendor_coef_get(struct hda_codec *codec, unsigned int idx) in cs_vendor_coef_get() argument
117 snd_hda_codec_write(codec, CS420X_VENDOR_NID, 0, in cs_vendor_coef_get()
119 return snd_hda_codec_read(codec, CS420X_VENDOR_NID, 0, in cs_vendor_coef_get()
123 static inline void cs_vendor_coef_set(struct hda_codec *codec, unsigned int idx, in cs_vendor_coef_set() argument
126 snd_hda_codec_write(codec, CS420X_VENDOR_NID, 0, in cs_vendor_coef_set()
128 snd_hda_codec_write(codec, CS420X_VENDOR_NID, 0, in cs_vendor_coef_set()
140 struct hda_codec *codec, in cs_playback_pcm_open() argument
143 struct cs_spec *spec = codec->spec; in cs_playback_pcm_open()
144 return snd_hda_multi_out_analog_open(codec, &spec->multiout, substream, in cs_playback_pcm_open()
149 struct hda_codec *codec, in cs_playback_pcm_prepare() argument
[all …]
Dpatch_conexant.c124 void (*capture_prepare)(struct hda_codec *codec);
125 void (*capture_cleanup)(struct hda_codec *codec);
141 struct hda_codec *codec, in conexant_playback_pcm_open() argument
144 struct conexant_spec *spec = codec->spec; in conexant_playback_pcm_open()
145 return snd_hda_multi_out_analog_open(codec, &spec->multiout, substream, in conexant_playback_pcm_open()
150 struct hda_codec *codec, in conexant_playback_pcm_prepare() argument
155 struct conexant_spec *spec = codec->spec; in conexant_playback_pcm_prepare()
156 return snd_hda_multi_out_analog_prepare(codec, &spec->multiout, in conexant_playback_pcm_prepare()
162 struct hda_codec *codec, in conexant_playback_pcm_cleanup() argument
165 struct conexant_spec *spec = codec->spec; in conexant_playback_pcm_cleanup()
[all …]
Dhda_proc.c65 struct hda_codec *codec, hda_nid_t nid, in print_nid_array() argument
92 struct hda_codec *codec, hda_nid_t nid) in print_nid_pcms() argument
96 for (pcm = 0; pcm < codec->num_pcms; pcm++) { in print_nid_pcms()
97 cpcm = &codec->pcm_info[pcm]; in print_nid_pcms()
111 struct hda_codec *codec, hda_nid_t nid, int dir) in print_amp_caps() argument
114 caps = snd_hda_param_read(codec, nid, in print_amp_caps()
130 struct hda_codec *codec, hda_nid_t nid, in print_amp_vals() argument
140 val = snd_hda_codec_read(codec, nid, 0, in print_amp_vals()
145 val = snd_hda_codec_read(codec, nid, 0, in print_amp_vals()
186 struct hda_codec *codec, hda_nid_t nid) in print_pcm_caps() argument
[all …]
Dpatch_sigmatel.c593 struct hda_codec *codec = snd_kcontrol_chip(kcontrol); in stac92xx_dmux_enum_info() local
594 struct sigmatel_spec *spec = codec->spec; in stac92xx_dmux_enum_info()
601 struct hda_codec *codec = snd_kcontrol_chip(kcontrol); in stac92xx_dmux_enum_get() local
602 struct sigmatel_spec *spec = codec->spec; in stac92xx_dmux_enum_get()
612 struct hda_codec *codec = snd_kcontrol_chip(kcontrol); in stac92xx_dmux_enum_put() local
613 struct sigmatel_spec *spec = codec->spec; in stac92xx_dmux_enum_put()
616 return snd_hda_input_mux_put(codec, spec->dinput_mux, ucontrol, in stac92xx_dmux_enum_put()
623 struct hda_codec *codec = snd_kcontrol_chip(kcontrol); in stac92xx_smux_enum_info() local
624 struct sigmatel_spec *spec = codec->spec; in stac92xx_smux_enum_info()
631 struct hda_codec *codec = snd_kcontrol_chip(kcontrol); in stac92xx_smux_enum_get() local
[all …]
Dpatch_via.c153 struct hda_codec *codec; member
162 static enum VIA_HDA_CODEC get_codec_type(struct hda_codec *codec);
163 static struct via_spec * via_new_spec(struct hda_codec *codec) in via_new_spec() argument
171 codec->spec = spec; in via_new_spec()
172 spec->codec = codec; in via_new_spec()
173 spec->codec_type = get_codec_type(codec); in via_new_spec()
180 static enum VIA_HDA_CODEC get_codec_type(struct hda_codec *codec) in get_codec_type() argument
182 u32 vendor_id = codec->vendor_id; in get_codec_type()
198 if (snd_hda_param_read(codec, 0x16, AC_PAR_CONNLIST_LEN) == 0x7) in get_codec_type()
247 static void analog_low_current_mode(struct hda_codec *codec, int stream_idle);
[all …]
/linux-2.6.39/drivers/media/video/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 …]
/linux-2.6.39/sound/soc/codecs/
Dwm8961.c294 static int wm8961_volatile_register(struct snd_soc_codec *codec, unsigned int reg) in wm8961_volatile_register() argument
307 static int wm8961_reset(struct snd_soc_codec *codec) in wm8961_reset() argument
309 return snd_soc_write(codec, WM8961_SOFTWARE_RESET, 0); in wm8961_reset()
319 struct snd_soc_codec *codec = w->codec; in wm8961_hp_event() local
320 u16 hp_reg = snd_soc_read(codec, WM8961_ANALOGUE_HP_0); in wm8961_hp_event()
321 u16 cp_reg = snd_soc_read(codec, WM8961_CHARGE_PUMP_1); in wm8961_hp_event()
322 u16 pwr_reg = snd_soc_read(codec, WM8961_PWR_MGMT_2); in wm8961_hp_event()
323 u16 dcs_reg = snd_soc_read(codec, WM8961_DC_SERVO_1); in wm8961_hp_event()
329 snd_soc_write(codec, WM8961_ANALOGUE_HP_0, hp_reg); in wm8961_hp_event()
333 snd_soc_write(codec, WM8961_CHARGE_PUMP_1, cp_reg); in wm8961_hp_event()
[all …]
Dtlv320dac33.c94 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()
206 dev_err(codec->dev, "Read failed (%d)\n", val); in dac33_read()
207 value[0] = dac33_read_reg_cache(codec, reg); in dac33_read()
[all …]
Dtlv320aic32x4.c265 static inline int aic32x4_change_page(struct snd_soc_codec *codec, in aic32x4_change_page() argument
268 struct aic32x4_priv *aic32x4 = snd_soc_codec_get_drvdata(codec); in aic32x4_change_page()
275 ret = codec->hw_write(codec->control_data, data, 2); in aic32x4_change_page()
284 static int aic32x4_write(struct snd_soc_codec *codec, unsigned int reg, in aic32x4_write() argument
287 struct aic32x4_priv *aic32x4 = snd_soc_codec_get_drvdata(codec); in aic32x4_write()
295 return aic32x4_change_page(codec, val); in aic32x4_write()
298 ret = aic32x4_change_page(codec, page); in aic32x4_write()
306 if (codec->hw_write(codec->control_data, data, 2) == 2) in aic32x4_write()
312 static unsigned int aic32x4_read(struct snd_soc_codec *codec, unsigned int reg) in aic32x4_read() argument
314 struct aic32x4_priv *aic32x4 = snd_soc_codec_get_drvdata(codec); in aic32x4_read()
[all …]
Dwm8960.c106 static int wm8960_set_deemph(struct snd_soc_codec *codec) in wm8960_set_deemph() argument
108 struct wm8960_priv *wm8960 = snd_soc_codec_get_drvdata(codec); in wm8960_set_deemph()
127 dev_dbg(codec->dev, "Set deemphasis %d\n", val); in wm8960_set_deemph()
129 return snd_soc_update_bits(codec, WM8960_DACCTL1, in wm8960_set_deemph()
136 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); in wm8960_get_deemph() local
137 struct wm8960_priv *wm8960 = snd_soc_codec_get_drvdata(codec); in wm8960_get_deemph()
146 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); in wm8960_put_deemph() local
147 struct wm8960_priv *wm8960 = snd_soc_codec_get_drvdata(codec); in wm8960_put_deemph()
155 return wm8960_set_deemph(codec); in wm8960_put_deemph()
386 static int wm8960_add_widgets(struct snd_soc_codec *codec) in wm8960_add_widgets() argument
[all …]
Dwm8900.c183 static int wm8900_volatile_register(struct snd_soc_codec *codec, unsigned int reg) in wm8900_volatile_register() argument
193 static void wm8900_reset(struct snd_soc_codec *codec) in wm8900_reset() argument
195 snd_soc_write(codec, WM8900_REG_RESET, 0); in wm8900_reset()
197 memcpy(codec->reg_cache, wm8900_reg_defaults, in wm8900_reset()
204 struct snd_soc_codec *codec = w->codec; in wm8900_hp_event() local
205 u16 hpctl1 = snd_soc_read(codec, WM8900_REG_HPCTL1); in wm8900_hp_event()
212 snd_soc_write(codec, WM8900_REG_HPCTL1, hpctl1); in wm8900_hp_event()
221 snd_soc_write(codec, WM8900_REG_HPCTL1, hpctl1); in wm8900_hp_event()
228 snd_soc_write(codec, WM8900_REG_HPCTL1, hpctl1); in wm8900_hp_event()
232 snd_soc_write(codec, WM8900_REG_HPCTL1, hpctl1); in wm8900_hp_event()
[all …]
Dwm8804.c75 struct snd_soc_codec *codec; member
96 wm8804->codec->cache_sync = 1; \
116 struct snd_soc_codec *codec; in txsrc_get() local
119 codec = snd_kcontrol_chip(kcontrol); in txsrc_get()
120 src = snd_soc_read(codec, WM8804_SPDTX4); in txsrc_get()
132 struct snd_soc_codec *codec; in txsrc_put() local
135 codec = snd_kcontrol_chip(kcontrol); in txsrc_put()
141 src = snd_soc_read(codec, WM8804_SPDTX4); in txsrc_put()
154 txpwr = snd_soc_read(codec, WM8804_PWRDN) & 0x4; in txsrc_put()
156 snd_soc_update_bits(codec, WM8804_PWRDN, 0x4, 0x4); in txsrc_put()
[all …]
Dwm8962.c53 struct snd_soc_codec *codec; member
93 wm8962->codec->cache_sync = 1; \
1941 static int wm8962_volatile_register(struct snd_soc_codec *codec, unsigned int reg) in wm8962_volatile_register() argument
1949 static int wm8962_readable_register(struct snd_soc_codec *codec, unsigned int reg) in wm8962_readable_register() argument
1957 static int wm8962_reset(struct snd_soc_codec *codec) in wm8962_reset() argument
1959 return snd_soc_write(codec, WM8962_SOFTWARE_RESET, 0x6243); in wm8962_reset()
1991 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); in wm8962_put_hp_sw() local
1992 u16 *reg_cache = codec->reg_cache; in wm8962_put_hp_sw()
2002 return snd_soc_write(codec, WM8962_HPOUTL_VOLUME, in wm8962_put_hp_sw()
2007 return snd_soc_write(codec, WM8962_HPOUTR_VOLUME, in wm8962_put_hp_sw()
[all …]
Dda7210.c194 static inline u32 da7210_read_reg_cache(struct snd_soc_codec *codec, u32 reg) in da7210_read_reg_cache() argument
196 u8 *cache = codec->reg_cache; in da7210_read_reg_cache()
204 static int da7210_write(struct snd_soc_codec *codec, u32 reg, u32 value) in da7210_write() argument
206 u8 *cache = codec->reg_cache; in da7210_write()
209 BUG_ON(codec->driver->volatile_register); in da7210_write()
214 if (reg >= codec->driver->reg_cache_size) in da7210_write()
217 if (2 != codec->hw_write(codec->control_data, data, 2)) in da7210_write()
227 static inline u32 da7210_read(struct snd_soc_codec *codec, u32 reg) in da7210_read() argument
230 return i2c_smbus_read_byte_data(codec->control_data, reg); in da7210_read()
232 return da7210_read_reg_cache(codec, reg); in da7210_read()
[all …]
Dwm8770.c53 struct snd_soc_codec *codec; member
74 wm8770->codec->cache_sync = 1; \
277 struct snd_soc_codec *codec; in vout12supply_event() local
279 codec = w->codec; in vout12supply_event()
283 snd_soc_update_bits(codec, WM8770_OUTMUX1, 0x180, 0); in vout12supply_event()
286 snd_soc_update_bits(codec, WM8770_OUTMUX1, 0x180, 0x180); in vout12supply_event()
296 struct snd_soc_codec *codec; in vout34supply_event() local
298 codec = w->codec; in vout34supply_event()
302 snd_soc_update_bits(codec, WM8770_OUTMUX2, 0x180, 0); in vout34supply_event()
305 snd_soc_update_bits(codec, WM8770_OUTMUX2, 0x180, 0x180); in vout34supply_event()
[all …]
Dwm8753.c58 static int wm8753_hifi_write_dai_fmt(struct snd_soc_codec *codec,
60 static int wm8753_voice_write_dai_fmt(struct snd_soc_codec *codec,
178 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); in wm8753_get_dai() local
179 struct wm8753_priv *wm8753 = snd_soc_codec_get_drvdata(codec); in wm8753_get_dai()
188 struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); in wm8753_set_dai() local
189 struct wm8753_priv *wm8753 = snd_soc_codec_get_drvdata(codec); in wm8753_set_dai()
192 if (codec->active) in wm8753_set_dai()
195 ioctl = snd_soc_read(codec, WM8753_IOCTL); in wm8753_set_dai()
203 snd_soc_write(codec, WM8753_IOCTL, ioctl); in wm8753_set_dai()
206 wm8753_hifi_write_dai_fmt(codec, wm8753->hifi_fmt); in wm8753_set_dai()
[all …]
Dwm8904.c599 static int wm8904_volatile_register(struct snd_soc_codec *codec, unsigned int reg) in wm8904_volatile_register() argument
604 static int wm8904_reset(struct snd_soc_codec *codec) in wm8904_reset() argument
606 return snd_soc_write(codec, WM8904_SW_RESET_AND_ID, 0); in wm8904_reset()
609 static int wm8904_configure_clocking(struct snd_soc_codec *codec) in wm8904_configure_clocking() argument
611 struct wm8904_priv *wm8904 = snd_soc_codec_get_drvdata(codec); in wm8904_configure_clocking()
615 clock2 = snd_soc_read(codec, WM8904_CLOCK_RATES_2); in wm8904_configure_clocking()
616 snd_soc_update_bits(codec, WM8904_CLOCK_RATES_2, in wm8904_configure_clocking()
622 dev_dbg(codec->dev, "Using %dHz MCLK\n", wm8904->mclk_rate); in wm8904_configure_clocking()
628 snd_soc_update_bits(codec, WM8904_FLL_CONTROL_1, in wm8904_configure_clocking()
633 dev_dbg(codec->dev, "Using %dHz FLL clock\n", in wm8904_configure_clocking()
[all …]
Dtlv320aic3x.c74 struct snd_soc_codec *codec; member
131 static int aic3x_read(struct snd_soc_codec *codec, unsigned int reg, in aic3x_read() argument
134 u8 *cache = codec->reg_cache; in aic3x_read()
136 if (codec->cache_only) in aic3x_read()
141 *value = codec->hw_read(codec, reg); in aic3x_read()
184 mutex_lock(&widget->codec->mutex); in snd_soc_dapm_put_volsw_aic3x()
186 if (snd_soc_test_bits(widget->codec, reg, val_mask, val)) { in snd_soc_dapm_put_volsw_aic3x()
207 ret = snd_soc_update_bits(widget->codec, reg, val_mask, val); in snd_soc_dapm_put_volsw_aic3x()
209 mutex_unlock(&widget->codec->mutex); in snd_soc_dapm_put_volsw_aic3x()
790 static int aic3x_add_widgets(struct snd_soc_codec *codec) in aic3x_add_widgets() argument
[all …]
Dtwl6040.c89 struct snd_soc_codec *codec; member
212 static inline unsigned int twl6040_read_reg_cache(struct snd_soc_codec *codec, in twl6040_read_reg_cache() argument
215 u8 *cache = codec->reg_cache; in twl6040_read_reg_cache()
226 static inline void twl6040_write_reg_cache(struct snd_soc_codec *codec, in twl6040_write_reg_cache() argument
229 u8 *cache = codec->reg_cache; in twl6040_write_reg_cache()
239 static int twl6040_read_reg_volatile(struct snd_soc_codec *codec, in twl6040_read_reg_volatile() argument
248 twl6040_write_reg_cache(codec, reg, value); in twl6040_read_reg_volatile()
256 static int twl6040_write(struct snd_soc_codec *codec, in twl6040_write() argument
262 twl6040_write_reg_cache(codec, reg, value); in twl6040_write()
266 static void twl6040_init_vio_regs(struct snd_soc_codec *codec) in twl6040_init_vio_regs() argument
[all …]
Dwm8711.c92 static int wm8711_add_widgets(struct snd_soc_codec *codec) in wm8711_add_widgets() argument
94 struct snd_soc_dapm_context *dapm = &codec->dapm; in wm8711_add_widgets()
162 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) & 0xfffc; 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
[all …]

12345678910>>...13