Home
last modified time | relevance | path

Searched full:ac97 (Results 1 – 25 of 271) sorted by relevance

1234567891011

/linux-6.12.1/sound/pci/ac97/
Dac97_codec.c33 MODULE_PARM_DESC(enable_loopback, "Enable AC97 ADC/DAC Loopback Control");
49 int (*patch)(struct snd_ac97 *ac97);
50 int (*mpatch)(struct snd_ac97 *ac97);
62 * currently used by the AC97 emulation of the almost-AC97 PCI168 card.
194 static void update_power_regs(struct snd_ac97 *ac97);
196 #define ac97_is_power_save_mode(ac97) \ argument
197 ((ac97->scaps & AC97_SCAP_POWER_SAVE) && power_save)
199 #define ac97_is_power_save_mode(ac97) 0 argument
202 #define ac97_err(ac97, fmt, args...) \ argument
203 dev_err((ac97)->bus->card->dev, fmt, ##args)
[all …]
Dac97_patch.c18 static struct snd_kcontrol *snd_ac97_find_mixer_ctl(struct snd_ac97 *ac97,
20 static int snd_ac97_add_vmaster(struct snd_ac97 *ac97, char *name,
28 static int patch_build_controls(struct snd_ac97 * ac97, const struct snd_kcontrol_new *controls, in… in patch_build_controls() argument
33 err = snd_ctl_add(ac97->bus->card, snd_ac97_cnew(&controls[idx], ac97)); in patch_build_controls()
41 static void reset_tlv(struct snd_ac97 *ac97, const char *name, in reset_tlv() argument
46 kctl = snd_ctl_find_id_mixer(ac97->bus->card, name); in reset_tlv()
52 static int ac97_update_bits_page(struct snd_ac97 *ac97, unsigned short reg, unsigned short mask, un… in ac97_update_bits_page() argument
57 mutex_lock(&ac97->page_mutex); in ac97_update_bits_page()
58 page_save = snd_ac97_read(ac97, AC97_INT_PAGING) & AC97_PAGE_MASK; in ac97_update_bits_page()
59 snd_ac97_update_bits(ac97, AC97_INT_PAGING, AC97_PAGE_MASK, page); in ac97_update_bits_page()
[all …]
Dac97_proc.c22 static void snd_ac97_proc_read_functions(struct snd_ac97 *ac97, struct snd_info_buffer *buffer) in snd_ac97_proc_read_functions() argument
37 snd_ac97_write(ac97, AC97_FUNC_SELECT, function << 1); in snd_ac97_proc_read_functions()
38 info = snd_ac97_read(ac97, AC97_FUNC_INFO); in snd_ac97_proc_read_functions()
45 sense_info = snd_ac97_read(ac97, AC97_SENSE_INFO); in snd_ac97_proc_read_functions()
92 static void snd_ac97_proc_read_main(struct snd_ac97 *ac97, struct snd_info_buffer *buffer, int subi… in snd_ac97_proc_read_main() argument
101 snd_ac97_get_name(NULL, ac97->id, name, 0); in snd_ac97_proc_read_main()
102 snd_iprintf(buffer, "%d-%d/%d: %s\n\n", ac97->addr, ac97->num, subidx, name); in snd_ac97_proc_read_main()
104 if ((ac97->scaps & AC97_SCAP_AUDIO) == 0) in snd_ac97_proc_read_main()
108 ac97->subsystem_vendor); in snd_ac97_proc_read_main()
110 ac97->subsystem_device); in snd_ac97_proc_read_main()
[all …]
Dac97_pcm.c159 static int set_spdif_rate(struct snd_ac97 *ac97, unsigned short rate) in set_spdif_rate() argument
164 if (! (ac97->ext_id & AC97_EI_SPDIF)) in set_spdif_rate()
168 if (ac97->flags & AC97_CS_SPDIF) { in set_spdif_rate()
173 snd_ac97_update_bits(ac97, AC97_EXTENDED_STATUS, AC97_EA_SPDIF, 0); in set_spdif_rate()
179 if (ac97->id == AC97_ID_CM9739 && rate != 48000) { in set_spdif_rate()
180 snd_ac97_update_bits(ac97, AC97_EXTENDED_STATUS, AC97_EA_SPDIF, 0); in set_spdif_rate()
188 snd_ac97_update_bits(ac97, AC97_EXTENDED_STATUS, AC97_EA_SPDIF, 0); in set_spdif_rate()
195 mutex_lock(&ac97->reg_mutex); in set_spdif_rate()
196 old = snd_ac97_read(ac97, reg) & mask; in set_spdif_rate()
198 snd_ac97_update_bits_nolock(ac97, AC97_EXTENDED_STATUS, AC97_EA_SPDIF, 0); in set_spdif_rate()
[all …]
/linux-6.12.1/sound/soc/
Dsoc-ac97.c3 // soc-ac97.c -- ALSA SoC Audio Layer AC97 support
125 static int snd_soc_ac97_init_gpio(struct snd_ac97 *ac97, in snd_soc_ac97_init_gpio() argument
134 ac97->gpio_priv = gpio_priv; in snd_soc_ac97_init_gpio()
147 static void snd_soc_ac97_free_gpio(struct snd_ac97 *ac97) in snd_soc_ac97_free_gpio() argument
149 gpiochip_remove(&ac97->gpio_priv->gpio_chip); in snd_soc_ac97_free_gpio()
152 static int snd_soc_ac97_init_gpio(struct snd_ac97 *ac97, in snd_soc_ac97_init_gpio() argument
158 static void snd_soc_ac97_free_gpio(struct snd_ac97 *ac97) in snd_soc_ac97_free_gpio() argument
168 * it. The caller is responsible to either call device_add(&ac97->dev) to
169 * register the device, or to call put_device(&ac97->dev) to free the device.
175 struct snd_ac97 *ac97; in snd_soc_alloc_ac97_component() local
[all …]
/linux-6.12.1/sound/soc/tegra/
Dtegra20_ac97.c3 * tegra20_ac97.c - Tegra20 AC97 platform driver
32 #define DRV_NAME "tegra20-ac97"
36 static void tegra20_ac97_codec_reset(struct snd_ac97 *ac97) in tegra20_ac97_codec_reset() argument
62 static void tegra20_ac97_codec_warm_reset(struct snd_ac97 *ac97) in tegra20_ac97_codec_warm_reset() argument
141 static inline void tegra20_ac97_start_playback(struct tegra20_ac97 *ac97) in tegra20_ac97_start_playback() argument
143 regmap_update_bits(ac97->regmap, TEGRA20_AC97_FIFO1_SCR, in tegra20_ac97_start_playback()
147 regmap_update_bits(ac97->regmap, TEGRA20_AC97_CTRL, in tegra20_ac97_start_playback()
154 static inline void tegra20_ac97_stop_playback(struct tegra20_ac97 *ac97) in tegra20_ac97_stop_playback() argument
156 regmap_update_bits(ac97->regmap, TEGRA20_AC97_FIFO1_SCR, in tegra20_ac97_stop_playback()
159 regmap_update_bits(ac97->regmap, TEGRA20_AC97_CTRL, in tegra20_ac97_stop_playback()
[all …]
/linux-6.12.1/sound/ac97/
Dsnd_ac97_compat.c8 #include <sound/ac97/codec.h>
9 #include <sound/ac97/compat.h>
10 #include <sound/ac97/controller.h>
20 static void compat_ac97_reset(struct snd_ac97 *ac97) in compat_ac97_reset() argument
22 struct ac97_codec_device *adev = to_ac97_device(ac97->private_data); in compat_ac97_reset()
29 static void compat_ac97_warm_reset(struct snd_ac97 *ac97) in compat_ac97_warm_reset() argument
31 struct ac97_codec_device *adev = to_ac97_device(ac97->private_data); in compat_ac97_warm_reset()
38 static void compat_ac97_write(struct snd_ac97 *ac97, unsigned short reg, in compat_ac97_write() argument
41 struct ac97_codec_device *adev = to_ac97_device(ac97->private_data); in compat_ac97_write()
44 actrl->ops->write(actrl, ac97->num, reg, val); in compat_ac97_write()
[all …]
Dbus.c19 #include <sound/ac97/codec.h>
20 #include <sound/ac97/controller.h>
21 #include <sound/ac97/regs.h>
74 char compat[] = "ac97,0000,0000"; in ac97_of_get_child_device()
76 snprintf(compat, sizeof(compat), "ac97,%04x,%04x", in ac97_of_get_child_device()
182 * snd_ac97_codec_driver_register - register an AC97 codec driver
183 * @dev: AC97 driver codec to register
185 * Register an AC97 codec driver to the ac97 bus driver, aka. the AC97 digital
198 * snd_ac97_codec_driver_unregister - unregister an AC97 codec driver
199 * @dev: AC97 codec driver to unregister
[all …]
/linux-6.12.1/sound/
Dac97_bus.c3 * Linux driver model AC97 bus interface
18 * @ac97: The AC97 device to check
26 static bool snd_ac97_check_id(struct snd_ac97 *ac97, unsigned int id, in snd_ac97_check_id() argument
29 ac97->id = ac97->bus->ops->read(ac97, AC97_VENDOR_ID1) << 16; in snd_ac97_check_id()
30 ac97->id |= ac97->bus->ops->read(ac97, AC97_VENDOR_ID2); in snd_ac97_check_id()
32 if (ac97->id == 0x0 || ac97->id == 0xffffffff) in snd_ac97_check_id()
35 if (id != 0 && id != (ac97->id & id_mask)) in snd_ac97_check_id()
43 * @ac97: The AC'97 device to reset
55 int snd_ac97_reset(struct snd_ac97 *ac97, bool try_warm, unsigned int id, in snd_ac97_reset() argument
58 const struct snd_ac97_bus_ops *ops = ac97->bus->ops; in snd_ac97_reset()
[all …]
/linux-6.12.1/Documentation/devicetree/bindings/sound/
Dsoc-ac97link.txt1 AC97 link bindings
8 "ac97-running": AC97-link is active
9 "ac97-reset": AC97-link reset state
10 "ac97-warm-reset": AC97-link warm reset state
11 - ac97-gpios: List of gpio phandles with args in the order ac97-sync,
12 ac97-sdata, ac97-reset
20 pinctrl-names = "default", "ac97-running", "ac97-reset", "ac97-warm-reset";
25 ac97-gpios = <&gpio3 20 0 &gpio3 22 0 &gpio3 28 0>;
Dmarvell,pxa2xx-ac97.txt3 This descriptions matches the AC97 controller found in pxa2xx and pxa3xx series.
7 "marvell,pxa250-ac97"
8 "marvell,pxa270-ac97"
9 "marvell,pxa300-ac97"
11 - interrupts: single interrupt generated by AC97 IP
12 - clocks: input clock of the AC97 IP, refer to clock-bindings.txt
16 - reset-gpios: gpio used for AC97 reset, refer to gpio.txt
19 ac97: sound@40500000 {
20 compatible = "marvell,pxa250-ac97";
Dac97-bus.txt1 Generic AC97 Device Properties
3 This documents describes the devicetree bindings for an ac97 controller child
4 node describing ac97 codecs.
7 -compatible : Must be "ac97,vendor_id1,vendor_id2
10 -reg : Must be the ac97 codec number, between 0 and 3
13 ac97: sound@40500000 {
14 compatible = "marvell,pxa270-ac97";
28 compatible = "ac97,574d,4c13";
Dnvidia,tegra20-ac97.yaml4 $id: http://devicetree.org/schemas/sound/nvidia,tegra20-ac97.yaml#
7 title: NVIDIA Tegra20 AC97 controller
15 const: nvidia,tegra20-ac97
24 const: ac97
41 description: Reset pin of external AC97 codec
45 description: AC97 DAP _FS line
70 ac97@70002000 {
71 compatible = "nvidia,tegra20-ac97";
74 reset-names = "ac97";
/linux-6.12.1/sound/soc/codecs/
Dac97.c3 * ac97.c -- ALSA Soc AC97 codec support
8 * Generic AC97 support.
28 { "AC97 Capture", NULL, "RX" },
29 { "TX", NULL, "AC97 Playback" },
36 struct snd_ac97 *ac97 = snd_soc_component_get_drvdata(component); in ac97_prepare() local
40 return snd_ac97_set_rate(ac97, reg, substream->runtime->rate); in ac97_prepare()
48 .name = "ac97-hifi",
50 .stream_name = "AC97 Playback",
56 .stream_name = "AC97 Capture",
66 struct snd_ac97 *ac97; in ac97_soc_probe() local
[all …]
/linux-6.12.1/include/sound/
Dac97_codec.h16 #include <sound/ac97/regs.h>
21 /* maximum number of devices on the AC97 bus */
124 /* ac97->scaps */
138 /* ac97->flags */
156 #define AC97_HAS_NO_STD_PCM (1<<17) /* no standard AC97 PCM volume and mute */
157 #define AC97_HAS_NO_AUX (1<<18) /* no standard AC97 AUX volume and mute */
178 int (*build_3d) (struct snd_ac97 *ac97);
179 int (*build_specific) (struct snd_ac97 *ac97);
180 int (*build_spdif) (struct snd_ac97 *ac97);
181 int (*build_post_spdif) (struct snd_ac97 *ac97);
[all …]
/linux-6.12.1/sound/pci/cs5535audio/
Dcs5535audio.h42 /* cs5535 specific ac97 codec register defines */
87 struct snd_ac97 *ac97; member
102 struct snd_ac97_template *ac97);
103 int olpc_quirks(struct snd_card *card, struct snd_ac97 *ac97);
105 void olpc_analog_input(struct snd_ac97 *ac97, int on);
106 void olpc_mic_bias(struct snd_ac97 *ac97, int on);
108 static inline void olpc_capture_open(struct snd_ac97 *ac97) in olpc_capture_open() argument
111 olpc_analog_input(ac97, 0); in olpc_capture_open()
113 olpc_mic_bias(ac97, 1); in olpc_capture_open()
116 static inline void olpc_capture_close(struct snd_ac97 *ac97) in olpc_capture_close() argument
[all …]
Dcs5535audio_olpc.c24 void olpc_analog_input(struct snd_ac97 *ac97, int on) in olpc_analog_input() argument
32 err = snd_ac97_update_bits(ac97, AC97_AD_TEST2, in olpc_analog_input()
35 dev_err(ac97->bus->card->dev, in olpc_analog_input()
47 void olpc_mic_bias(struct snd_ac97 *ac97, int on) in olpc_mic_bias() argument
55 err = snd_ac97_update_bits(ac97, AC97_AD_MISC, in olpc_mic_bias()
58 dev_err(ac97->bus->card->dev, "setting MIC Bias - %d\n", err); in olpc_mic_bias()
81 olpc_analog_input(cs5535au->ac97, v->value.integer.value[0]); in olpc_dc_put()
98 struct snd_ac97 *ac97 = cs5535au->ac97; in olpc_mic_get() local
101 i = (snd_ac97_read(ac97, AC97_AD_MISC) >> AC97_AD_VREFD_SHIFT) & 0x1; in olpc_mic_get()
110 olpc_mic_bias(cs5535au->ac97, v->value.integer.value[0]); in olpc_mic_put()
[all …]
/linux-6.12.1/include/sound/ac97/
Dcontroller.h18 * struct ac97_controller - The AC97 controller of the AC-Link
19 * @ops: the AC97 operations.
21 * @adap: the shell device ac97-%d, ie. ac97 adapter
24 * @parent: the device providing the AC97 controller.
25 * @codecs: the 4 possible AC97 codecs (NULL if none found).
28 * This structure is internal to AC97 bus, and should not be used by the
43 * struct ac97_controller_ops - The AC97 operations
44 * @reset: Cold reset of the AC97 AC-Link.
45 * @warm_reset: Warm reset of the AC97 AC-Link.
46 * @read: Read of a single AC97 register.
[all …]
/linux-6.12.1/drivers/base/regmap/
Dregmap-ac97.c47 struct snd_ac97 *ac97 = context; in regmap_ac97_reg_read() local
49 *val = ac97->bus->ops->read(ac97, reg); in regmap_ac97_reg_read()
57 struct snd_ac97 *ac97 = context; in regmap_ac97_reg_write() local
59 ac97->bus->ops->write(ac97, reg, val); in regmap_ac97_reg_write()
69 struct regmap *__regmap_init_ac97(struct snd_ac97 *ac97, in __regmap_init_ac97() argument
74 return __regmap_init(&ac97->dev, &ac97_regmap_bus, ac97, config, in __regmap_init_ac97()
79 struct regmap *__devm_regmap_init_ac97(struct snd_ac97 *ac97, in __devm_regmap_init_ac97() argument
84 return __devm_regmap_init(&ac97->dev, &ac97_regmap_bus, ac97, config, in __devm_regmap_init_ac97()
/linux-6.12.1/sound/soc/pxa/
Dpxa2xx-ac97.c3 * linux/sound/pxa2xx-ac97.c -- AC97 support for the Intel PXA2xx chip.
17 #include <sound/ac97/controller.h>
151 * There is only 1 physical AC97 interface for pxa2xx, but it
156 .name = "pxa2xx-ac97",
158 .stream_name = "AC97 Playback",
164 .stream_name = "AC97 Capture",
172 .name = "pxa2xx-ac97-aux",
174 .stream_name = "AC97 Aux Playback",
180 .stream_name = "AC97 Aux Capture",
188 .name = "pxa2xx-ac97-mic",
[all …]
/linux-6.12.1/sound/soc/fsl/
Dmpc5200_psc_ac97.c3 // linux/sound/mpc5200-ac97.c -- AC97 support for the Freescale MPC52xx chip.
24 #define DRV_NAME "mpc5200-psc-ac97"
26 /* ALSA only supports a single AC97 device so static is recommend here */
29 static unsigned short psc_ac97_read(struct snd_ac97 *ac97, unsigned short reg) in psc_ac97_read() argument
40 pr_err("timeout on ac97 bus (rdy)\n"); in psc_ac97_read()
55 pr_err("timeout on ac97 read (val) %x\n", in psc_ac97_read()
63 pr_err("reg echo error on ac97 read\n"); in psc_ac97_read()
73 static void psc_ac97_write(struct snd_ac97 *ac97, in psc_ac97_write() argument
84 pr_err("timeout on ac97 bus (write)\n"); in psc_ac97_write()
95 static void psc_ac97_warm_reset(struct snd_ac97 *ac97) in psc_ac97_warm_reset() argument
[all …]
/linux-6.12.1/sound/soc/sh/
Dsh7760-ac97.c3 // Generic AC97 sound support for SH7760
17 SND_SOC_DAILINK_DEFS(ac97,
19 DAILINK_COMP_ARRAY(COMP_CODEC("ac97-codec", "ac97-hifi")),
23 .name = "AC97",
24 .stream_name = "AC97 HiFi",
25 SND_SOC_DAILINK_REG(ac97),
29 .name = "SH7760 AC97",
42 /* enable both AC97 controllers in pinmux reg */ in sh7760_ac97_init()
71 MODULE_DESCRIPTION("Generic SH7760 AC97 sound machine");
Dhac.c3 // Hitachi Audio Controller (AC97) support for SH7760/SH7780
10 /* BIG FAT FIXME: although the SH7760 has 2 independent AC97 units, only
13 * to edit the code a bit to use the other AC97 unit. --mlau
44 #define CR_ST (1 << 5) /* AC97 link start bit */
46 #define CSAR_RD (1 << 19) /* AC97 data read bit */
69 /* manual-suggested AC97 codec access timeouts (us) */
97 * AC97 read/write flow as outlined in the SH7760 manual (pages 903-906)
162 static void hac_ac97_write(struct snd_ac97 *ac97, unsigned short reg, in hac_ac97_write() argument
165 int unit_id = 0 /* ac97->private_data */; in hac_ac97_write()
190 static unsigned short hac_ac97_read(struct snd_ac97 *ac97, in hac_ac97_read() argument
[all …]
/linux-6.12.1/sound/soc/au1x/
Dpsc-ac97.c8 * Au1xxx-PSC AC97 glue.
54 /* this could theoretically work, but ac97->bus->card->private_data can be NULL
70 /* AC97 controller reads codec register */
71 static unsigned short au1xpsc_ac97_read(struct snd_ac97 *ac97, in au1xpsc_ac97_read() argument
74 struct au1xpsc_audio_data *pscdata = ac97_to_pscdata(ac97); in au1xpsc_ac97_read()
111 /* AC97 controller writes to codec register */
112 static void au1xpsc_ac97_write(struct snd_ac97 *ac97, unsigned short reg, in au1xpsc_ac97_write() argument
115 struct au1xpsc_audio_data *pscdata = ac97_to_pscdata(ac97); in au1xpsc_ac97_write()
143 /* AC97 controller asserts a warm reset */
144 static void au1xpsc_ac97_warm_reset(struct snd_ac97 *ac97) in au1xpsc_ac97_warm_reset() argument
[all …]
/linux-6.12.1/sound/pci/au88x0/
Dau88x0_mixer.c5 * There is much more than just the AC97 mixer...
26 struct snd_ac97_template ac97; in snd_vortex_mixer() local
36 memset(&ac97, 0, sizeof(ac97)); in snd_vortex_mixer()
37 // Initialize AC97 codec stuff. in snd_vortex_mixer()
38 ac97.private_data = vortex; in snd_vortex_mixer()
39 ac97.scaps = AC97_SCAP_NO_SPDIF; in snd_vortex_mixer()
40 err = snd_ac97_mixer(pbus, &ac97, &vortex->codec); in snd_vortex_mixer()

1234567891011