Projectname large_stringclasses 15
values | Filepath large_stringlengths 4 106 ⌀ | Function large_stringlengths 11 3.45k | Label list |
|---|---|---|---|
Linux Kernel | sound/pci/hda/patch_ca0132.c | static void ca0132_mmio_init_ae5(struct hda_codec *codec) {
struct ca0132_spec *spec = codec->spec;
const unsigned int *addr, *data;
unsigned int i, count;
addr = ca0113_mmio_init_address_ae5;
data = ca0113_mmio_init_data_ae5;
count = ARRAY_SIZE(ca0113_mmio_init_data_ae5);
if (ca0132_quirk(spec) == QUIR... | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_ca0132.c |
static void ca0132_mmio_init(struct hda_codec *codec) {
struct ca0132_spec *spec = codec->spec;
switch (ca0132_quirk(spec)) {
case QUIRK_R3D:
case QUIRK_SBZ:
case QUIRK_ZXR:
ca0132_mmio_init_sbz(codec);
break;
case QUIRK_AE5:
ca0132_mmio_init_ae5(codec);
break;
default:
break;
}
} | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_ca0132.c |
static void dbpro_free(struct hda_codec *codec) {
struct ca0132_spec *spec = codec->spec;
zxr_dbpro_power_state_shutdown(codec);
kfree(spec->spec_init_verbs);
kfree(codec->spec);
} | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_cirrus.c |
static inline int cs_vendor_coef_get(struct hda_codec *codec,
unsigned int idx) {
struct cs_spec *spec = codec->spec;
snd_hda_codec_write(codec, spec->vendor_nid, 0, AC_VERB_SET_COEF_INDEX, idx);
return snd_hda_codec_read(codec, spec->vendor_nid, 0, AC_VERB_GET_PROC_COEF,
... | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_cirrus.c | static void cs_automute(struct hda_codec *codec) {
struct cs_spec *spec = codec->spec;
spec->gen.master_mute = !!(spec->spdif_present && spec->sense_b);
snd_hda_gen_update_outputs(codec);
if (spec->gpio_eapd_hp || spec->gpio_eapd_speaker) {
if (spec->gen.automute_speaker)
spec->gpio_data = spec->ge... | [
1,
0
] |
Linux Kernel | sound/pci/hda/patch_cirrus.c | static void init_input_coef(struct hda_codec *codec) {
struct cs_spec *spec = codec->spec;
unsigned int coef;
if (spec->vendor_nid == CS420X_VENDOR_NID) {
coef = cs_vendor_coef_get(codec, IDX_BEEP_CFG);
if (is_active_pin(codec, CS_DMIC2_PIN_NID))
coef |= 1 << 4; /* DMIC2 2 chan on, GPIO1 off */
... | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_cirrus.c |
static int cs_build_controls(struct hda_codec *codec) {
int err;
err = snd_hda_gen_build_controls(codec);
if (err < 0)
return err;
snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_BUILD);
return 0;
} | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_cirrus.c |
static int patch_cs420x(struct hda_codec *codec) {
struct cs_spec *spec;
int err;
spec = cs_alloc_spec(codec, CS420X_VENDOR_NID);
if (!spec)
return -ENOMEM;
codec->patch_ops = cs_patch_ops;
spec->gen.automute_hook = cs_automute;
codec->single_adc_amp = 1;
snd_hda_pick_fixup(codec, cs420x_models,... | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_cirrus.c | static void cs4208_fix_amp_caps(struct hda_codec *codec, hda_nid_t adc) {
unsigned int caps;
caps = query_amp_caps(codec, adc, HDA_INPUT);
caps &= ~(AC_AMPCAP_OFFSET);
caps |= 0x02;
snd_hda_override_amp_caps(codec, adc, HDA_INPUT, caps);
} | [
1,
0
] |
Linux Kernel | sound/pci/hda/patch_cirrus.c | static void cs421x_fixup_sense_b(struct hda_codec *codec,
const struct hda_fixup *fix, int action) {
struct cs_spec *spec = codec->spec;
if (action == HDA_FIXUP_ACT_PRE_PROBE)
spec->sense_b = 1;
} | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_cirrus.c |
static int patch_cs4213(struct hda_codec *codec) {
struct cs_spec *spec;
int err;
spec = cs_alloc_spec(codec, CS4213_VENDOR_NID);
if (!spec)
return -ENOMEM;
codec->patch_ops = cs421x_patch_ops;
err = cs421x_parse_auto_config(codec);
if (err < 0)
goto error;
return 0;
error:
cs_free(codec... | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_cmedia.c |
static int patch_cmi9880(struct hda_codec *codec) {
struct cmi_spec *spec;
struct auto_pin_cfg *cfg;
int err;
spec = kzalloc(sizeof(*spec), GFP_KERNEL);
if (spec == NULL)
return -ENOMEM;
codec->spec = spec;
codec->patch_ops = cmi_auto_patch_ops;
cfg = &spec->gen.autocfg;
snd_hda_gen_spec_init(&... | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_cmedia.c | static int patch_cmi8888(struct hda_codec *codec) {
struct cmi_spec *spec;
struct auto_pin_cfg *cfg;
int err;
spec = kzalloc(sizeof(*spec), GFP_KERNEL);
if (!spec)
return -ENOMEM;
codec->spec = spec;
codec->patch_ops = cmi_auto_patch_ops;
cfg = &spec->gen.autocfg;
snd_hda_gen_spec_init(&spec->ge... | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_conexant.c |
static int set_beep_amp(struct conexant_spec *spec, hda_nid_t nid, int idx,
int dir) {
struct snd_kcontrol_new *knew;
unsigned int beep_amp = HDA_COMPOSE_AMP_VAL(nid, 1, idx, dir);
int i;
spec->gen.beep_nid = nid;
for (i = 0; i < ARRAY_SIZE(cxt_beep_mixer); i++) {
knew = snd_hda_... | [
1,
0
] |
Linux Kernel | sound/pci/hda/patch_conexant.c | static void cx_auto_parse_eapd(struct hda_codec *codec) {
struct conexant_spec *spec = codec->spec;
hda_nid_t nid;
for_each_hda_codec_node(nid, codec) {
if (get_wcaps_type(get_wcaps(codec, nid)) != AC_WID_PIN)
continue;
if (!(snd_hda_query_pin_caps(codec, nid) & AC_PINCAP_EAPD))
continue;
... | [
1,
0
] |
Linux Kernel | sound/pci/hda/patch_conexant.c | static void cx_auto_shutdown(struct hda_codec *codec) {
struct conexant_spec *spec = codec->spec;
cx_auto_turn_eapd(codec, spec->num_eapds, spec->eapds, false);
} | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_conexant.c | static void cxt_update_headset_mode(struct hda_codec *codec) {
int i;
bool mic_mode = false;
struct conexant_spec *spec = codec->spec;
struct auto_pin_cfg *cfg = &spec->gen.autocfg;
hda_nid_t mux_pin = spec->gen.imux_pins[spec->gen.cur_mux[0]];
for (i = 0; i < cfg->num_inputs; i++)
if (cfg->inputs[i]... | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_conexant.c |
static void cxt_fixup_headphone_mic(struct hda_codec *codec,
const struct hda_fixup *fix, int action) {
struct conexant_spec *spec = codec->spec;
switch (action) {
case HDA_FIXUP_ACT_PRE_PROBE:
spec->parse_flags |= HDA_PINCFG_HEADPHONE_MIC;
snd_hdac_regmap_add_vendor_... | [
1,
0
] |
Linux Kernel | sound/pci/hda/patch_conexant.c |
static void olpc_xo_update_mic_boost(struct hda_codec *codec) {
struct conexant_spec *spec = codec->spec;
int ch, val;
for (ch = 0; ch < 2; ch++) {
val = AC_AMP_SET_OUTPUT | (ch ? AC_AMP_SET_RIGHT : AC_AMP_SET_LEFT);
if (!spec->dc_enable)
val |= snd_hda_codec_amp_read(codec, 0x17, ch, HDA_OUTPUT, ... | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_conexant.c |
static int olpc_xo_dc_bias_enum_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol) {
struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
struct conexant_spec *spec = codec->spec;
ucontrol->value.enumerated.item[0] = spec->dc_input_bias;
return 0;
} | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_conexant.c | static int olpc_xo_mic_boost_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol) {
struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
struct conexant_spec *spec = codec->spec;
int ret = snd_hda_mixer_amp_volume_put(kcontrol, ucontrol);
if (ret > 0 && spec... | [
1,
0
] |
Linux Kernel | sound/pci/hda/patch_conexant.c | static void cxt_fixup_olpc_xo(struct hda_codec *codec,
const struct hda_fixup *fix, int action) {
struct conexant_spec *spec = codec->spec;
struct snd_kcontrol_new *kctl;
int i;
if (action != HDA_FIXUP_ACT_PROBE)
return;
spec->gen.mic_autoswitch_hook = olpc_xo_automic;
sp... | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_conexant.c |
static void cxt_fixup_mute_led_eapd(struct hda_codec *codec,
const struct hda_fixup *fix, int action) {
struct conexant_spec *spec = codec->spec;
if (action == HDA_FIXUP_ACT_PRE_PROBE) {
spec->mute_led_eapd = 0x1b;
spec->dynamic_eapd = true;
snd_hda_gen_add_mute_led... | [
1,
0
] |
Linux Kernel | sound/pci/hda/patch_conexant.c | static int cxt_gpio_mute_update(struct led_classdev *led_cdev,
enum led_brightness brightness) {
struct hda_codec *codec = dev_to_hda_codec(led_cdev->dev->parent);
struct conexant_spec *spec = codec->spec;
cxt_update_gpio_led(codec, spec->gpio_mute_led_mask, brightness);
return ... | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_cs8409.c | static void cs8409_disable_i2c_clock(struct hda_codec *codec) {
struct cs8409_spec *spec = codec->spec;
mutex_lock(&spec->i2c_mux);
if (spec->i2c_clck_enabled) {
cs8409_vendor_coef_set(spec->codec, 0x0,
cs8409_vendor_coef_get(spec->codec, 0x0) &
0xfff... | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_cs8409.c | static int cs8409_i2c_wait_complete(struct hda_codec *codec) {
unsigned int retval;
return read_poll_timeout(cs8409_vendor_coef_get, retval, retval & 0x18,
CS42L42_I2C_SLEEP_US, CS42L42_I2C_TIMEOUT_US, false,
codec, CS8409_I2C_STS);
} | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_cs8409.c |
static int cs8409_build_controls(struct hda_codec *codec) {
int err;
err = snd_hda_gen_build_controls(codec);
if (err < 0)
return err;
snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_BUILD);
return 0;
} | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_cs8409.c | static void cs8409_fix_caps(struct hda_codec *codec, unsigned int nid) {
int caps;
caps = snd_hdac_read_parm(&codec->core, nid, AC_PAR_PIN_CAP);
if (caps >= 0)
snd_hdac_override_parm(
&codec->core, nid, AC_PAR_PIN_CAP,
(caps | (AC_PINCAP_IMP_SENSE | AC_PINCAP_PRES_DETECT)));
snd_hda_overri... | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_cs8409.c |
static int cs8409_spk_sw_gpio_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol) {
struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
struct cs8409_spec *spec = codec->spec;
ucontrol->value.integer.value[0] =
!!(spec->gpio_data & spec->speaker_pdn... | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_cs8409.c |
static void cs42l42_playback_pcm_hook(struct hda_pcm_stream *hinfo,
struct hda_codec *codec,
struct snd_pcm_substream *substream,
int action) {
struct cs8409_spec *spec = codec->spec;
struct sub_codec ... | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_cs8409.c | static int cs8409_cs42l42_exec_verb(struct hdac_device *dev, unsigned int cmd,
unsigned int flags, unsigned int *res) {
struct hda_codec *codec = container_of(dev, struct hda_codec, core);
struct cs8409_spec *spec = codec->spec;
struct sub_codec *cs42l42 = spec->scodecs[CS8409_... | [
1,
0
] |
Linux Kernel | sound/pci/hda/patch_cs8409.c | static void dolphin_hw_init(struct hda_codec *codec) {
const struct cs8409_cir_param *seq = dolphin_hw_cfg;
struct cs8409_spec *spec = codec->spec;
struct sub_codec *cs42l42;
int i;
if (spec->gpio_mask) {
snd_hda_codec_write(codec, CS8409_PIN_AFG, 0, AC_VERB_SET_GPIO_MASK,
spec->g... | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_hdmi.c |
static int hinfo_to_pcm_index(struct hda_codec *codec,
struct hda_pcm_stream *hinfo) {
struct hdmi_spec *spec = codec->spec;
int pcm_idx;
for (pcm_idx = 0; pcm_idx < spec->pcm_used; pcm_idx++)
if (get_pcm_rec(spec, pcm_idx)->stream == hinfo)
return pcm_idx;
codec_warn(... | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_hdmi.c |
static int hinfo_to_pin_index(struct hda_codec *codec,
struct hda_pcm_stream *hinfo) {
struct hdmi_spec *spec = codec->spec;
struct hdmi_spec_per_pin *per_pin;
int pin_idx;
for (pin_idx = 0; pin_idx < spec->num_pins; pin_idx++) {
per_pin = get_pin(spec, pin_idx);
if (per_... | [
1,
0
] |
Linux Kernel | sound/pci/hda/patch_hdmi.c |
static struct hdmi_spec_per_pin *pcm_idx_to_pin(struct hdmi_spec *spec,
int pcm_idx) {
int i;
struct hdmi_spec_per_pin *per_pin;
for (i = 0; i < spec->num_pins; i++) {
per_pin = get_pin(spec, i);
if (per_pin->pcm_idx == pcm_idx)
return per_pin;
}
... | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_hdmi.c | static int hdmi_eld_ctl_get(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol) {
struct hda_codec *codec = snd_kcontrol_chip(kcontrol);
struct hdmi_spec *spec = codec->spec;
struct hdmi_spec_per_pin *per_pin;
struct hdmi_eld *eld;
int pcm_idx;
int err = 0;
pcm... | [
1,
0
] |
Linux Kernel | sound/pci/hda/patch_hdmi.c | static void hdmi_get_dip_index(struct hda_codec *codec, hda_nid_t pin_nid,
int *packet_index, int *byte_index) {
int val;
val = snd_hda_codec_read(codec, pin_nid, 0, AC_VERB_GET_HDMI_DIP_INDEX, 0);
*packet_index = val >> 5;
*byte_index = val & 0x1f;
}
#endif | [
1,
0
] |
Linux Kernel | sound/pci/hda/patch_hdmi.c |
static void hdmi_set_dip_index(struct hda_codec *codec, hda_nid_t pin_nid,
int packet_index, int byte_index) {
int val;
val = (packet_index << 5) | (byte_index & 0x1f);
snd_hda_codec_write(codec, pin_nid, 0, AC_VERB_SET_HDMI_DIP_INDEX, val);
} | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_hdmi.c | static void hdmi_init_pin(struct hda_codec *codec, hda_nid_t pin_nid) {
struct hdmi_spec *spec = codec->spec;
int pin_out;
if (get_wcaps(codec, pin_nid) & AC_WCAP_OUT_AMP)
snd_hda_codec_write(codec, pin_nid, 0, AC_VERB_SET_AMP_GAIN_MUTE,
AMP_OUT_UNMUTE);
if (spec->dyn_pin_out)
... | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_hdmi.c | static void print_eld_info(struct snd_info_entry *entry,
struct snd_info_buffer *buffer) {
struct hdmi_spec_per_pin *per_pin = entry->private_data;
mutex_lock(&per_pin->lock);
snd_hdmi_print_eld_info(&per_pin->sink_eld, buffer, per_pin->pin_nid,
per_pin->dev_i... | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_hdmi.c |
static void eld_proc_free(struct hdmi_spec_per_pin *per_pin) {
if (!per_pin->codec->bus->shutdown) {
snd_info_free_entry(per_pin->proc_entry);
per_pin->proc_entry = NULL;
}
}
#else | [
1,
0
] |
Linux Kernel | sound/pci/hda/patch_hdmi.c | static void hdmi_stop_infoframe_trans(struct hda_codec *codec,
hda_nid_t pin_nid) {
hdmi_set_dip_index(codec, pin_nid, 0x0, 0x0);
snd_hda_codec_write(codec, pin_nid, 0, AC_VERB_SET_HDMI_DIP_XMIT,
AC_DIPXMIT_DISABLE);
} | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_hdmi.c | static void hdmi_clear_dip_buffers(struct hda_codec *codec, hda_nid_t pin_nid) {
#ifdef BE_PARANOID
int i, j;
int size;
int pi, bi;
for (i = 0; i < 8; i++) {
size = snd_hda_codec_read(codec, pin_nid, 0, AC_VERB_GET_HDMI_DIP_SIZE, i);
if (size == 0)
continue;
hdmi_set_dip_index(codec, pin_nid,... | [
1,
0
] |
Linux Kernel | sound/pci/hda/patch_hdmi.c |
static void
hdmi_checksum_audio_infoframe(struct hdmi_audio_infoframe *hdmi_ai) {
u8 *bytes = (u8 *)hdmi_ai;
u8 sum = 0;
int i;
hdmi_ai->checksum = 0;
for (i = 0; i < sizeof(*hdmi_ai); i++)
sum += bytes[i];
hdmi_ai->checksum = -sum;
} | [
1,
0
] |
Linux Kernel | sound/pci/hda/patch_hdmi.c | static void hdmi_fill_audio_infoframe(struct hda_codec *codec,
hda_nid_t pin_nid, u8 *dip, int size) {
int i;
hdmi_debug_dip_size(codec, pin_nid);
hdmi_clear_dip_buffers(codec, pin_nid);
hdmi_set_dip_index(codec, pin_nid, 0x0, 0x0);
for (i = 0; i < size; i++)
hdmi_w... | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_hdmi.c |
static bool hdmi_infoframe_uptodate(struct hda_codec *codec, hda_nid_t pin_nid,
u8 *dip, int size) {
u8 val;
int i;
hdmi_set_dip_index(codec, pin_nid, 0x0, 0x0);
if (snd_hda_codec_read(codec, pin_nid, 0, AC_VERB_GET_HDMI_DIP_XMIT, 0) !=
AC_DIPXMIT_BEST)
return fal... | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_hdmi.c |
static int hdmi_pin_get_eld(struct hda_codec *codec, hda_nid_t nid, int dev_id,
unsigned char *buf, int *eld_size) {
snd_hda_set_dev_select(codec, nid, dev_id);
return snd_hdmi_get_eld(codec, nid, buf, eld_size);
} | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_hdmi.c |
static void hdmi_intrinsic_event(struct hda_codec *codec, unsigned int res,
struct hda_jack_tbl *jack) {
jack->jack_dirty = 1;
codec_dbg(codec,
"HDMI hot plug event: Codec=%d NID=0x%x Device=%d Inactive=%d "
"Presence_Detect=%d ELD_Valid=%d\n",
... | [
1,
0
] |
Linux Kernel | sound/pci/hda/patch_hdmi.c | static int hdmi_choose_cvt(struct hda_codec *codec, int pin_idx, int *cvt_id,
bool silent) {
struct hdmi_spec *spec = codec->spec;
struct hdmi_spec_per_pin *per_pin;
struct hdmi_spec_per_cvt *per_cvt = NULL;
int cvt_idx, mux_idx = 0;
if (pin_idx < 0)
per_pin = NULL;
else
... | [
1,
0
] |
Linux Kernel | sound/pci/hda/patch_hdmi.c | static void pin_cvt_fixup(struct hda_codec *codec,
struct hdmi_spec_per_pin *per_pin,
hda_nid_t cvt_nid) {
struct hdmi_spec *spec = codec->spec;
if (spec->ops.pin_cvt_fixup)
spec->ops.pin_cvt_fixup(codec, per_pin, cvt_nid);
} | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_hdmi.c | static void hdmi_detach_hda_pcm(struct hdmi_spec *spec,
struct hdmi_spec_per_pin *per_pin) {
int idx;
if (!per_pin->pcm)
return;
idx = per_pin->pcm_idx;
per_pin->pcm_idx = -1;
per_pin->pcm = NULL;
if (idx >= 0 && idx < spec->pcm_used)
clear_bit(idx, &spec->pcm_bitmap... | [
1,
0
] |
Linux Kernel | sound/pci/hda/patch_hdmi.c |
static void hdmi_pcm_reset_pin(struct hdmi_spec *spec,
struct hdmi_spec_per_pin *per_pin) {
if (per_pin->pcm_idx >= 0 && per_pin->pcm_idx < spec->pcm_used)
snd_hda_spdif_ctls_unassign(per_pin->codec, per_pin->pcm_idx);
per_pin->chmap_set = false;
memset(per_pin->chmap, 0, size... | [
1,
0
] |
Linux Kernel | sound/pci/hda/patch_hdmi.c |
static struct snd_jack *pin_idx_to_pcm_jack(struct hda_codec *codec,
struct hdmi_spec_per_pin *per_pin) {
struct hdmi_spec *spec = codec->spec;
if (per_pin->pcm_idx >= 0)
return spec->pcm_rec[per_pin->pcm_idx].jack;
else
return NULL;
} | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_hdmi.c | static void silent_stream_disable(struct hda_codec *codec,
struct hdmi_spec_per_pin *per_pin) {
struct hdmi_spec *spec = codec->spec;
struct hdmi_spec_per_cvt *per_cvt;
int cvt_idx, err;
err = snd_hda_power_up_pm(codec);
if (err < 0 && err != -EACCES) {
codec_err(codec,
... | [
1,
0
] |
Linux Kernel | sound/pci/hda/patch_hdmi.c |
static void hdmi_present_sense(struct hdmi_spec_per_pin *per_pin, int repoll) {
struct hda_codec *codec = per_pin->codec;
if (!codec_has_acomp(codec))
hdmi_present_sense_via_verbs(per_pin, repoll);
else
sync_eld_via_acomp(codec, per_pin);
} | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_hdmi.c |
static void hdmi_repoll_eld(struct work_struct *work) {
struct hdmi_spec_per_pin *per_pin =
container_of(to_delayed_work(work), struct hdmi_spec_per_pin, work);
struct hda_codec *codec = per_pin->codec;
struct hdmi_spec *spec = codec->spec;
struct hda_jack_tbl *jack;
jack = snd_hda_jack_tbl_get_mst(co... | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_hdmi.c |
static int hdmi_add_cvt(struct hda_codec *codec, hda_nid_t cvt_nid) {
struct hdmi_spec *spec = codec->spec;
struct hdmi_spec_per_cvt *per_cvt;
unsigned int chans;
int err;
chans = get_wcaps(codec, cvt_nid);
chans = get_wcaps_channels(chans);
per_cvt = snd_array_new(&spec->cvts);
if (!per_cvt)
ret... | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_hdmi.c |
static int
generic_hdmi_playback_pcm_cleanup(struct hda_pcm_stream *hinfo,
struct hda_codec *codec,
struct snd_pcm_substream *substream) {
snd_hda_codec_cleanup_stream(codec, hinfo->nid);
return 0;
} | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_hdmi.c |
static int hdmi_get_spk_alloc(struct hdac_device *hdac, int pcm_idx) {
struct hda_codec *codec = hdac_to_hda_codec(hdac);
struct hdmi_spec *spec = codec->spec;
struct hdmi_spec_per_pin *per_pin = pcm_idx_to_pin(spec, pcm_idx);
if (!per_pin)
return 0;
return per_pin->sink_eld.info.spk_alloc;
} | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_hdmi.c |
static void hdmi_set_chmap(struct hdac_device *hdac, int pcm_idx,
unsigned char *chmap, int prepared) {
struct hda_codec *codec = hdac_to_hda_codec(hdac);
struct hdmi_spec *spec = codec->spec;
struct hdmi_spec_per_pin *per_pin = pcm_idx_to_pin(spec, pcm_idx);
if (!per_pin)
retur... | [
1,
0
] |
Linux Kernel | sound/pci/hda/patch_hdmi.c |
static void free_hdmi_jack_priv(struct snd_jack *jack) {
struct hdmi_pcm *pcm = jack->private_data;
pcm->jack = NULL;
} | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_hdmi.c |
static int generic_hdmi_build_jack(struct hda_codec *codec, int pcm_idx) {
char hdmi_str[32] = "HDMI/DP";
struct hdmi_spec *spec = codec->spec;
struct snd_jack *jack;
int pcmdev = get_pcm_rec(spec, pcm_idx)->device;
int err;
if (pcmdev > 0)
sprintf(hdmi_str + strlen(hdmi_str), ",pcm=%d", pcmdev);
e... | [
1,
0
] |
Linux Kernel | sound/pci/hda/patch_hdmi.c | static int generic_hdmi_build_controls(struct hda_codec *codec) {
struct hdmi_spec *spec = codec->spec;
int dev, err;
int pin_idx, pcm_idx;
for (pcm_idx = 0; pcm_idx < spec->pcm_used; pcm_idx++) {
if (!get_pcm_rec(spec, pcm_idx)->pcm) {
set_bit(pcm_idx, &spec->pcm_bitmap);
continue;
}
... | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_hdmi.c |
static int generic_hdmi_init(struct hda_codec *codec) {
struct hdmi_spec *spec = codec->spec;
int pin_idx;
mutex_lock(&spec->bind_lock);
for (pin_idx = 0; pin_idx < spec->num_pins; pin_idx++) {
struct hdmi_spec_per_pin *per_pin = get_pin(spec, pin_idx);
hda_nid_t pin_nid = per_pin->pin_nid;
int de... | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_hdmi.c |
static void hdmi_array_init(struct hdmi_spec *spec, int nums) {
snd_array_init(&spec->pins, sizeof(struct hdmi_spec_per_pin), nums);
snd_array_init(&spec->cvts, sizeof(struct hdmi_spec_per_cvt), nums);
} | [
1,
0
] |
Linux Kernel | sound/pci/hda/patch_hdmi.c |
static void hdmi_array_free(struct hdmi_spec *spec) {
snd_array_free(&spec->pins);
snd_array_free(&spec->cvts);
} | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_hdmi.c | static void
setup_drm_audio_ops(struct hda_codec *codec,
const struct drm_audio_component_audio_ops *ops) {
struct hdmi_spec *spec = codec->spec;
spec->drm_audio_ops.audio_ptr = codec;
wmb();
spec->drm_audio_ops.pin2port = ops->pin2port;
spec->drm_audio_ops.pin_eld_notify = ops->pin_eld_... | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_hdmi.c | static void generic_acomp_init(struct hda_codec *codec,
const struct drm_audio_component_audio_ops *ops,
int (*port2pin)(struct hda_codec *, int)) {
struct hdmi_spec *spec = codec->spec;
if (!enable_acomp) {
codec_info(codec, "audio component disabl... | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_hdmi.c | static void haswell_set_power_state(struct hda_codec *codec, hda_nid_t fg,
unsigned int power_state) {
if (power_state == AC_PWRST_D0) {
intel_haswell_enable_all_pins(codec, false);
intel_haswell_fixup_enable_dp12(codec);
}
snd_hda_codec_read(codec, fg, 0, AC_VERB_SET_... | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_hdmi.c | static int intel_pin2port(void *audio_ptr, int pin_nid) {
struct hda_codec *codec = audio_ptr;
struct hdmi_spec *spec = codec->spec;
int base_nid, i;
if (!spec->port_num) {
base_nid = intel_base_nid(codec);
if (WARN_ON(pin_nid < base_nid || pin_nid >= base_nid + 3))
return -1;
return pin_nid ... | [
1,
0
] |
Linux Kernel | sound/pci/hda/patch_hdmi.c | static int intel_port2pin(struct hda_codec *codec, int port) {
struct hdmi_spec *spec = codec->spec;
if (!spec->port_num) {
if (port < 1 || port > 3)
return 0;
return port + intel_base_nid(codec) - 1;
}
if (port < 0 || port >= spec->port_num)
return 0;
return spec->port_map[port];
} | [
1,
0
] |
Linux Kernel | sound/pci/hda/patch_hdmi.c | static void intel_pin_eld_notify(void *audio_ptr, int port, int pipe) {
struct hda_codec *codec = audio_ptr;
int pin_nid;
int dev_id = pipe;
pin_nid = intel_port2pin(codec, port);
if (!pin_nid)
return;
if (codec->core.dev.power.power_state.event == PM_EVENT_SUSPEND)
return;
snd_hdac_i915_set_bc... | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_hdmi.c | static int parse_intel_hdmi(struct hda_codec *codec) {
int err, retries = 3;
do {
err = hdmi_parse_codec(codec);
} while (err < 0 && retries--);
if (err < 0) {
generic_spec_free(codec);
return err;
}
generic_hdmi_init_per_pins(codec);
register_i915_notifier(codec);
return 0;
} | [
1,
0
] |
Linux Kernel | sound/pci/hda/patch_hdmi.c | static int intel_hsw_common_init(struct hda_codec *codec, hda_nid_t vendor_nid,
const int *port_map, int port_num, int dev_num,
bool send_silent_stream) {
struct hdmi_spec *spec;
int err;
err = alloc_intel_hdmi(codec);
if (err < 0)
return er... | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_hdmi.c | static int patch_i915_tgl_hdmi(struct hda_codec *codec) {
static const int map[] = {0x4, 0x6, 0x8, 0xa, 0xb, 0xc, 0xd, 0xe, 0xf};
return intel_hsw_common_init(codec, 0x02, map, ARRAY_SIZE(map), 4,
enable_silent_stream);
} | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_hdmi.c |
static int nvhdmi_7x_init_2ch(struct hda_codec *codec) {
snd_hda_sequence_write(codec, nvhdmi_basic_init_7x_2ch);
return 0;
} | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_hdmi.c |
static int simple_playback_pcm_close(struct hda_pcm_stream *hinfo,
struct hda_codec *codec,
struct snd_pcm_substream *substream) {
struct hdmi_spec *spec = codec->spec;
return snd_hda_multi_out_dig_close(codec, &spec->multiout);
} | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_hdmi.c |
static int simple_playback_pcm_prepare(struct hda_pcm_stream *hinfo,
struct hda_codec *codec,
unsigned int stream_tag,
unsigned int format,
struct snd_pcm_substrea... | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_hdmi.c | static void nvhdmi_8ch_7x_set_info_frame_parameters(struct hda_codec *codec,
int channels) {
unsigned int chanmask;
int chan = channels ? (channels - 1) : 1;
switch (channels) {
default:
case 0:
case 2:
chanmask = 0x00;
break;
case 4:
chanma... | [
1,
0
] |
Linux Kernel | sound/pci/hda/patch_hdmi.c | static int patch_nvhdmi_2ch(struct hda_codec *codec) {
struct hdmi_spec *spec;
int err = patch_simple_hdmi(codec, nvhdmi_master_con_nid_7x,
nvhdmi_master_pin_nid_7x);
if (err < 0)
return err;
codec->patch_ops.init = nvhdmi_7x_init_2ch;
spec = codec->spec;
spec->pcm_playba... | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_hdmi.c | static int patch_nvhdmi_8ch_7x(struct hda_codec *codec) {
struct hdmi_spec *spec;
int err = patch_nvhdmi_2ch(codec);
if (err < 0)
return err;
spec = codec->spec;
spec->multiout.max_channels = 8;
spec->pcm_playback = nvhdmi_pcm_playback_8ch_7x;
codec->patch_ops.init = nvhdmi_7x_init_8ch;
codec->patch... | [
1,
0
] |
Linux Kernel | sound/pci/hda/patch_hdmi.c |
static int nvhdmi_chmap_validate(struct hdac_chmap *chmap, int ca, int chs,
unsigned char *map) {
if (ca == 0x00 && (map[0] != SNDRV_CHMAP_FL || map[1] != SNDRV_CHMAP_FR))
return -EINVAL;
return 0;
} | [
1,
0
] |
Linux Kernel | sound/pci/hda/patch_hdmi.c | static int tegra_hdmi_pcm_cleanup(struct hda_pcm_stream *hinfo,
struct hda_codec *codec,
struct snd_pcm_substream *substream) {
tegra_hdmi_set_format(codec, hinfo->nid, 0);
return generic_hdmi_playback_pcm_cleanup(hinfo, codec, substream);
} | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_hdmi.c | static int atihdmi_paired_swap_fc_lfe(int pos) {
switch (pos) {
/* see channel_allocations[].speakers[] */
case 2:
return 3;
case 3:
return 2;
default:
break;
}
return pos;
} | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_hdmi.c | static int atihdmi_paired_chmap_cea_alloc_validate_get_type(
struct hdac_chmap *chmap, struct hdac_cea_channel_speaker_allocation *cap,
int channels) {
int c;
int chanpairs = 0;
/* We only produce even-numbered channel count TLVs */
if ((channels % 2) != 0)
return -1;
for (c = 0; c < 7; c += 2)... | [
1,
0
] |
Linux Kernel | sound/pci/hda/patch_hdmi.c | static int atihdmi_init(struct hda_codec *codec) {
struct hdmi_spec *spec = codec->spec;
int pin_idx, err;
err = generic_hdmi_init(codec);
if (err)
return err;
for (pin_idx = 0; pin_idx < spec->num_pins; pin_idx++) {
struct hdmi_spec_per_pin *per_pin = get_pin(spec, pin_idx);
snd_hda_codec_wri... | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_realtek.c |
static void coef_mutex_unlock(struct hda_codec *codec) {
struct alc_spec *spec = codec->spec;
mutex_unlock(&spec->coef_mutex);
snd_hda_power_down_pm(codec);
} | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_realtek.c |
static int __alc_read_coefex_idx(struct hda_codec *codec, hda_nid_t nid,
unsigned int coef_idx) {
unsigned int val;
snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_COEF_INDEX, coef_idx);
val = snd_hda_codec_read(codec, nid, 0, AC_VERB_GET_PROC_COEF, 0);
return val;
} | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_realtek.c |
static int alc_read_coefex_idx(struct hda_codec *codec, hda_nid_t nid,
unsigned int coef_idx) {
unsigned int val;
coef_mutex_lock(codec);
val = __alc_read_coefex_idx(codec, nid, coef_idx);
coef_mutex_unlock(codec);
return val;
}
#define alc_read_coef_idx(codec, coef_idx) ... | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_realtek.c |
static void __alc_update_coefex_idx(struct hda_codec *codec, hda_nid_t nid,
unsigned int coef_idx, unsigned int mask,
unsigned int bits_set) {
unsigned int val = __alc_read_coefex_idx(codec, nid, coef_idx);
if (val != -1)
__alc_write_coef... | [
1,
0
] |
Linux Kernel | sound/pci/hda/patch_realtek.c | static void alc_setup_gpio(struct hda_codec *codec, unsigned int mask) {
struct alc_spec *spec = codec->spec;
spec->gpio_mask |= mask;
spec->gpio_dir |= mask;
spec->gpio_data |= mask;
} | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_realtek.c |
static void alc_fixup_gpio2(struct hda_codec *codec,
const struct hda_fixup *fix, int action) {
alc_fixup_gpio(codec, action, 0x02);
} | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_realtek.c |
static void alc_fixup_gpio3(struct hda_codec *codec,
const struct hda_fixup *fix, int action) {
alc_fixup_gpio(codec, action, 0x03);
} | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_realtek.c |
static void alc_fix_pll_init(struct hda_codec *codec, hda_nid_t nid,
unsigned int coef_idx, unsigned int coef_bit) {
struct alc_spec *spec = codec->spec;
spec->pll_nid = nid;
spec->pll_coef_idx = coef_idx;
spec->pll_coef_bit = coef_bit;
alc_fix_pll(codec);
} | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_realtek.c | static void alc888_coef_init(struct hda_codec *codec) {
switch (alc_get_coef0(codec) & 0x00f0) {
case 0x00:
/* alc888-VB */
case 0x10:
alc_update_coef_idx(codec, 7, 0, 0x2030); /* Turn EAPD to High */
break;
}
} | [
1,
0
] |
Linux Kernel | sound/pci/hda/patch_realtek.c |
static void alc_shutup_pins(struct hda_codec *codec) {
struct alc_spec *spec = codec->spec;
switch (codec->core.vendor_id) {
case 0x10ec0236:
case 0x10ec0256:
case 0x19e58326:
case 0x10ec0283:
case 0x10ec0286:
case 0x10ec0288:
case 0x10ec0298:
alc_headset_mic_no_shutup(codec);
break;
defau... | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_realtek.c | static void alc_eapd_shutup(struct hda_codec *codec) {
struct alc_spec *spec = codec->spec;
alc_auto_setup_eapd(codec, false);
if (!spec->no_depop_delay)
msleep(200);
alc_shutup_pins(codec);
} | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_realtek.c | static void alc_auto_init_amp(struct hda_codec *codec, int type) {
alc_auto_setup_eapd(codec, true);
alc_write_gpio(codec);
switch (type) {
case ALC_INIT_DEFAULT:
switch (codec->core.vendor_id) {
case 0x10ec0260:
alc_update_coefex_idx(codec, 0x1a, 7, 0, 0x2010);
break;
case 0x10ec0880:
... | [
1,
0
] |
Linux Kernel | sound/pci/hda/patch_realtek.c |
static void alc_fixup_no_depop_delay(struct hda_codec *codec,
const struct hda_fixup *fix, int action) {
struct alc_spec *spec = codec->spec;
if (action == HDA_FIXUP_ACT_PROBE) {
spec->no_depop_delay = 1;
codec->depop_delay = 0;
}
} | [
0,
0
] |
Linux Kernel | sound/pci/hda/patch_realtek.c | static void alc_ssid_check(struct hda_codec *codec, const hda_nid_t *ports) {
if (!alc_subsystem_id(codec, ports)) {
struct alc_spec *spec = codec->spec;
if (spec->init_amp == ALC_INIT_UNDEFINED) {
codec_dbg(codec,
"realtek: Enable default setup for auto mode as fallback\n");
spec-... | [
0,
0
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.