| /kernel/linux/linux-5.10/sound/pci/hda/ |
| D | hda_bind.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * HD-audio codec driver binding 19 * find a matching codec id 23 struct hda_codec *codec = container_of(dev, struct hda_codec, core); in hda_codec_match() local 28 u32 id = codec->probe_id ? codec->probe_id : codec->core.vendor_id; in hda_codec_match() 29 u32 rev_id = codec->core.revision_id; in hda_codec_match() 31 for (list = driver->id; list->vendor_id; list++) { in hda_codec_match() 32 if (list->vendor_id == id && in hda_codec_match() 33 (!list->rev_id || list->rev_id == rev_id)) { in hda_codec_match() 34 codec->preset = list; in hda_codec_match() [all …]
|
| D | hda_codec.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * Universal Interface for Intel High Definition Audio Codec 27 #define codec_in_pm(codec) snd_hdac_is_in_pm(&codec->core) argument 28 #define hda_codec_is_power_on(codec) snd_hdac_is_power_on(&codec->core) argument 29 #define codec_has_epss(codec) \ argument 30 ((codec)->core.power_caps & AC_PWRST_EPSS) 31 #define codec_has_clkstop(codec) \ argument 32 ((codec)->core.power_caps & AC_PWRST_CLKSTOP) 35 * Send and receive a verb - passed to exec_verb override for hdac_device 40 struct hda_codec *codec = container_of(dev, struct hda_codec, core); in codec_exec_verb() local [all …]
|
| D | patch_via.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * Universal Interface for Intel High Definition Audio Codec 5 * HD audio interface patch for VIA VT17xx/VT18xx/VT20xx codec 7 * (C) 2006-2009 VIA Technology, Inc. 8 * (C) 2006-2008 Takashi Iwai <tiwai@suse.de> 13 /* 2006-03-03 Lydia Wang Create the basic patch to support VT1708 codec */ 14 /* 2006-03-14 Lydia Wang Modify hard code for some pin widget nid */ 15 /* 2006-08-02 Lydia Wang Add support to VT1709 codec */ 16 /* 2006-09-08 Lydia Wang Fix internal loopback recording source select bug */ 17 /* 2007-09-12 Lydia Wang Add EAPD enable during driver initialization */ [all …]
|
| D | patch_ca0132.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 37 #define FLOAT_ZERO 0x00000000 38 #define FLOAT_ONE 0x3f800000 39 #define FLOAT_TWO 0x40000000 40 #define FLOAT_THREE 0x40400000 41 #define FLOAT_FIVE 0x40a00000 42 #define FLOAT_SIX 0x40c00000 43 #define FLOAT_EIGHT 0x41000000 44 #define FLOAT_MINUS_5 0xc0a00000 46 #define UNSOL_TAG_DSP 0x16 [all …]
|
| D | hda_generic.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * Universal Interface for Intel High Definition Audio Codec 32 * snd_hda_gen_spec_init - initialize hda_gen_spec struct 39 snd_array_init(&spec->kctls, sizeof(struct snd_kcontrol_new), 32); in snd_hda_gen_spec_init() 40 snd_array_init(&spec->paths, sizeof(struct nid_path), 8); in snd_hda_gen_spec_init() 41 snd_array_init(&spec->loopback_list, sizeof(struct hda_amp_list), 8); in snd_hda_gen_spec_init() 42 mutex_init(&spec->pcm_mutex); in snd_hda_gen_spec_init() 43 return 0; in snd_hda_gen_spec_init() 48 * snd_hda_gen_add_kctl - Add a new kctl_new struct from the template 62 struct snd_kcontrol_new *knew = snd_array_new(&spec->kctls); in snd_hda_gen_add_kctl() [all …]
|
| D | patch_hdmi.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 4 * patch_hdmi.c - routines for HDMI/DisplayPort codecs 6 * Copyright(c) 2008-2010 Intel Corporation. All rights reserved. 73 struct hda_codec *codec; member 77 struct hdmi_pcm *pcm; /* pointer to spec->pcm_rec[n] dynamically*/ 78 int pcm_idx; /* which pcm is attached. -1 means no pcm is attached */ 84 bool chmap_set; /* channel-map override by ALSA API? */ 85 unsigned char chmap[8]; /* ALSA API channel-map */ 93 int (*pin_get_eld)(struct hda_codec *codec, hda_nid_t pin_nid, 96 void (*pin_setup_infoframe)(struct hda_codec *codec, hda_nid_t pin_nid, [all …]
|
| D | hda_jack.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * Jack-detection handling for HD-audio 20 * is_jack_detectable - Check whether the given pin is jack-detectable 21 * @codec: the HDA codec 26 * detection is prohibited in the codec level, the pin config has 29 bool is_jack_detectable(struct hda_codec *codec, hda_nid_t nid) in is_jack_detectable() argument 31 if (codec->no_jack_detect) in is_jack_detectable() 33 if (!(snd_hda_query_pin_caps(codec, nid) & AC_PINCAP_PRES_DETECT)) in is_jack_detectable() 35 if (get_defcfg_misc(snd_hda_codec_get_pincfg(codec, nid)) & in is_jack_detectable() 38 if (!(get_wcaps(codec, nid) & AC_WCAP_UNSOL_CAP) && in is_jack_detectable() [all …]
|
| D | patch_conexant.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * HD audio interface patch for Conexant HDA audio codec 7 * Tobin Davis <tdavis@dsl-only.net> 52 HDA_CODEC_VOLUME_MONO("Beep Playback Volume", 0, 1, 0, HDA_OUTPUT), 53 HDA_CODEC_MUTE_BEEP_MONO("Beep Playback Switch", 0, 1, 0, HDA_OUTPUT), 63 spec->gen.beep_nid = nid; in set_beep_amp() 64 for (i = 0; i < ARRAY_SIZE(cxt_beep_mixer); i++) { in set_beep_amp() 65 knew = snd_hda_gen_add_kctl(&spec->gen, NULL, in set_beep_amp() 68 return -ENOMEM; in set_beep_amp() 69 knew->private_value = beep_amp; in set_beep_amp() [all …]
|
| D | hda_sysfs.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * sysfs interface for HD-audio codec 34 struct hda_codec *codec = dev_get_drvdata(dev); in power_on_acct_show() local 35 snd_hda_update_power_acct(codec); in power_on_acct_show() 36 return sprintf(buf, "%u\n", jiffies_to_msecs(codec->power_on_acct)); in power_on_acct_show() 43 struct hda_codec *codec = dev_get_drvdata(dev); in power_off_acct_show() local 44 snd_hda_update_power_acct(codec); in power_off_acct_show() 45 return sprintf(buf, "%u\n", jiffies_to_msecs(codec->power_off_acct)); in power_off_acct_show() 57 struct hda_codec *codec = dev_get_drvdata(dev); \ 58 return sprintf(buf, "0x%x\n", codec->field); \ [all …]
|
| D | patch_si3054.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * Universal Interface for Intel High Definition Audio Codec 5 * HD audio interface patch for Silicon Labs 3054/5 modem codec 7 * Copyright (c) 2005 Sasha Khapyorsky <sashak@alsa-project.org> 20 #define SI3054_VERB_READ_NODE 0x900 21 #define SI3054_VERB_WRITE_NODE 0x100 46 #define SI3054_MEI_READY 0xf 49 #define SI3054_ATAG_MASK 0x00f0 50 #define SI3054_DTAG_MASK 0xf000 53 #define SI3054_GPIO_OH 0x0001 [all …]
|
| D | patch_cirrus.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 65 /* Vendor-specific processing widget */ 66 #define CS420X_VENDOR_NID 0x11 67 #define CS_DIG_OUT1_PIN_NID 0x10 68 #define CS_DIG_OUT2_PIN_NID 0x15 69 #define CS_DMIC1_PIN_NID 0x0e 70 #define CS_DMIC2_PIN_NID 0x12 73 #define IDX_SPDIF_STAT 0x0000 74 #define IDX_SPDIF_CTL 0x0001 75 #define IDX_ADC_CFG 0x0002 [all …]
|
| D | patch_realtek.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * Universal Interface for Intel High Definition Audio Codec 32 /* extra amp-initialization sequence types */ 80 /* codec parameterization */ 107 void (*init_hook)(struct hda_codec *codec); 109 void (*power_hook)(struct hda_codec *codec); 111 void (*shutup)(struct hda_codec *codec); 112 void (*reboot_notify)(struct hda_codec *codec); 136 static int alc_read_coefex_idx(struct hda_codec *codec, hda_nid_t nid, in alc_read_coefex_idx() argument 141 snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_COEF_INDEX, coef_idx); in alc_read_coefex_idx() [all …]
|
| D | patch_analog.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 6 * Copyright (c) 2005-2007 Takashi Iwai <tiwai@suse.de> 38 HDA_CODEC_VOLUME("Beep Playback Volume", 0, 0, HDA_OUTPUT), 39 HDA_CODEC_MUTE_BEEP("Beep Playback Switch", 0, 0, HDA_OUTPUT), 44 ((spec)->beep_amp = HDA_COMPOSE_AMP_VAL(nid, 1, idx, dir)) /* mono */ 50 static int create_beep_ctls(struct hda_codec *codec) in create_beep_ctls() argument 52 struct ad198x_spec *spec = codec->spec; in create_beep_ctls() 55 if (!spec->beep_amp) in create_beep_ctls() 56 return 0; in create_beep_ctls() 58 for (knew = ad_beep_mixer ; knew->name; knew++) { in create_beep_ctls() [all …]
|
| D | hda_proc.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * Universal Interface for Intel High Definition Audio Codec 17 static int dump_coef = -1; 19 MODULE_PARM_DESC(dump_coef, "Dump processing coefficients in codec proc file (-1=auto, 0=disable, 1… 22 #define param_read(codec, nid, parm) \ argument 23 snd_hdac_read_parm_uncached(&(codec)->core, nid, parm) 38 if (wid_value == -1) in get_wid_type_name() 40 wid_value &= 0xf; in get_wid_type_name() 48 struct hda_codec *codec, hda_nid_t nid, in print_nid_array() argument 52 struct hda_nid_item *items = array->list, *item; in print_nid_array() [all …]
|
| D | hda_local.h | 1 /* SPDX-License-Identifier: GPL-2.0-or-later */ 3 * Universal Interface for Intel High Definition Audio Codec 15 * snd_hda_ctl_add() takes the lower-bit subdev value as a valid NID. 30 HDA_COMPOSE_AMP_VAL_OFS(nid, chs, idx, dir, 0) 31 /* mono volume with index (index=0,1,...) (channel=1,2) */ 45 HDA_CODEC_VOLUME_MONO_IDX(xname, xcidx, nid, 3, xindex, direction, 0) 48 HDA_CODEC_VOLUME_MONO_IDX(xname, 0, nid, channel, xindex, direction, 0) 54 HDA_CODEC_VOLUME_MONO_IDX(xname, 0, nid, 3, xindex, direction, \ 56 /* mono mute switch with index (index=0,1,...) (channel=1,2) */ 69 HDA_CODEC_MUTE_MONO_IDX(xname, 0, nid, channel, xindex, direction) [all …]
|
| D | hda_auto_parser.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 3 * BIOS auto-parser helper functions for HD-audio 25 return 0; in is_in_nid_list() 38 return (int)(a->seq - b->seq); in compare_seq() 49 sort(list, num_pins, sizeof(list[0]), compare_seq, NULL); in sort_pins_by_sequence() 50 for (i = 0; i < num_pins; i++) in sort_pins_by_sequence() 55 /* add the found input-pin to the cfg->inputs[] table */ 56 static void add_auto_cfg_input_pin(struct hda_codec *codec, struct auto_pin_cfg *cfg, in add_auto_cfg_input_pin() argument 59 if (cfg->num_inputs < AUTO_CFG_MAX_INS) { in add_auto_cfg_input_pin() 60 cfg->inputs[cfg->num_inputs].pin = nid; in add_auto_cfg_input_pin() [all …]
|
| D | hda_beep.c | 1 // SPDX-License-Identifier: GPL-2.0+ 3 * Digital Beep Input Interface for HD-audio codec 26 struct hda_codec *codec = beep->codec; in generate_tone() local 28 if (tone && !beep->playing) { in generate_tone() 29 snd_hda_power_up(codec); in generate_tone() 30 if (beep->power_hook) in generate_tone() 31 beep->power_hook(beep, true); in generate_tone() 32 beep->playing = 1; in generate_tone() 34 snd_hda_codec_write(codec, beep->nid, 0, in generate_tone() 36 if (!tone && beep->playing) { in generate_tone() [all …]
|
| D | hda_jack.h | 1 /* SPDX-License-Identifier: GPL-2.0-or-later */ 3 * Jack-detection handling for HD-audio 35 /* jack-detection stuff */ 36 unsigned int pin_sense; /* cached pin-sense value */ 37 unsigned int jack_detect:1; /* capable of jack-detection? */ 40 unsigned int block_report:1; /* in a transitional state - do not report to userspace */ 54 snd_hda_jack_tbl_get_mst(struct hda_codec *codec, hda_nid_t nid, int dev_id); 57 * snd_hda_jack_tbl_get - query the jack-table entry for the given NID 58 * @codec: the HDA codec 62 snd_hda_jack_tbl_get(struct hda_codec *codec, hda_nid_t nid) in snd_hda_jack_tbl_get() argument [all …]
|
| /kernel/linux/linux-5.10/sound/pci/ali5451/ |
| D | ali5451.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 8 * -- 11 * -- 21 #include <linux/dma-mapping.h> 75 #define ALI_5451_V02 0x02 81 #define ALI_LEGACY_DMAR0 0x00 /* ADR0 */ 82 #define ALI_LEGACY_DMAR4 0x04 /* CNT0 */ 83 #define ALI_LEGACY_DMAR11 0x0b /* MOD */ 84 #define ALI_LEGACY_DMAR15 0x0f /* MMR */ 85 #define ALI_MPUR0 0x20 [all …]
|
| /kernel/linux/linux-5.10/sound/hda/ |
| D | hdac_device.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * HD-audio codec core device 18 static void setup_fg_nodes(struct hdac_device *codec); 19 static int get_codec_vendor_name(struct hdac_device *codec); 27 * snd_hdac_device_init - initialize the HD-audio codec base device 28 * @codec: device to initialize 31 * @addr: codec address 40 int snd_hdac_device_init(struct hdac_device *codec, struct hdac_bus *bus, in snd_hdac_device_init() argument 47 dev = &codec->dev; in snd_hdac_device_init() 49 dev->parent = bus->dev; in snd_hdac_device_init() [all …]
|
| D | hdac_regmap.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * Regmap support for HD-audio verbs 9 * - Provided for not all verbs but only subset standard non-volatile verbs. 10 * - For reading, only AC_VERB_GET_* variants can be used. 11 * - For writing, mapped to the *corresponding* AC_VERB_SET_* variants, 26 static int codec_pm_lock(struct hdac_device *codec) in codec_pm_lock() argument 28 return snd_hdac_keep_power_up(codec); in codec_pm_lock() 31 static void codec_pm_unlock(struct hdac_device *codec, int lock) in codec_pm_unlock() argument 34 snd_hdac_power_down_pm(codec); in codec_pm_unlock() 37 #define get_verb(reg) (((reg) >> 8) & 0xfff) [all …]
|
| D | hdac_sysfs.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * sysfs support for HD-audio core device 24 struct hdac_device *codec = dev_to_hdac_dev(dev); \ 25 return sprintf(buf, "0x%x\n", codec->type); \ 34 struct hdac_device *codec = dev_to_hdac_dev(dev); \ 36 codec->type ? codec->type : ""); \ 89 ssize_t (*show)(struct hdac_device *codec, hda_nid_t nid, 91 ssize_t (*store)(struct hdac_device *codec, hda_nid_t nid, 98 struct device *dev = kobj_to_dev(kobj->parent->parent); in get_codec_nid() 102 ret = kstrtoint(kobj->name, 16, &nid); in get_codec_nid() [all …]
|
| /kernel/linux/linux-5.10/drivers/staging/media/zoran/ |
| D | videocodec.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 5 * Interface for MJPEG (and maybe later MPEG/WAVELETS) codec's 30 module_param(debug, int, 0); 31 MODULE_PARM_DESC(debug, "Debug level (0-4)"); 37 } while (0) 40 struct videocodec *codec; member 45 const struct videocodec *codec; member 61 struct videocodec *codec; in videocodec_attach() local 70 master->name, master->flags, master->magic); in videocodec_attach() 80 if ((master->flags & h->codec->flags) == master->flags) { in videocodec_attach() [all …]
|
| /kernel/linux/linux-5.10/include/sound/ |
| D | hda_codec.h | 1 /* SPDX-License-Identifier: GPL-2.0-or-later */ 3 * Universal Interface for Intel High Definition Audio Codec 21 #define IS_BXT(pci) ((pci)->vendor == 0x8086 && (pci)->device == 0x5a98) 22 #define IS_CFL(pci) ((pci)->vendor == 0x8086 && (pci)->device == 0xa348) 35 * codec bus 55 /* status for codec/controller */ 64 unsigned int mixer_assigned; /* codec addr for mixer name */ 71 * codec preset 78 #define HDA_CODEC_ID_SKIP_PROBE 0x00000001 79 #define HDA_CODEC_ID_GENERIC_HDMI 0x00000101 [all …]
|
| D | hda_regmap.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 3 * HD-audio regmap helpers 13 #define AC_AMP_FAKE_MUTE 0x10 /* fake mute bit set to amp verbs */ 15 int snd_hdac_regmap_init(struct hdac_device *codec); 16 void snd_hdac_regmap_exit(struct hdac_device *codec); 17 int snd_hdac_regmap_add_vendor_verb(struct hdac_device *codec, 19 int snd_hdac_regmap_read_raw(struct hdac_device *codec, unsigned int reg, 21 int snd_hdac_regmap_read_raw_uncached(struct hdac_device *codec, 23 int snd_hdac_regmap_write_raw(struct hdac_device *codec, unsigned int reg, 25 int snd_hdac_regmap_update_raw(struct hdac_device *codec, unsigned int reg, [all …]
|