Home
last modified time | relevance | path

Searched refs:bus (Results 1 – 25 of 89) sorted by relevance

1234

/sound/hda/
Dhdac_controller.c13 static void azx_clear_corbrp(struct hdac_bus *bus) in azx_clear_corbrp() argument
18 if (snd_hdac_chip_readw(bus, CORBRP) & AZX_CORBRP_RST) in azx_clear_corbrp()
23 dev_err(bus->dev, "CORB reset timeout#1, CORBRP = %d\n", in azx_clear_corbrp()
24 snd_hdac_chip_readw(bus, CORBRP)); in azx_clear_corbrp()
26 snd_hdac_chip_writew(bus, CORBRP, 0); in azx_clear_corbrp()
28 if (snd_hdac_chip_readw(bus, CORBRP) == 0) in azx_clear_corbrp()
33 dev_err(bus->dev, "CORB reset timeout#2, CORBRP = %d\n", in azx_clear_corbrp()
34 snd_hdac_chip_readw(bus, CORBRP)); in azx_clear_corbrp()
41 void snd_hdac_bus_init_cmd_io(struct hdac_bus *bus) in snd_hdac_bus_init_cmd_io() argument
43 WARN_ON_ONCE(!bus->rb.area); in snd_hdac_bus_init_cmd_io()
[all …]
Dhdac_bus.c27 int snd_hdac_bus_init(struct hdac_bus *bus, struct device *dev, in snd_hdac_bus_init() argument
31 memset(bus, 0, sizeof(*bus)); in snd_hdac_bus_init()
32 bus->dev = dev; in snd_hdac_bus_init()
34 bus->ops = ops; in snd_hdac_bus_init()
36 bus->ops = &default_ops; in snd_hdac_bus_init()
37 bus->io_ops = io_ops; in snd_hdac_bus_init()
38 INIT_LIST_HEAD(&bus->stream_list); in snd_hdac_bus_init()
39 INIT_LIST_HEAD(&bus->codec_list); in snd_hdac_bus_init()
40 INIT_WORK(&bus->unsol_work, process_unsol_events); in snd_hdac_bus_init()
41 spin_lock_init(&bus->reg_lock); in snd_hdac_bus_init()
[all …]
Dhdac_stream.c25 void snd_hdac_stream_init(struct hdac_bus *bus, struct hdac_stream *azx_dev, in snd_hdac_stream_init() argument
28 azx_dev->bus = bus; in snd_hdac_stream_init()
30 azx_dev->sd_addr = bus->remap_addr + (0x20 * idx + 0x80); in snd_hdac_stream_init()
37 list_add_tail(&azx_dev->list, &bus->stream_list); in snd_hdac_stream_init()
50 struct hdac_bus *bus = azx_dev->bus; in snd_hdac_stream_start() local
52 trace_snd_hdac_stream_start(bus, azx_dev); in snd_hdac_stream_start()
54 azx_dev->start_wallclk = snd_hdac_chip_readl(bus, WALLCLK); in snd_hdac_stream_start()
59 snd_hdac_chip_updatel(bus, INTCTL, 0, 1 << azx_dev->index); in snd_hdac_stream_start()
88 trace_snd_hdac_stream_stop(azx_dev->bus, azx_dev); in snd_hdac_stream_stop()
92 snd_hdac_chip_updatel(azx_dev->bus, INTCTL, 1 << azx_dev->index, 0); in snd_hdac_stream_stop()
[all …]
Dhdac_i915.c40 int snd_hdac_set_codec_wakeup(struct hdac_bus *bus, bool enable) in snd_hdac_set_codec_wakeup() argument
42 struct i915_audio_component *acomp = bus->audio_component; in snd_hdac_set_codec_wakeup()
48 dev_warn(bus->dev, in snd_hdac_set_codec_wakeup()
53 dev_dbg(bus->dev, "%s codec wakeup\n", in snd_hdac_set_codec_wakeup()
75 int snd_hdac_display_power(struct hdac_bus *bus, bool enable) in snd_hdac_display_power() argument
77 struct i915_audio_component *acomp = bus->audio_component; in snd_hdac_display_power()
82 dev_dbg(bus->dev, "display power %s\n", in snd_hdac_display_power()
86 if (!bus->i915_power_refcount++) { in snd_hdac_display_power()
88 snd_hdac_set_codec_wakeup(bus, true); in snd_hdac_display_power()
89 snd_hdac_set_codec_wakeup(bus, false); in snd_hdac_display_power()
[all …]
Dtrace.h20 TP_PROTO(struct hdac_bus *bus, unsigned int cmd),
21 TP_ARGS(bus, cmd),
26 dev_name((bus)->dev), (cmd) >> 28, cmd);
32 TP_PROTO(struct hdac_bus *bus, unsigned int addr, unsigned int res),
33 TP_ARGS(bus, addr, res),
38 dev_name((bus)->dev), addr, res);
44 TP_PROTO(struct hdac_bus *bus, u32 res, u32 res_ex),
45 TP_ARGS(bus, res, res_ex),
50 dev_name((bus)->dev), res_ex & 0x0f, res, res_ex);
56 TP_PROTO(struct hdac_bus *bus, struct hdac_stream *azx_dev),
[all …]
/sound/i2c/
Di2c.c39 static int snd_i2c_bit_probeaddr(struct snd_i2c_bus *bus,
48 static int snd_i2c_bus_free(struct snd_i2c_bus *bus) in snd_i2c_bus_free() argument
53 if (snd_BUG_ON(!bus)) in snd_i2c_bus_free()
55 while (!list_empty(&bus->devices)) { in snd_i2c_bus_free()
56 device = snd_i2c_device(bus->devices.next); in snd_i2c_bus_free()
59 if (bus->master) in snd_i2c_bus_free()
60 list_del(&bus->buses); in snd_i2c_bus_free()
62 while (!list_empty(&bus->buses)) { in snd_i2c_bus_free()
63 slave = snd_i2c_slave_bus(bus->buses.next); in snd_i2c_bus_free()
64 snd_device_free(bus->card, slave); in snd_i2c_bus_free()
[all …]
Dtea6330t.c50 struct snd_i2c_bus *bus; member
60 int snd_tea6330t_detect(struct snd_i2c_bus *bus, int equalizer) in snd_tea6330t_detect() argument
64 snd_i2c_lock(bus); in snd_tea6330t_detect()
65 res = snd_i2c_probeaddr(bus, TEA6330T_ADDR); in snd_tea6330t_detect()
66 snd_i2c_unlock(bus); in snd_tea6330t_detect()
77 snd_i2c_write(tea->bus, TEA6330T_ADDR, addr, value, 1);
101 snd_i2c_lock(tea->bus); in snd_tea6330t_get_master_volume()
104 snd_i2c_unlock(tea->bus); in snd_tea6330t_get_master_volume()
118 snd_i2c_lock(tea->bus); in snd_tea6330t_put_master_volume()
136 snd_i2c_unlock(tea->bus); in snd_tea6330t_put_master_volume()
[all …]
Dcs8427.c153 int snd_cs8427_init(struct snd_i2c_bus *bus, in snd_cs8427_init() argument
205 snd_i2c_lock(bus); in snd_cs8427_init()
214 snd_i2c_unlock(bus); in snd_cs8427_init()
250 snd_i2c_unlock(bus); in snd_cs8427_init()
258 snd_i2c_unlock(bus); in snd_cs8427_init()
264 int snd_cs8427_create(struct snd_i2c_bus *bus, in snd_cs8427_create() argument
273 err = snd_i2c_device_create(bus, "CS8427", CS8427_ADDR | (addr & 7), in snd_cs8427_create()
288 err = snd_cs8427_init(bus, device); in snd_cs8427_create()
329 snd_i2c_lock(cs8427->bus); in snd_cs8427_reset()
341 snd_i2c_unlock(cs8427->bus); in snd_cs8427_reset()
[all …]
/sound/soc/intel/skylake/
Dskl.c102 static int skl_init_chip(struct hdac_bus *bus, bool full_reset) in skl_init_chip() argument
106 skl_enable_miscbdcge(bus->dev, false); in skl_init_chip()
107 ret = snd_hdac_bus_init_chip(bus, full_reset); in skl_init_chip()
108 skl_enable_miscbdcge(bus->dev, true); in skl_init_chip()
117 struct hdac_bus *bus = ebus_to_hbus(ebus); in skl_update_d0i3c() local
121 reg = snd_hdac_chip_readb(bus, VS_D0I3C); in skl_update_d0i3c()
125 reg = snd_hdac_chip_readb(bus, VS_D0I3C); in skl_update_d0i3c()
130 dev_err(bus->dev, "Before D0I3C update: D0I3C CIP timeout\n"); in skl_update_d0i3c()
139 snd_hdac_chip_writeb(bus, VS_D0I3C, reg); in skl_update_d0i3c()
143 reg = snd_hdac_chip_readb(bus, VS_D0I3C); in skl_update_d0i3c()
[all …]
Dskl-messages.c37 struct hdac_bus *bus = ebus_to_hbus(ebus); in skl_alloc_dma_buf() local
39 if (!bus) in skl_alloc_dma_buf()
42 return bus->io_ops->dma_alloc_pages(bus, SNDRV_DMA_TYPE_DEV, size, dmab); in skl_alloc_dma_buf()
48 struct hdac_bus *bus = ebus_to_hbus(ebus); in skl_free_dma_buf() local
50 if (!bus) in skl_free_dma_buf()
53 bus->io_ops->dma_free_pages(bus, dmab); in skl_free_dma_buf()
80 struct hdac_bus *bus = ebus_to_hbus(ebus); in skl_dsp_setup_spib() local
81 struct hdac_stream *stream = snd_hdac_get_stream(bus, in skl_dsp_setup_spib()
102 struct hdac_bus *bus = ebus_to_hbus(ebus); in skl_dsp_prepare() local
108 if (!bus) in skl_dsp_prepare()
[all …]
Dskl-pcm.c74 struct hdac_bus *bus = hstream->bus; in get_bus_ctx() local
76 return hbus_to_ebus(bus); in get_bus_ctx()
92 static int skl_substream_free_pages(struct hdac_bus *bus, in skl_substream_free_pages() argument
144 struct hdac_bus *bus = ebus_to_hbus(ebus); in skl_pcm_host_dma_prepare() local
150 hstream = snd_hdac_get_stream(bus, params->stream, in skl_pcm_host_dma_prepare()
181 struct hdac_bus *bus = ebus_to_hbus(ebus); in skl_pcm_link_dma_prepare() local
187 hstream = snd_hdac_get_stream(bus, params->stream, in skl_pcm_link_dma_prepare()
395 struct hdac_bus *bus = ebus_to_hbus(ebus); in skl_decoupled_trigger() local
424 spin_lock_irqsave(&bus->reg_lock, cookie); in skl_decoupled_trigger()
433 spin_unlock_irqrestore(&bus->reg_lock, cookie); in skl_decoupled_trigger()
[all …]
/sound/hda/ext/
Dhdac_ext_stream.c41 struct hdac_bus *bus = &ebus->bus; in snd_hdac_ext_stream_init() local
43 if (bus->ppcap) { in snd_hdac_ext_stream_init()
44 stream->pphc_addr = bus->ppcap + AZX_PPHC_BASE + in snd_hdac_ext_stream_init()
47 stream->pplc_addr = bus->ppcap + AZX_PPLC_BASE + in snd_hdac_ext_stream_init()
52 if (bus->spbcap) { in snd_hdac_ext_stream_init()
53 stream->spib_addr = bus->spbcap + AZX_SPB_BASE + in snd_hdac_ext_stream_init()
57 stream->fifo_addr = bus->spbcap + AZX_SPB_BASE + in snd_hdac_ext_stream_init()
62 if (bus->drsmcap) in snd_hdac_ext_stream_init()
63 stream->dpibr_addr = bus->drsmcap + AZX_DRSM_BASE + in snd_hdac_ext_stream_init()
67 snd_hdac_stream_init(bus, &stream->hstream, idx, direction, tag); in snd_hdac_ext_stream_init()
[all …]
Dhdac_ext_controller.c44 struct hdac_bus *bus = &ebus->bus; in snd_hdac_ext_bus_ppcap_enable() local
46 if (!bus->ppcap) { in snd_hdac_ext_bus_ppcap_enable()
47 dev_err(bus->dev, "Address of PP capability is NULL"); in snd_hdac_ext_bus_ppcap_enable()
52 snd_hdac_updatel(bus->ppcap, AZX_REG_PP_PPCTL, 0, AZX_PPCTL_GPROCEN); in snd_hdac_ext_bus_ppcap_enable()
54 snd_hdac_updatel(bus->ppcap, AZX_REG_PP_PPCTL, AZX_PPCTL_GPROCEN, 0); in snd_hdac_ext_bus_ppcap_enable()
65 struct hdac_bus *bus = &ebus->bus; in snd_hdac_ext_bus_ppcap_int_enable() local
67 if (!bus->ppcap) { in snd_hdac_ext_bus_ppcap_int_enable()
68 dev_err(bus->dev, "Address of PP capability is NULL\n"); in snd_hdac_ext_bus_ppcap_int_enable()
73 snd_hdac_updatel(bus->ppcap, AZX_REG_PP_PPCTL, 0, AZX_PPCTL_PIE); in snd_hdac_ext_bus_ppcap_int_enable()
75 snd_hdac_updatel(bus->ppcap, AZX_REG_PP_PPCTL, AZX_PPCTL_PIE, 0); in snd_hdac_ext_bus_ppcap_int_enable()
[all …]
Dhdac_ext_bus.c58 static int hdac_ext_dma_alloc_pages(struct hdac_bus *bus, int type, in hdac_ext_dma_alloc_pages() argument
61 return snd_dma_alloc_pages(type, bus->dev, size, buf); in hdac_ext_dma_alloc_pages()
64 static void hdac_ext_dma_free_pages(struct hdac_bus *bus, struct snd_dma_buffer *buf) in hdac_ext_dma_free_pages() argument
101 ret = snd_hdac_bus_init(&ebus->bus, dev, ops, io_ops); in snd_hdac_ext_bus_init()
121 snd_hdac_bus_exit(&ebus->bus); in snd_hdac_ext_bus_exit()
142 struct hdac_bus *bus = ebus_to_hbus(ebus); in snd_hdac_ext_bus_device_init() local
154 ret = snd_hdac_device_init(hdev, bus, name, addr); in snd_hdac_ext_bus_device_init()
156 dev_err(bus->dev, "device init failed for hdac device\n"); in snd_hdac_ext_bus_device_init()
164 dev_err(bus->dev, "failed to register hdac device\n"); in snd_hdac_ext_bus_device_init()
198 list_for_each_entry_safe(codec, __codec, &ebus->bus.codec_list, list) { in snd_hdac_ext_bus_device_remove()
[all …]
/sound/pci/hda/
Dhda_controller.c220 struct hdac_bus *bus = azx_bus(chip); in azx_pcm_trigger() local
263 spin_lock(&bus->reg_lock); in azx_pcm_trigger()
279 spin_unlock(&bus->reg_lock); in azx_pcm_trigger()
283 spin_lock(&bus->reg_lock); in azx_pcm_trigger()
288 spin_unlock(&bus->reg_lock); in azx_pcm_trigger()
733 struct hdac_bus *bus = &_bus->core; in snd_hda_attach_pcm_stream() local
734 struct azx *chip = bus_to_azx(bus); in snd_hda_attach_pcm_stream()
797 static int azx_rirb_get_response(struct hdac_bus *bus, unsigned int addr, in azx_rirb_get_response() argument
800 struct azx *chip = bus_to_azx(bus); in azx_rirb_get_response()
801 struct hda_bus *hbus = &chip->bus; in azx_rirb_get_response()
[all …]
Dhda_intel.c566 struct hdac_bus *bus = azx_bus(chip); in intel_get_lctl_scf() local
571 val = readl(bus->mlcap + AZX_ML_BASE + AZX_REG_ML_LCAP); in intel_get_lctl_scf()
585 struct hdac_bus *bus = azx_bus(chip); in intel_ml_lctl_set_power() local
593 val = readl(bus->mlcap + AZX_ML_BASE + AZX_REG_ML_LCTL); in intel_ml_lctl_set_power()
596 writel(val, bus->mlcap + AZX_ML_BASE + AZX_REG_ML_LCTL); in intel_ml_lctl_set_power()
600 if (((readl(bus->mlcap + AZX_ML_BASE + AZX_REG_ML_LCTL)) & in intel_ml_lctl_set_power()
612 struct hdac_bus *bus = azx_bus(chip); in intel_init_lctl() local
617 val = readl(bus->mlcap + AZX_ML_BASE + AZX_REG_ML_LCTL); in intel_init_lctl()
639 writel(val, bus->mlcap + AZX_ML_BASE + AZX_REG_ML_LCTL); in intel_init_lctl()
649 struct hdac_bus *bus = azx_bus(chip); in hda_intel_init_chip() local
[all …]
Dhda_codec.h78 #define to_hda_bus(bus) container_of(bus, struct hda_bus, core) argument
186 struct hda_bus *bus; member
298 #define list_for_each_codec(c, bus) \ argument
299 list_for_each_entry(c, &(bus)->core.codec_list, core.list)
300 #define list_for_each_codec_safe(c, n, bus) \ argument
301 list_for_each_entry_safe(c, n, &(bus)->core.codec_list, core.list)
309 int snd_hda_codec_new(struct hda_bus *bus, struct snd_card *card,
372 snd_hda_queue_unsol_event(struct hda_bus *bus, u32 res, u32 res_ex) in snd_hda_queue_unsol_event() argument
374 snd_hdac_bus_queue_event(&bus->core, res, res_ex); in snd_hda_queue_unsol_event()
469 int snd_hda_lock_devices(struct hda_bus *bus);
[all …]
Dhda_tegra.c91 static int dma_alloc_pages(struct hdac_bus *bus, int type, size_t size, in dma_alloc_pages() argument
94 return snd_dma_alloc_pages(type, bus->dev, size, buf); in dma_alloc_pages()
97 static void dma_free_pages(struct hdac_bus *bus, struct snd_dma_buffer *buf) in dma_free_pages() argument
252 struct hdac_bus *bus = azx_bus(chip); in hda_tegra_suspend() local
257 synchronize_irq(bus->irq); in hda_tegra_suspend()
290 chip->bus.shutdown = 1; in hda_tegra_dev_disconnect()
318 struct hdac_bus *bus = azx_bus(chip); in hda_tegra_init_chip() local
344 bus->remap_addr = hda->regs + HDA_BAR0; in hda_tegra_init_chip()
345 bus->addr = res->start + HDA_BAR0; in hda_tegra_init_chip()
360 struct hdac_bus *bus = azx_bus(chip); in hda_tegra_first_init() local
[all …]
Dhda_codec.c61 struct hda_bus *bus = codec->bus; in codec_exec_verb() local
69 mutex_lock(&bus->core.cmd_mutex); in codec_exec_verb()
71 bus->no_response_fallback = 1; in codec_exec_verb()
72 err = snd_hdac_bus_exec_verb_unlocked(&bus->core, codec->core.addr, in codec_exec_verb()
74 bus->no_response_fallback = 0; in codec_exec_verb()
75 mutex_unlock(&bus->core.cmd_mutex); in codec_exec_verb()
78 if (bus->response_reset) { in codec_exec_verb()
81 snd_hda_bus_reset(bus); in codec_exec_verb()
87 bus->response_reset = 0; in codec_exec_verb()
625 if (codec->bus->shutdown) in snd_hda_shutup_pins()
[all …]
Dhda_sysfs.c539 static void parse_codec_mode(char *buf, struct hda_bus *bus, in parse_codec_mode() argument
547 list_for_each_codec(codec, bus) { in parse_codec_mode()
562 static void parse_pincfg_mode(char *buf, struct hda_bus *bus, in parse_pincfg_mode() argument
568 static void parse_verb_mode(char *buf, struct hda_bus *bus, in parse_verb_mode() argument
574 static void parse_hint_mode(char *buf, struct hda_bus *bus, in parse_hint_mode() argument
580 static void parse_model_mode(char *buf, struct hda_bus *bus, in parse_model_mode() argument
587 static void parse_chip_name_mode(char *buf, struct hda_bus *bus, in parse_chip_name_mode() argument
594 static void parse_##name##_mode(char *buf, struct hda_bus *bus, \
610 void (*parser)(char *buf, struct hda_bus *bus, struct hda_codec **retc);
656 static int parse_line_mode(char *buf, struct hda_bus *bus) in parse_line_mode() argument
[all …]
/sound/pci/ac97/
Dac97_pcm.c300 tmp = (rate * ac97->bus->clock) / 48000; in snd_ac97_set_rate()
446 int snd_ac97_pcm_assign(struct snd_ac97_bus *bus, in snd_ac97_pcm_assign() argument
467 codec = bus->codec[i]; in snd_ac97_pcm_assign()
474 if (bus->codec[j]) in snd_ac97_pcm_assign()
492 rpcm->bus = bus; in snd_ac97_pcm_assign()
496 if (!bus->codec[j]) in snd_ac97_pcm_assign()
516 rpcm->r[0].codec[j] = bus->codec[j]; in snd_ac97_pcm_assign()
518 if (bus->no_vra) in snd_ac97_pcm_assign()
531 bus->codec[0] && (bus->codec[0]->flags & AC97_DOUBLE_RATE) && in snd_ac97_pcm_assign()
539 rpcm->r[1].codec[0] = bus->codec[0]; in snd_ac97_pcm_assign()
[all …]
Dac97_codec.c219 dev_err((ac97)->bus->card->dev, fmt, ##args)
221 dev_warn((ac97)->bus->card->dev, fmt, ##args)
223 dev_dbg((ac97)->bus->card->dev, fmt, ##args)
294 ac97->bus->ops->write(ac97, AC97_RESET, 0); /* reset audio codec */ in snd_ac97_write()
296 ac97->bus->ops->write(ac97, reg, value); in snd_ac97_write()
316 return ac97->bus->ops->read(ac97, reg); in snd_ac97_read()
323 ac97->regs[reg] = ac97->bus->ops->read(ac97, reg); in snd_ac97_read_cache()
347 ac97->bus->ops->write(ac97, reg, value); in snd_ac97_write_cache()
376 ac97->bus->ops->write(ac97, reg, value); in snd_ac97_update()
424 ac97->bus->ops->write(ac97, reg, new); in snd_ac97_update_bits_nolock()
[all …]
Dac97_proc.c435 if (ac97->bus->proc == NULL) in snd_ac97_proc_init()
439 if ((entry = snd_info_create_card_entry(ac97->bus->card, name, ac97->bus->proc)) != NULL) { in snd_ac97_proc_init()
448 if ((entry = snd_info_create_card_entry(ac97->bus->card, name, ac97->bus->proc)) != NULL) { in snd_ac97_proc_init()
470 void snd_ac97_bus_proc_init(struct snd_ac97_bus * bus) in snd_ac97_bus_proc_init() argument
475 sprintf(name, "codec97#%d", bus->num); in snd_ac97_bus_proc_init()
476 if ((entry = snd_info_create_card_entry(bus->card, name, bus->card->proc_root)) != NULL) { in snd_ac97_bus_proc_init()
483 bus->proc = entry; in snd_ac97_bus_proc_init()
486 void snd_ac97_bus_proc_done(struct snd_ac97_bus * bus) in snd_ac97_bus_proc_done() argument
488 snd_info_free_entry(bus->proc); in snd_ac97_bus_proc_done()
489 bus->proc = NULL; in snd_ac97_bus_proc_done()
/sound/pci/ice1712/
Drevo.c95 static void revo_i2c_start(struct snd_i2c_bus *bus) in revo_i2c_start() argument
97 struct snd_ice1712 *ice = bus->private_data; in revo_i2c_start()
101 static void revo_i2c_stop(struct snd_i2c_bus *bus) in revo_i2c_stop() argument
103 struct snd_ice1712 *ice = bus->private_data; in revo_i2c_stop()
107 static void revo_i2c_direction(struct snd_i2c_bus *bus, int clock, int data) in revo_i2c_direction() argument
109 struct snd_ice1712 *ice = bus->private_data; in revo_i2c_direction()
124 static void revo_i2c_setlines(struct snd_i2c_bus *bus, int clk, int data) in revo_i2c_setlines() argument
126 struct snd_ice1712 *ice = bus->private_data; in revo_i2c_setlines()
139 static int revo_i2c_getdata(struct snd_i2c_bus *bus, int ack) in revo_i2c_getdata() argument
141 struct snd_ice1712 *ice = bus->private_data; in revo_i2c_getdata()
/sound/
Dac97_bus.c33 ac97->id = ac97->bus->ops->read(ac97, AC97_VENDOR_ID1) << 16; in snd_ac97_check_id()
34 ac97->id |= ac97->bus->ops->read(ac97, AC97_VENDOR_ID2); in snd_ac97_check_id()
62 struct snd_ac97_bus_ops *ops = ac97->bus->ops; in snd_ac97_reset()

1234