Home
last modified time | relevance | path

Searched +full:codec +full:- +full:1 (Results 1 – 25 of 1054) sorted by relevance

12345678910>>...43

/linux/sound/pci/ali5451/
H A Dali5451.c1 // SPDX-License-Identifier: GPL-2.0-or-later
8 * --
11 * --
21 #include <linux/dma-mapping.h>
94 #define ALI_SCTRL_LINE_IN2 (1 << 9)
95 #define ALI_SCTRL_GPIO_IN2 (1 << 13)
96 #define ALI_SCTRL_LINE_OUT_EN (1 << 20)
97 #define ALI_SCTRL_GPIO_OUT_EN (1 << 23)
98 #define ALI_SCTRL_CODEC1_READY (1 << 24)
99 #define ALI_SCTRL_CODEC2_READY (1 << 25)
[all …]
/linux/sound/hda/
H A Dhdac_device.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * HD-audio codec core device
19 static void setup_fg_nodes(struct hdac_device *codec);
20 static int get_codec_vendor_name(struct hdac_device *codec);
28 * snd_hdac_device_init - initialize the HD-audio codec base device
29 * @codec: device to initialize
32 * @addr: codec address
41 int snd_hdac_device_init(struct hdac_device *codec, struct hdac_bus *bus, in snd_hdac_device_init() argument
48 dev = &codec->dev; in snd_hdac_device_init()
50 dev->parent = bus->dev; in snd_hdac_device_init()
[all …]
H A Dhdac_regmap.c1 // 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,
25 static int codec_pm_lock(struct hdac_device *codec) in codec_pm_lock() argument
27 return snd_hdac_keep_power_up(codec); in codec_pm_lock()
30 static void codec_pm_unlock(struct hdac_device *codec, int lock) in codec_pm_unlock() argument
32 if (lock == 1) in codec_pm_unlock()
33 snd_hdac_power_down_pm(codec); in codec_pm_unlock()
[all …]
H A Dhdac_bus.c1 // SPDX-License-Identifier: GPL-2.0-only
3 * HD-audio core bus driver
24 * snd_hdac_bus_init - initialize a HD-audio bas bus
35 bus->dev = dev; in snd_hdac_bus_init()
37 bus->ops = ops; in snd_hdac_bus_init()
39 bus->ops = &default_ops; in snd_hdac_bus_init()
40 bus->dma_type = SNDRV_DMA_TYPE_DEV; in snd_hdac_bus_init()
41 INIT_LIST_HEAD(&bus->stream_list); in snd_hdac_bus_init()
42 INIT_LIST_HEAD(&bus->codec_list); in snd_hdac_bus_init()
43 INIT_WORK(&bus->unsol_work, snd_hdac_bus_process_unsol_events); in snd_hdac_bus_init()
[all …]
/linux/include/sound/
H A Dhda_codec.h1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 * Universal Interface for Intel High Definition Audio Codec
32 * codec bus
51 unsigned int allow_bus_reset:1; /* allow bus reset at fatal error */
52 /* status for codec/controller */
53 unsigned int shutdown :1; /* being unloaded */
54 unsigned int response_reset:1; /* controller was reset */
55 unsigned int in_reset:1; /* during reset operation */
56 unsigned int no_response_fallback:1; /* don't fallback at RIRB error */
57 unsigned int bus_probing :1; /* during probing process */
[all …]
H A Dhda_regmap.h1 /* SPDX-License-Identifier: GPL-2.0 */
3 * HD-audio regmap helpers
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,
27 int snd_hdac_regmap_update_raw_once(struct hdac_device *codec, unsigned int reg,
[all …]
/linux/sound/pci/hda/
H A Dhda_generic.c1 // 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()
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()
67 knew->name = kstrdup(name, GFP_KERNEL); in snd_hda_gen_add_kctl()
[all …]
H A Dpatch_ca0132.c1 // SPDX-License-Identifier: GPL-2.0-or-later
48 #define DSP_DMA_WRITE_BUFLEN_INIT (1UL<<18)
49 #define DSP_DMA_WRITE_BUFLEN_OVLY (1UL<<15)
71 #define SCP_GET 1
74 #define DESKTOP_EFX_FILE "ctefx-desktop.bin"
75 #define R3DI_EFX_FILE "ctefx-r3di.bin"
115 #define VNODES_COUNT (VNODE_END_NID - VNODE_START_NID)
126 #define OUT_EFFECTS_COUNT (OUT_EFFECT_END_NID - OUT_EFFECT_START_NID)
134 #define IN_EFFECTS_COUNT (IN_EFFECT_END_NID - IN_EFFECT_START_NID)
154 #define EFFECTS_COUNT (EFFECT_END_NID - EFFECT_START_NID)
[all …]
H A Dhda_codec.c1 // 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 …]
H A Dpatch_hdmi.c1 // SPDX-License-Identifier: GPL-2.0-or-later
4 * patch_hdmi.c - routines for HDMI/DisplayPort codecs
6 * Copyright(c) 2008-2010 Intel Corporation
78 struct hda_codec *codec; member
82 struct hdmi_pcm *pcm; /* pointer to spec->pcm_rec[n] dynamically*/
83 int pcm_idx; /* which pcm is attached. -1 means no pcm is attached */
90 bool chmap_set; /* channel-map override by ALSA API? */
91 unsigned char chmap[8]; /* ALSA API channel-map */
99 int (*pin_get_eld)(struct hda_codec *codec, hda_nid_t pin_nid,
102 void (*pin_setup_infoframe)(struct hda_codec *codec, hda_nid_t pin_nid,
[all …]
H A Dpatch_cs8409.c1 // SPDX-License-Identifier: GPL-2.0-or-later
22 static int cs8409_parse_auto_config(struct hda_codec *codec) in cs8409_parse_auto_config() argument
24 struct cs8409_spec *spec = codec->spec; in cs8409_parse_auto_config()
28 err = snd_hda_parse_pin_defcfg(codec, &spec->gen.autocfg, NULL, 0); in cs8409_parse_auto_config()
32 err = snd_hda_gen_parse_auto_config(codec, &spec->gen.autocfg); in cs8409_parse_auto_config()
37 if (spec->gen.dyn_adc_switch) { in cs8409_parse_auto_config()
40 for (i = 0; i < spec->gen.input_mux.num_items; i++) { in cs8409_parse_auto_config()
41 int idx = spec->gen.dyn_adc_idx[i]; in cs8409_parse_auto_config()
43 if (done & (1 << idx)) in cs8409_parse_auto_config()
45 snd_hda_gen_fix_pin_power(codec, spec->gen.adc_nids[idx]); in cs8409_parse_auto_config()
[all …]
H A Dhda_proc.c1 // 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()
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()
54 for (i = 0; i < array->used; i++) { in print_nid_array()
[all …]
H A Dpatch_senarytech.c1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * HD audio interface patch for Senary HDA audio codec
41 HDA_CODEC_VOLUME_MONO("Beep Playback Volume", 0, 1, 0, HDA_OUTPUT),
42 HDA_CODEC_MUTE_BEEP_MONO("Beep Playback Switch", 0, 1, 0, HDA_OUTPUT),
49 unsigned int beep_amp = HDA_COMPOSE_AMP_VAL(nid, 1, idx, dir); in set_beep_amp()
52 spec->gen.beep_nid = nid; in set_beep_amp()
54 knew = snd_hda_gen_add_kctl(&spec->gen, NULL, in set_beep_amp()
57 return -ENOMEM; in set_beep_amp()
58 knew->private_value = beep_amp; in set_beep_amp()
63 static int senary_auto_parse_beep(struct hda_codec *codec) in senary_auto_parse_beep() argument
[all …]
H A Dpatch_conexant.c1 // 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),
60 unsigned int beep_amp = HDA_COMPOSE_AMP_VAL(nid, 1, idx, dir); in set_beep_amp()
63 spec->gen.beep_nid = nid; 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 …]
H A Dhda_jack.c1 // 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 …]
H A Dpatch_si3054.c1 // 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>
61 #define SI3054_CHIPID_CODEC_ID (1<<12)
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)
[all …]
H A Dpatch_realtek.c1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * Universal Interface for Intel High Definition Audio Codec
38 /* extra amp-initialization sequence types */
69 unsigned int enable_pcbeep:1;
70 unsigned int platform_type:1;
71 unsigned int swap:1;
72 unsigned int override:1;
73 unsigned int fixup:1; /* Means that this sku is set by driver, not read from hw */
86 /* codec parameterization */
114 void (*init_hook)(struct hda_codec *codec);
[all …]
H A Dhda_jack.h1 /* 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? */
38 unsigned int jack_dirty:1; /* needs to update? */
39 unsigned int phantom_jack:1; /* a fixed, always present port? */
40 unsigned int block_report:1; /* in a transitional state - do not report to userspace */
55 snd_hda_jack_tbl_get_mst(struct hda_codec *codec, hda_nid_t nid, int dev_id);
58 * snd_hda_jack_tbl_get - query the jack-table entry for the given NID
[all …]
H A Dhda_beep.c1 // 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 …]
/linux/sound/soc/codecs/
H A Dhda.c1 // SPDX-License-Identifier: GPL-2.0
3 // Copyright(c) 2021-2022 Intel Corporation
16 static int hda_codec_create_dais(struct hda_codec *codec, int pcm_count, in hda_codec_create_dais() argument
19 struct device *dev = &codec->core.dev; in hda_codec_create_dais()
26 return -ENOMEM; in hda_codec_create_dais()
28 pcm = list_first_entry(&codec->pcm_list_head, struct hda_pcm, list); in hda_codec_create_dais()
34 dev_info(dev, "creating for %s %d\n", pcm->name, i); in hda_codec_create_dais()
36 drvs[i].name = pcm->name; in hda_codec_create_dais()
41 if (!pcm->stream[dir].substreams) { in hda_codec_create_dais()
42 dev_info(dev, "skipping playback dai for %s\n", pcm->name); in hda_codec_create_dais()
[all …]
H A Djz4760.c1 // SPDX-License-Identifier: GPL-2.0
3 // Ingenic JZ4760 CODEC driver
18 #include <sound/soc-dai.h>
19 #include <sound/soc-dapm.h>
68 #define REG_AICR_DAC_I2S BIT(1)
80 #define REG_CR1_OUTSEL_MASK GENMASK(1, REG_CR1_OUTSEL_OFFSET)
84 #define REG_CR2_DAC_NOMAD BIT(1)
89 #define REG_CR3_MICSTEREO_OFFSET 1
106 #define REG_PMR1_SB_BYPASS_OFFSET 1
112 #define REG_PMR2_SB_LOUT_OFFSET 1
[all …]
H A Djz4770.c1 // SPDX-License-Identifier: GPL-2.0
3 // Ingenic JZ4770 CODEC driver
17 #include <sound/soc-dai.h>
18 #include <sound/soc-dapm.h>
85 #define REG_AICR_DAC_SERIAL BIT(1)
90 #define REG_AICR_ADC_SERIAL BIT(1)
115 #define REG_CR_MIC_BIAS_V0_OFFSET 1
129 #define REG_CR_VIC_SB_SLEEP BIT(1)
150 #define REG_IMR_GUP_MASK BIT(1)
159 #define REG_IFR_GUP BIT(1)
[all …]
/linux/Documentation/sound/soc/
H A Dcodec-to-codec.rst2 Creating codec to codec dai link for ALSA dapm
5 Mostly the flow of audio is always from CPU to codec so your system
9 --------- ---------
11 CPU -------> codec
13 --------- ---------
18 ---------
20 codec-2
22 ---------
24 dai-2
26 ---------- ---------
[all …]
/linux/sound/soc/generic/
H A Dsimple-card.c1 // SPDX-License-Identifier: GPL-2.0
17 #include <sound/soc-dai.h>
20 #define DPCM_SELECTABLE 1
22 #define DAI "sound-dai"
23 #define CELL "#sound-dai-cells"
24 #define PREFIX "simple-audio-car
171 simple_link_init(struct simple_util_priv * priv,struct device_node * cpu,struct device_node * codec,struct link_info * li,char * prefix,char * name) simple_link_init() argument
227 simple_dai_link_of_dpcm(struct simple_util_priv * priv,struct device_node * np,struct device_node * codec,struct link_info * li,bool is_top) simple_dai_link_of_dpcm() argument
305 simple_dai_link_of(struct simple_util_priv * priv,struct device_node * np,struct device_node * codec,struct link_info * li,bool is_top) simple_dai_link_of() argument
367 __simple_for_each_link(struct simple_util_priv * priv,struct link_info * li,int (* func_noml)(struct simple_util_priv * priv,struct device_node * np,struct device_node * codec,struct link_info * li,bool is_top),int (* func_dpcm)(struct simple_util_priv * priv,struct device_node * np,struct device_node * codec,struct link_info * li,bool is_top)) __simple_for_each_link() argument
394 struct device_node *codec; __simple_for_each_link() local
478 simple_for_each_link(struct simple_util_priv * priv,struct link_info * li,int (* func_noml)(struct simple_util_priv * priv,struct device_node * np,struct device_node * codec,struct link_info * li,bool is_top),int (* func_dpcm)(struct simple_util_priv * priv,struct device_node * np,struct device_node * codec,struct link_info * li,bool is_top)) simple_for_each_link() argument
572 simple_count_noml(struct simple_util_priv * priv,struct device_node * np,struct device_node * codec,struct link_info * li,bool is_top) simple_count_noml() argument
608 simple_count_dpcm(struct simple_util_priv * priv,struct device_node * np,struct device_node * codec,struct link_info * li,bool is_top) simple_count_dpcm() argument
[all...]
/linux/sound/soc/sof/intel/
H A Dhda-codec.c1 // SPDX-License-Identifier: GPL-2.0-only
24 static int hda_codec_mask = -1;
26 MODULE_PARM_DESC(codec_mask, "SOF HDA codec mask for probing");
28 /* load the legacy HDA codec driver */
29 static int request_codec_module(struct hda_codec *codec) in request_codec_module() argument
35 switch (codec->probe_id) { in request_codec_module()
38 mod = "snd-hda-codec-generic"; in request_codec_module()
42 snd_hdac_codec_modalias(&codec->core, alias, sizeof(alias)); in request_codec_module()
48 dev_dbg(&codec->core.dev, "loading codec module: %s\n", mod); in request_codec_module()
52 return device_attach(hda_codec_dev(codec)); in request_codec_module()
[all …]

12345678910>>...43