/Linux-v5.4/sound/pci/hda/ |
D | hda_bind.c | 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() 34 codec->preset = list; in hda_codec_match() 44 struct hda_codec *codec = container_of(dev, struct hda_codec, core); in hda_codec_unsol_event() local 46 if (codec->patch_ops.unsol_event) in hda_codec_unsol_event() 47 codec->patch_ops.unsol_event(codec, ev); in hda_codec_unsol_event() 51 * snd_hda_codec_set_name - set the codec name [all …]
|
D | hda_codec.c | 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) 40 struct hda_codec *codec = container_of(dev, struct hda_codec, core); in codec_exec_verb() local 41 struct hda_bus *bus = codec->bus; in codec_exec_verb() 48 snd_hda_power_up_pm(codec); in codec_exec_verb() [all …]
|
D | hda_generic.c | 3 * Universal Interface for Intel High Definition Audio Codec 99 static void parse_user_hints(struct hda_codec *codec) in parse_user_hints() argument 101 struct hda_gen_spec *spec = codec->spec; in parse_user_hints() 104 val = snd_hda_get_bool_hint(codec, "jack_detect"); in parse_user_hints() 106 codec->no_jack_detect = !val; in parse_user_hints() 107 val = snd_hda_get_bool_hint(codec, "inv_jack_detect"); in parse_user_hints() 109 codec->inv_jack_detect = !!val; in parse_user_hints() 110 val = snd_hda_get_bool_hint(codec, "trigger_sense"); in parse_user_hints() 112 codec->no_trigger_sense = !val; in parse_user_hints() 113 val = snd_hda_get_bool_hint(codec, "inv_eapd"); in parse_user_hints() [all …]
|
D | hda_jack.c | 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() 39 !codec->jackpoll_interval) in is_jack_detectable() 46 static u32 read_pin_sense(struct hda_codec *codec, hda_nid_t nid) in read_pin_sense() argument 51 if (!codec->no_trigger_sense) { in read_pin_sense() [all …]
|
D | patch_ca0132.c | 1025 struct hda_codec *codec; member 1189 * CA0132 codec access 1191 static unsigned int codec_send_command(struct hda_codec *codec, hda_nid_t nid, in codec_send_command() argument 1195 response = snd_hda_codec_read(codec, nid, 0, verb, parm); in codec_send_command() 1201 static int codec_set_converter_format(struct hda_codec *codec, hda_nid_t nid, in codec_set_converter_format() argument 1204 return codec_send_command(codec, nid, VENDOR_CHIPIO_STREAM_FORMAT, in codec_set_converter_format() 1208 static int codec_set_converter_stream_channel(struct hda_codec *codec, in codec_set_converter_stream_channel() argument 1215 return codec_send_command(codec, nid, AC_VERB_SET_CHANNEL_STREAMID, in codec_set_converter_stream_channel() 1220 static int chipio_send(struct hda_codec *codec, in chipio_send() argument 1229 res = snd_hda_codec_read(codec, WIDGET_CHIP_CTRL, 0, in chipio_send() [all …]
|
D | patch_via.c | 3 * Universal Interface for Intel High Definition Audio Codec 5 * HD audio interface patch for VIA VT17xx/VT18xx/VT20xx codec 13 /* 2006-03-03 Lydia Wang Create the basic patch to support VT1708 codec */ 15 /* 2006-08-02 Lydia Wang Add support to VT1709 codec */ 18 /* 2007-09-17 Lydia Wang Add VT1708B codec support */ 19 /* 2007-11-14 Lydia Wang Add VT1708A codec HP and CD pin connect config */ 21 /* 2008-03-06 Lydia Wang Add VT1702 codec and VT1708S codec support */ 92 static enum VIA_HDA_CODEC get_codec_type(struct hda_codec *codec); 94 struct hda_codec *codec, 100 static struct via_spec *via_new_spec(struct hda_codec *codec) in via_new_spec() argument [all …]
|
D | patch_hdmi.c | 40 #define is_haswell(codec) ((codec)->core.vendor_id == 0x80862807) argument 41 #define is_broadwell(codec) ((codec)->core.vendor_id == 0x80862808) argument 42 #define is_skylake(codec) ((codec)->core.vendor_id == 0x80862809) argument 43 #define is_broxton(codec) ((codec)->core.vendor_id == 0x8086280a) argument 44 #define is_kabylake(codec) ((codec)->core.vendor_id == 0x8086280b) argument 45 #define is_geminilake(codec) (((codec)->core.vendor_id == 0x8086280d) || \ argument 46 ((codec)->core.vendor_id == 0x80862800)) 47 #define is_cannonlake(codec) ((codec)->core.vendor_id == 0x8086280c) argument 48 #define is_icelake(codec) ((codec)->core.vendor_id == 0x8086280f) argument 49 #define is_tigerlake(codec) ((codec)->core.vendor_id == 0x80862812) argument [all …]
|
D | hda_sysfs.c | 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); \ 66 struct hda_codec *codec = dev_get_drvdata(dev); \ [all …]
|
D | Makefile | 5 snd-hda-codec-y := hda_bind.o hda_codec.o hda_jack.o hda_auto_parser.o hda_sysfs.o 6 snd-hda-codec-y += hda_controller.o 7 snd-hda-codec-$(CONFIG_SND_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 16 snd-hda-codec-generic-objs := hda_generic.o 17 snd-hda-codec-realtek-objs := patch_realtek.o 18 snd-hda-codec-cmedia-objs := patch_cmedia.o 19 snd-hda-codec-analog-objs := patch_analog.o 20 snd-hda-codec-idt-objs := patch_sigmatel.o [all …]
|
D | hda_local.h | 3 * Universal Interface for Intel High Definition Audio Codec 117 #define snd_hda_codec_amp_read(codec, nid, ch, dir, idx) \ argument 118 snd_hdac_regmap_get_amp(&(codec)->core, nid, ch, dir, idx) 119 int snd_hda_codec_amp_update(struct hda_codec *codec, hda_nid_t nid, 121 int snd_hda_codec_amp_stereo(struct hda_codec *codec, hda_nid_t nid, 123 int snd_hda_codec_amp_init(struct hda_codec *codec, hda_nid_t nid, int ch, 125 int snd_hda_codec_amp_init_stereo(struct hda_codec *codec, hda_nid_t nid, 127 void snd_hda_set_vmaster_tlv(struct hda_codec *codec, hda_nid_t nid, int dir, 129 struct snd_kcontrol *snd_hda_find_mixer_ctl(struct hda_codec *codec, 131 int __snd_hda_add_vmaster(struct hda_codec *codec, char *name, [all …]
|
D | patch_si3054.c | 3 * Universal Interface for Intel High Definition Audio Codec 5 * HD audio interface patch for Silicon Labs 3054/5 modem codec 63 /* si3054 codec registers (nodes) access macros */ 64 #define GET_REG(codec,reg) (snd_hda_codec_read(codec,reg,0,SI3054_VERB_READ_NODE,0)) argument 65 #define SET_REG(codec,reg,val) (snd_hda_codec_write(codec,reg,0,SI3054_VERB_WRITE_NODE,val)) argument 66 #define SET_REG_CACHE(codec,reg,val) \ argument 67 snd_hda_codec_write_cache(codec,reg,0,SI3054_VERB_WRITE_NODE,val) 88 struct hda_codec *codec = snd_kcontrol_chip(kcontrol); in si3054_switch_get() local 91 uvalue->value.integer.value[0] = (GET_REG(codec, reg)) & mask ? 1 : 0 ; in si3054_switch_get() 98 struct hda_codec *codec = snd_kcontrol_chip(kcontrol); in si3054_switch_put() local [all …]
|
D | patch_cirrus.c | 129 static inline int cs_vendor_coef_get(struct hda_codec *codec, unsigned int idx) in cs_vendor_coef_get() argument 131 struct cs_spec *spec = codec->spec; in cs_vendor_coef_get() 132 snd_hda_codec_write(codec, spec->vendor_nid, 0, in cs_vendor_coef_get() 134 return snd_hda_codec_read(codec, spec->vendor_nid, 0, in cs_vendor_coef_get() 138 static inline void cs_vendor_coef_set(struct hda_codec *codec, unsigned int idx, in cs_vendor_coef_set() argument 141 struct cs_spec *spec = codec->spec; in cs_vendor_coef_set() 142 snd_hda_codec_write(codec, spec->vendor_nid, 0, in cs_vendor_coef_set() 144 snd_hda_codec_write(codec, spec->vendor_nid, 0, in cs_vendor_coef_set() 154 static void cs_automute(struct hda_codec *codec) in cs_automute() argument 156 struct cs_spec *spec = codec->spec; in cs_automute() [all …]
|
D | patch_conexant.c | 3 * HD audio interface patch for Conexant HDA audio codec 74 static int cx_auto_parse_beep(struct hda_codec *codec) in cx_auto_parse_beep() argument 76 struct conexant_spec *spec = codec->spec; in cx_auto_parse_beep() 79 for_each_hda_codec_node(nid, codec) in cx_auto_parse_beep() 80 if (get_wcaps_type(get_wcaps(codec, nid)) == AC_WID_BEEP) in cx_auto_parse_beep() 85 #define cx_auto_parse_beep(codec) 0 argument 93 static void cx_auto_parse_eapd(struct hda_codec *codec) in cx_auto_parse_eapd() argument 95 struct conexant_spec *spec = codec->spec; in cx_auto_parse_eapd() 98 for_each_hda_codec_node(nid, codec) { in cx_auto_parse_eapd() 99 if (get_wcaps_type(get_wcaps(codec, nid)) != AC_WID_PIN) in cx_auto_parse_eapd() [all …]
|
D | Kconfig | 21 to choose the appropriate codec options below. 62 bool "Allow dynamic codec reconfiguration" 64 Say Y here to enable the HD-audio codec re-configuration feature. 65 It allows user to clear the whole codec configuration, change the 66 codec setup, add extra verbs, and re-configure the codec dynamically. 101 tristate "Build Realtek HD-audio codec support" 104 Say Y or M here to include Realtek HD-audio codec support in 107 comment "Set to Y if you want auto-loading the codec driver" 111 tristate "Build Analog Device HD-audio codec support" 114 Say Y or M here to include Analog Device HD-audio codec support in [all …]
|
D | hda_proc.c | 3 * Universal Interface for Intel High Definition Audio Codec 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) 48 struct hda_codec *codec, hda_nid_t nid, in print_nid_array() argument 75 struct hda_codec *codec, hda_nid_t nid) in print_nid_pcms() argument 80 list_for_each_entry(cpcm, &codec->pcm_list_head, list) { in print_nid_pcms() 94 struct hda_codec *codec, hda_nid_t nid, int dir) in print_amp_caps() argument 97 caps = param_read(codec, nid, dir == HDA_OUTPUT ? in print_amp_caps() 112 static bool is_stereo_amps(struct hda_codec *codec, hda_nid_t nid, in is_stereo_amps() argument [all …]
|
D | patch_realtek.c | 3 * Universal Interface for Intel High Definition Audio Codec 72 /* codec parameterization */ 96 void (*init_hook)(struct hda_codec *codec); 98 void (*power_hook)(struct hda_codec *codec); 100 void (*shutup)(struct hda_codec *codec); 101 void (*reboot_notify)(struct hda_codec *codec); 123 static int alc_read_coefex_idx(struct hda_codec *codec, hda_nid_t nid, in alc_read_coefex_idx() argument 128 snd_hda_codec_write(codec, nid, 0, AC_VERB_SET_COEF_INDEX, coef_idx); in alc_read_coefex_idx() 129 val = snd_hda_codec_read(codec, nid, 0, AC_VERB_GET_PROC_COEF, 0); in alc_read_coefex_idx() 133 #define alc_read_coef_idx(codec, coef_idx) \ argument [all …]
|
D | hda_auto_parser.c | 56 static void add_auto_cfg_input_pin(struct hda_codec *codec, struct auto_pin_cfg *cfg, in add_auto_cfg_input_pin() argument 63 nid_has_volume(codec, nid, HDA_INPUT); in add_auto_cfg_input_pin() 102 static bool check_pincap_validity(struct hda_codec *codec, hda_nid_t pin, in check_pincap_validity() argument 105 unsigned int pincap = snd_hda_query_pin_caps(codec, pin); in check_pincap_validity() 123 static bool can_be_headset_mic(struct hda_codec *codec, in can_be_headset_mic() argument 135 def_conf = snd_hda_codec_get_pincfg(codec, item->pin); in can_be_headset_mic() 166 int snd_hda_parse_pin_defcfg(struct hda_codec *codec, in snd_hda_parse_pin_defcfg() argument 178 if (!snd_hda_get_int_hint(codec, "parser_flags", &i)) in snd_hda_parse_pin_defcfg() 188 for_each_hda_codec_node(nid, codec) { in snd_hda_parse_pin_defcfg() 189 unsigned int wid_caps = get_wcaps(codec, nid); in snd_hda_parse_pin_defcfg() [all …]
|
/Linux-v5.4/sound/pci/ali5451/ |
D | ali5451.c | 142 #define ALI_REG(codec, x) ((codec)->port + x) argument 181 struct snd_ali *codec; member 267 static inline unsigned int snd_ali_5451_peek(struct snd_ali *codec, in snd_ali_5451_peek() argument 270 return (unsigned int)inl(ALI_REG(codec, port)); in snd_ali_5451_peek() 273 static inline void snd_ali_5451_poke(struct snd_ali *codec, in snd_ali_5451_poke() argument 277 outl((unsigned int)val, ALI_REG(codec, port)); in snd_ali_5451_poke() 280 static int snd_ali_codec_ready(struct snd_ali *codec, in snd_ali_codec_ready() argument 289 res = snd_ali_5451_peek(codec,port); in snd_ali_codec_ready() 297 snd_ali_5451_poke(codec, port, res & ~0x8000); in snd_ali_codec_ready() 298 dev_dbg(codec->card->dev, "ali_codec_ready: codec is not ready.\n "); in snd_ali_codec_ready() [all …]
|
/Linux-v5.4/Documentation/devicetree/bindings/pinctrl/ |
D | cirrus,lochnagar.txt | 4 Smart CODEC and Amp devices. It allows the connection of most Cirrus 47 codec-aif1, codec-aif2, codec-aif3, dsp-aif1, dsp-aif2, psia1, 53 fpga-gpio6, codec-gpio1, codec-gpio2, codec-gpio3, codec-gpio4, 54 codec-gpio5, codec-gpio6, codec-gpio7, codec-gpio8, dsp-gpio1, 56 gf-gpio3, gf-gpio7, codec-aif1-bclk, codec-aif1-rxdat, 57 codec-aif1-lrclk, codec-aif1-txdat, codec-aif2-bclk, 58 codec-aif2-rxdat, codec-aif2-lrclk, codec-aif2-txdat, 59 codec-aif3-bclk, codec-aif3-rxdat, codec-aif3-lrclk, 60 codec-aif3-txdat, dsp-aif1-bclk, dsp-aif1-rxdat, dsp-aif1-lrclk, 70 codec-pdmclk1, codec-pdmdat1, codec-pdmclk2, codec-pdmdat2, [all …]
|
/Linux-v5.4/sound/hda/ |
D | hdac_device.c | 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() 56 codec->bus = bus; in snd_hdac_device_init() 57 codec->addr = addr; in snd_hdac_device_init() [all …]
|
D | hdac_regmap.c | 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() 41 struct hdac_device *codec = dev_to_hdac_dev(dev); in hda_volatile_reg() local 46 return !codec->cache_coef; in hda_volatile_reg() 68 struct hdac_device *codec = dev_to_hdac_dev(dev); in hda_writeable_reg() local 73 snd_array_for_each(&codec->vendor_verbs, i, v) { in hda_writeable_reg() 78 if (codec->caps_overwriting) in hda_writeable_reg() 86 return codec->cache_coef; in hda_writeable_reg() [all …]
|
D | hdac_sysfs.c | 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, 114 struct hdac_device *codec; in widget_attr_show() local 119 nid = get_codec_nid(kobj, &codec); in widget_attr_show() 122 return wid_attr->show(codec, nid, wid_attr, buf); in widget_attr_show() 130 struct hdac_device *codec; in widget_attr_store() local [all …]
|
/Linux-v5.4/include/sound/ |
D | hda_codec.h | 3 * Universal Interface for Intel High Definition Audio Codec 35 * codec bus 56 /* status for codec/controller */ 65 unsigned int mixer_assigned; /* codec addr for mixer name */ 72 * codec preset 106 int (*build_controls)(struct hda_codec *codec); 107 int (*build_pcms)(struct hda_codec *codec); 108 int (*init)(struct hda_codec *codec); 109 void (*free)(struct hda_codec *codec); 110 void (*unsol_event)(struct hda_codec *codec, unsigned int res); [all …]
|
/Linux-v5.4/sound/soc/codecs/ |
D | Kconfig | 3 # modular, meaning we can't build the codec driver in with I2C support. 12 menu "CODEC drivers" 15 tristate "Build all ASoC CODEC drivers" 261 Normally ASoC codec drivers are only built if a machine driver which 310 tristate "Build generic ASoC AC97 CODEC driver" 343 tristate "Analog Devices ADAU1701 CODEC" 357 tristate "Analog Devices AU1761 CODEC - I2C" 363 tristate "Analog Devices AU1761 CODEC - SPI" 413 tristate "AKM AK4104 CODEC" 417 tristate "AKM AK4118 CODEC" [all …]
|
/Linux-v5.4/drivers/staging/greybus/ |
D | audio_codec.c | 3 * APBridge ALSA SoC dummy codec driver 33 find_dai_stream_params(struct gbaudio_codec_info *codec, int id, int stream) in find_dai_stream_params() argument 37 list_for_each_entry(dai, &codec->dai_list, list) { in find_dai_stream_params() 44 static int gbaudio_module_enable_tx(struct gbaudio_codec_info *codec, in gbaudio_module_enable_tx() argument 62 params = find_dai_stream_params(codec, id, SNDRV_PCM_STREAM_PLAYBACK); in gbaudio_module_enable_tx() 64 dev_err(codec->dev, "Failed to fetch dai_stream pointer\n"); in gbaudio_module_enable_tx() 179 static int gbaudio_module_enable_rx(struct gbaudio_codec_info *codec, in gbaudio_module_enable_rx() argument 197 params = find_dai_stream_params(codec, id, SNDRV_PCM_STREAM_CAPTURE); in gbaudio_module_enable_rx() 199 dev_err(codec->dev, "Failed to fetch dai_stream pointer\n"); in gbaudio_module_enable_rx() 314 int gbaudio_module_update(struct gbaudio_codec_info *codec, in gbaudio_module_update() argument [all …]
|