Home
last modified time | relevance | path

Searched refs:chan (Results 1 – 25 of 73) sorted by relevance

123

/sound/soc/qcom/
Dlpass-lpaif-reg.h87 #define LPAIF_IRQ_PER(chan) (1 << (LPAIF_IRQ_BITSTRIDE * (chan))) argument
88 #define LPAIF_IRQ_XRUN(chan) (2 << (LPAIF_IRQ_BITSTRIDE * (chan))) argument
89 #define LPAIF_IRQ_ERR(chan) (4 << (LPAIF_IRQ_BITSTRIDE * (chan))) argument
91 #define LPAIF_IRQ_ALL(chan) (7 << (LPAIF_IRQ_BITSTRIDE * (chan))) argument
92 #define LPAIF_IRQ_HDMI_REQ_ON_PRELOAD(chan) (1 << (14 + chan)) argument
93 #define LPAIF_IRQ_HDMI_SDEEP_AUD_DIS(chan) (1 << (24 + chan)) argument
97 #define LPAIF_HDMI_RDMA_REG_ADDR(v, addr, chan) \ argument
98 (v->hdmi_rdma_reg_base + (addr) + v->hdmi_rdma_reg_stride * (chan))
102 #define LPAIF_HDMI_RDMACTL_REG(v, chan) LPAIF_HDMI_RDMA_REG_ADDR(v, 0x00, (chan)) argument
103 #define LPAIF_HDMI_RDMABASE_REG(v, chan) LPAIF_HDMI_RDMA_REG_ADDR(v, 0x04, (chan)) argument
[all …]
Dlpass-sc7180.c82 int chan = 0; in sc7180_lpass_alloc_dma_channel() local
86 chan = find_first_zero_bit(&drvdata->hdmi_dma_ch_bit_map, in sc7180_lpass_alloc_dma_channel()
89 if (chan >= v->hdmi_rdma_channels) in sc7180_lpass_alloc_dma_channel()
92 set_bit(chan, &drvdata->hdmi_dma_ch_bit_map); in sc7180_lpass_alloc_dma_channel()
95 chan = find_first_zero_bit(&drvdata->dma_ch_bit_map, in sc7180_lpass_alloc_dma_channel()
98 if (chan >= v->rdma_channels) in sc7180_lpass_alloc_dma_channel()
101 chan = find_next_zero_bit(&drvdata->dma_ch_bit_map, in sc7180_lpass_alloc_dma_channel()
106 if (chan >= v->wrdma_channel_start + v->wrdma_channels) in sc7180_lpass_alloc_dma_channel()
110 set_bit(chan, &drvdata->dma_ch_bit_map); in sc7180_lpass_alloc_dma_channel()
112 return chan; in sc7180_lpass_alloc_dma_channel()
[all …]
Dlpass-platform.c634 int chan, u32 interrupts) in lpass_dma_interrupt_handler() argument
645 mask = LPAIF_IRQ_ALL(chan); in lpass_dma_interrupt_handler()
650 val = (LPAIF_IRQ_HDMI_REQ_ON_PRELOAD(chan) | in lpass_dma_interrupt_handler()
652 LPAIF_IRQ_HDMI_SDEEP_AUD_DIS(chan)); in lpass_dma_interrupt_handler()
667 if (interrupts & LPAIF_IRQ_PER(chan)) { in lpass_dma_interrupt_handler()
668 rv = regmap_write_bits(map, reg, mask, (LPAIF_IRQ_PER(chan) | val)); in lpass_dma_interrupt_handler()
678 if (interrupts & LPAIF_IRQ_XRUN(chan)) { in lpass_dma_interrupt_handler()
679 rv = regmap_write_bits(map, reg, mask, (LPAIF_IRQ_XRUN(chan) | val)); in lpass_dma_interrupt_handler()
690 if (interrupts & LPAIF_IRQ_ERR(chan)) { in lpass_dma_interrupt_handler()
691 rv = regmap_write_bits(map, reg, mask, (LPAIF_IRQ_ERR(chan) | val)); in lpass_dma_interrupt_handler()
[all …]
Dlpass-apq8016.c131 int chan = 0; in apq8016_lpass_alloc_dma_channel() local
134 chan = find_first_zero_bit(&drvdata->dma_ch_bit_map, in apq8016_lpass_alloc_dma_channel()
137 if (chan >= v->rdma_channels) in apq8016_lpass_alloc_dma_channel()
140 chan = find_next_zero_bit(&drvdata->dma_ch_bit_map, in apq8016_lpass_alloc_dma_channel()
145 if (chan >= v->wrdma_channel_start + v->wrdma_channels) in apq8016_lpass_alloc_dma_channel()
149 set_bit(chan, &drvdata->dma_ch_bit_map); in apq8016_lpass_alloc_dma_channel()
151 return chan; in apq8016_lpass_alloc_dma_channel()
154 static int apq8016_lpass_free_dma_channel(struct lpass_data *drvdata, int chan, unsigned int dai_id) in apq8016_lpass_free_dma_channel() argument
156 clear_bit(chan, &drvdata->dma_ch_bit_map); in apq8016_lpass_free_dma_channel()
/sound/core/seq/
Dseq_midi_emul.c34 struct snd_midi_channel *chan,
38 struct snd_midi_channel *chan,
41 struct snd_midi_channel *chan,
44 struct snd_midi_channel *chan,
50 struct snd_midi_channel *chan);
52 struct snd_midi_channel *chan);
53 static void snd_midi_reset_controllers(struct snd_midi_channel *chan);
76 struct snd_midi_channel *chan; in snd_midi_process_event() local
96 chan = chanset->channels + dest_channel; in snd_midi_process_event()
118 if (chan->note[ev->data.note.note] & SNDRV_MIDI_NOTE_ON) { in snd_midi_process_event()
[all …]
/sound/soc/sprd/
Dsprd-mcdt.c112 struct sprd_mcdt_chan chan[MCDT_CHANNEL_NUM]; member
531 struct sprd_mcdt_chan *chan = &mcdt->chan[i]; in sprd_mcdt_irq_handler() local
534 if (chan->cb) in sprd_mcdt_irq_handler()
535 chan->cb->notify(chan->cb->data); in sprd_mcdt_irq_handler()
541 struct sprd_mcdt_chan *chan = in sprd_mcdt_irq_handler() local
542 &mcdt->chan[i + MCDT_ADC_CHANNEL_NUM]; in sprd_mcdt_irq_handler()
545 if (chan->cb) in sprd_mcdt_irq_handler()
546 chan->cb->notify(chan->cb->data); in sprd_mcdt_irq_handler()
569 int sprd_mcdt_chan_write(struct sprd_mcdt_chan *chan, char *tx_buf, u32 size) in sprd_mcdt_chan_write() argument
571 struct sprd_mcdt_dev *mcdt = chan->mcdt; in sprd_mcdt_chan_write()
[all …]
Dsprd-mcdt.h54 void sprd_mcdt_free_chan(struct sprd_mcdt_chan *chan);
56 int sprd_mcdt_chan_write(struct sprd_mcdt_chan *chan, char *tx_buf, u32 size);
57 int sprd_mcdt_chan_read(struct sprd_mcdt_chan *chan, char *rx_buf, u32 size);
58 int sprd_mcdt_chan_int_enable(struct sprd_mcdt_chan *chan, u32 water_mark,
60 void sprd_mcdt_chan_int_disable(struct sprd_mcdt_chan *chan);
62 int sprd_mcdt_chan_dma_enable(struct sprd_mcdt_chan *chan,
64 void sprd_mcdt_chan_dma_disable(struct sprd_mcdt_chan *chan);
74 void sprd_mcdt_free_chan(struct sprd_mcdt_chan *chan) in sprd_mcdt_free_chan() argument
77 int sprd_mcdt_chan_write(struct sprd_mcdt_chan *chan, char *tx_buf, u32 size) in sprd_mcdt_chan_write() argument
82 int sprd_mcdt_chan_read(struct sprd_mcdt_chan *chan, char *rx_buf, u32 size) in sprd_mcdt_chan_read() argument
[all …]
Dsprd-pcm-dma.c21 struct dma_chan *chan; member
149 if (data->chan) { in sprd_pcm_release_dma_channel()
150 dma_release_channel(data->chan); in sprd_pcm_release_dma_channel()
151 data->chan = NULL; in sprd_pcm_release_dma_channel()
174 data->chan = dma_request_slave_channel(dev, in sprd_pcm_request_dma_channel()
176 if (!data->chan) { in sprd_pcm_request_dma_channel()
229 struct dma_chan *chan = data->chan; in sprd_pcm_hw_params() local
266 ret = dmaengine_slave_config(chan, &config); in sprd_pcm_hw_params()
279 data->desc = chan->device->device_prep_slave_sg(chan, sg, in sprd_pcm_hw_params()
337 dma_async_issue_pending(data->chan); in sprd_pcm_trigger()
[all …]
Dsprd-pcm-compress.c43 struct dma_chan *chan; member
156 dma->chan = dma_request_slave_channel(dev, in sprd_platform_compr_dma_config()
158 if (!dma->chan) { in sprd_platform_compr_dma_config()
227 ret = dmaengine_slave_config(dma->chan, &config); in sprd_platform_compr_dma_config()
238 dma->desc = dma->chan->device->device_prep_slave_sg(dma->chan, sg, in sprd_platform_compr_dma_config()
260 dma_release_channel(dma->chan); in sprd_platform_compr_dma_config()
309 dma_release_channel(stream->dma[0].chan); in sprd_platform_compr_set_params()
311 dma_release_channel(stream->dma[1].chan); in sprd_platform_compr_set_params()
403 if (dma->chan) { in sprd_platform_compr_free()
404 dma_release_channel(dma->chan); in sprd_platform_compr_free()
[all …]
/sound/drivers/opl3/
Dopl3_midi.c15 struct snd_midi_channel *chan);
47 struct snd_midi_channel *chan) in snd_opl3_calc_volume() argument
52 volume = (vel * chan->gm_volume * chan->gm_expression) / (127*127); in snd_opl3_calc_volume()
80 int note, struct snd_midi_channel *chan) in snd_opl3_calc_pitch() argument
86 if (chan->midi_pitchbend) { in snd_opl3_calc_pitch()
87 int pitchbend = chan->midi_pitchbend; in snd_opl3_calc_pitch()
125 struct snd_midi_channel *chan) { in opl3_get_voice() argument
236 vp->chan); in snd_opl3_timer_func()
275 void snd_opl3_note_on(void *p, int note, int vel, struct snd_midi_channel *chan) in snd_opl3_note_on() argument
307 chan->number, chan->midi_program, note, vel); in snd_opl3_note_on()
[all …]
Dopl3_voice.h18 void snd_opl3_note_on(void *p, int note, int vel, struct snd_midi_channel *chan);
19 void snd_opl3_note_off(void *p, int note, int vel, struct snd_midi_channel *chan);
20 void snd_opl3_key_press(void *p, int note, int vel, struct snd_midi_channel *chan);
21 void snd_opl3_terminate_note(void *p, int note, struct snd_midi_channel *chan);
22 void snd_opl3_control(void *p, int type, struct snd_midi_channel *chan);
23 void snd_opl3_nrpn(void *p, struct snd_midi_channel *chan, struct snd_midi_channel_set *chset);
26 void snd_opl3_calc_volume(unsigned char *reg, int vel, struct snd_midi_channel *chan);
31 …3_drum_switch(struct snd_opl3 *opl3, int note, int vel, int on_off, struct snd_midi_channel *chan);
/sound/synth/emux/
Demux_synth.c27 int *notep, int vel, struct snd_midi_channel *chan,
29 static int get_bank(struct snd_emux_port *port, struct snd_midi_channel *chan);
31 struct snd_midi_channel *chan, int free);
46 snd_emux_note_on(void *p, int note, int vel, struct snd_midi_channel *chan) in snd_emux_note_on() argument
56 if (snd_BUG_ON(!port || !chan)) in snd_emux_note_on()
64 nvoices = get_zone(emu, port, &note, vel, chan, table); in snd_emux_note_on()
77 terminate_note1(emu, key, chan, 0); in snd_emux_note_on()
96 vp->chan = chan; in snd_emux_note_on()
121 vp->chan == chan) { in snd_emux_note_on()
132 struct snd_emux_effect_table *fx = chan->private; in snd_emux_note_on()
[all …]
Demux_effect.c86 effect_set_byte(unsigned char *valp, struct snd_midi_channel *chan, int type) in effect_set_byte() argument
89 struct snd_emux_effect_table *fx = chan->private; in effect_set_byte()
107 effect_set_word(unsigned short *valp, struct snd_midi_channel *chan, int type) in effect_set_word() argument
110 struct snd_emux_effect_table *fx = chan->private; in effect_set_word()
124 effect_get_offset(struct snd_midi_channel *chan, int lo, int hi, int mode) in effect_get_offset() argument
127 struct snd_emux_effect_table *fx = chan->private; in effect_get_offset()
143 struct snd_midi_channel *chan, int type, int val) in snd_emux_send_effect_oss() argument
155 snd_emux_send_effect(port, chan, type, val, mode); in snd_emux_send_effect_oss()
163 snd_emux_send_effect(struct snd_emux_port *port, struct snd_midi_channel *chan, in snd_emux_send_effect() argument
174 fx = chan->private; in snd_emux_send_effect()
[all …]
Demux_nrpn.c40 struct snd_midi_channel *chan, in send_converted_effect() argument
47 snd_emux_send_effect(port, chan, table[i].effect, in send_converted_effect()
273 snd_emux_nrpn(void *p, struct snd_midi_channel *chan, in snd_emux_nrpn() argument
279 if (snd_BUG_ON(!port || !chan)) in snd_emux_nrpn()
282 if (chan->control[MIDI_CTL_NONREG_PARM_NUM_MSB] == 127 && in snd_emux_nrpn()
283 chan->control[MIDI_CTL_NONREG_PARM_NUM_LSB] <= 26) { in snd_emux_nrpn()
287 val = (chan->control[MIDI_CTL_MSB_DATA_ENTRY] << 7) | in snd_emux_nrpn()
288 chan->control[MIDI_CTL_LSB_DATA_ENTRY]; in snd_emux_nrpn()
292 port, chan, chan->control[MIDI_CTL_NONREG_PARM_NUM_LSB], in snd_emux_nrpn()
298 chan->control[MIDI_CTL_NONREG_PARM_NUM_MSB] == 1) { in snd_emux_nrpn()
[all …]
Demux_voice.h34 void snd_emux_note_on(void *p, int note, int vel, struct snd_midi_channel *chan);
35 void snd_emux_note_off(void *p, int note, int vel, struct snd_midi_channel *chan);
36 void snd_emux_key_press(void *p, int note, int vel, struct snd_midi_channel *chan);
37 void snd_emux_terminate_note(void *p, int note, struct snd_midi_channel *chan);
38 void snd_emux_control(void *p, int type, struct snd_midi_channel *chan);
42 struct snd_midi_channel *chan, int update);
54 struct snd_midi_channel *chan, int type, int val);
56 struct snd_midi_channel *chan, int type, int val, int mode);
63 struct snd_midi_channel *chan, int param);
64 void snd_emux_nrpn(void *private_data, struct snd_midi_channel *chan,
Demux_oss.c327 struct snd_midi_channel *chan; in emuspec_control() local
331 chan = NULL; in emuspec_control()
333 chan = &port->chset.channels[voice]; in emuspec_control()
345 if (chan) in emuspec_control()
346 snd_emux_send_effect_oss(port, chan, p1, p2); in emuspec_control()
375 if (chan) { in emuspec_control()
376 chan->midi_pressure = p1; in emuspec_control()
377 snd_emux_update_channel(port, chan, SNDRV_EMUX_UPDATE_FMMOD|SNDRV_EMUX_UPDATE_FM2FRQ2); in emuspec_control()
389 chan = &port->chset.channels[i]; in emuspec_control()
390 chan->drum_channel = ((port->drum_flags >> i) & 1) ? 1 : 0; in emuspec_control()
[all …]
/sound/drivers/opl4/
Dopl4_synth.c312 static void snd_opl4_do_for_note(struct snd_opl4 *opl4, int note, struct snd_midi_channel *chan, in snd_opl4_do_for_note() argument
322 if (voice->chan == chan && voice->note == note) { in snd_opl4_do_for_note()
333 struct snd_midi_channel *chan, in snd_opl4_do_for_channel() argument
343 if (voice->chan == chan) { in snd_opl4_do_for_channel()
363 if (voice->chan) in snd_opl4_do_for_all()
375 att += snd_opl4_volume_table[voice->chan->gm_volume & 0x7f]; in snd_opl4_update_volume()
376 att += snd_opl4_volume_table[voice->chan->gm_expression & 0x7f]; in snd_opl4_update_volume()
392 if (!voice->chan->drum_channel) in snd_opl4_update_pan()
393 pan += (voice->chan->control[MIDI_CTL_MSB_PAN] - 0x40) >> 3; in snd_opl4_update_pan()
408 if (voice->chan->drum_channel) in snd_opl4_update_vibrato_depth()
[all …]
/sound/mips/
Dsnd-n64.c62 } chan; member
82 struct snd_pcm_runtime *runtime = priv->chan.substream->runtime; in n64audio_push()
86 spin_lock_irqsave(&priv->chan.lock, flags); in n64audio_push()
88 count = priv->chan.writesize; in n64audio_push()
90 memcpy(priv->ring_base + priv->chan.nextpos, in n64audio_push()
91 runtime->dma_area + priv->chan.nextpos, count); in n64audio_push()
98 n64audio_write_reg(priv, AI_ADDR_REG, priv->ring_base_dma + priv->chan.nextpos); in n64audio_push()
102 priv->chan.nextpos += count; in n64audio_push()
103 priv->chan.nextpos %= priv->chan.bufsize; in n64audio_push()
107 spin_unlock_irqrestore(&priv->chan.lock, flags); in n64audio_push()
[all …]
Dsgio2audio.c359 src_pos = readq(&mace->perif.audio.chan[ch].read_ptr); in snd_sgio2audio_dma_pull_frag()
382 writeq(src_pos, &mace->perif.audio.chan[ch].read_ptr); /* in bytes */ in snd_sgio2audio_dma_pull_frag()
407 dst_pos = readq(&mace->perif.audio.chan[ch].write_ptr); in snd_sgio2audio_dma_push_frag()
432 writeq(dst_pos, &mace->perif.audio.chan[ch].write_ptr); /* in bytes */ in snd_sgio2audio_dma_push_frag()
442 struct snd_sgio2audio_chan *chan = substream->runtime->private_data; in snd_sgio2audio_dma_start() local
443 int ch = chan->idx; in snd_sgio2audio_dma_start()
446 writeq(CHANNEL_CONTROL_RESET, &mace->perif.audio.chan[ch].control); in snd_sgio2audio_dma_start()
448 writeq(0, &mace->perif.audio.chan[ch].control); in snd_sgio2audio_dma_start()
456 &mace->perif.audio.chan[ch].control); in snd_sgio2audio_dma_start()
462 struct snd_sgio2audio_chan *chan = substream->runtime->private_data; in snd_sgio2audio_dma_stop() local
[all …]
/sound/soc/
Dsoc-generic-dmaengine-pcm.c31 if (!pcm->chan[substream->stream]) in dmaengine_dma_dev()
34 return pcm->chan[substream->stream]->device->dev; in dmaengine_dma_dev()
81 struct dma_chan *chan = snd_dmaengine_pcm_get_chan(substream); in dmaengine_pcm_hw_params() local
99 ret = dmaengine_slave_config(chan, &slave_config); in dmaengine_pcm_hw_params()
114 struct dma_chan *chan = pcm->chan[substream->stream]; in dmaengine_pcm_set_runtime_hwparams() local
151 chan); in dmaengine_pcm_set_runtime_hwparams()
160 struct dma_chan *chan = pcm->chan[substream->stream]; in dmaengine_pcm_open() local
167 return snd_dmaengine_pcm_open(substream, chan); in dmaengine_pcm_open()
199 if ((pcm->flags & SND_DMAENGINE_PCM_FLAG_HALF_DUPLEX) && pcm->chan[0]) in dmaengine_pcm_compat_request_channel()
200 return pcm->chan[0]; in dmaengine_pcm_compat_request_channel()
[all …]
/sound/soc/intel/catpt/
Dloader.c89 int catpt_store_streams_context(struct catpt_dev *cdev, struct dma_chan *chan) in catpt_store_streams_context() argument
102 ret = catpt_dma_memcpy_fromdsp(cdev, chan, in catpt_store_streams_context()
115 int catpt_store_module_states(struct catpt_dev *cdev, struct dma_chan *chan) in catpt_store_module_states() argument
132 ret = catpt_dma_memcpy_fromdsp(cdev, chan, in catpt_store_module_states()
145 int catpt_store_memdumps(struct catpt_dev *cdev, struct dma_chan *chan) in catpt_store_memdumps() argument
165 ret = catpt_dma_memcpy_fromdsp(cdev, chan, in catpt_store_memdumps()
179 catpt_restore_streams_context(struct catpt_dev *cdev, struct dma_chan *chan) in catpt_restore_streams_context() argument
192 ret = catpt_dma_memcpy_todsp(cdev, chan, in catpt_restore_streams_context()
205 static int catpt_restore_memdumps(struct catpt_dev *cdev, struct dma_chan *chan) in catpt_restore_memdumps() argument
225 ret = catpt_dma_memcpy_todsp(cdev, chan, in catpt_restore_memdumps()
[all …]
Ddsp.c17 static bool catpt_dma_filter(struct dma_chan *chan, void *param) in catpt_dma_filter() argument
19 return param == chan->device->dev; in catpt_dma_filter()
32 struct dma_chan *chan; in catpt_dma_request_config_chan() local
39 chan = dma_request_channel(mask, catpt_dma_filter, cdev->dev); in catpt_dma_request_config_chan()
40 if (!chan) { in catpt_dma_request_config_chan()
52 ret = dmaengine_slave_config(chan, &config); in catpt_dma_request_config_chan()
55 dma_release_channel(chan); in catpt_dma_request_config_chan()
59 return chan; in catpt_dma_request_config_chan()
62 static int catpt_dma_memcpy(struct catpt_dev *cdev, struct dma_chan *chan, in catpt_dma_memcpy() argument
70 desc = dmaengine_prep_dma_memcpy(chan, dst_addr, src_addr, size, in catpt_dma_memcpy()
[all …]
/sound/soc/sh/rcar/
Ddma.c24 struct dma_chan *chan; member
104 if (dmaen->chan) in rsnd_dmaen_stop()
105 dmaengine_terminate_async(dmaen->chan); in rsnd_dmaen_stop()
122 if (dmaen->chan) in rsnd_dmaen_cleanup()
123 dma_release_channel(dmaen->chan); in rsnd_dmaen_cleanup()
125 dmaen->chan = NULL; in rsnd_dmaen_cleanup()
139 if (dmaen->chan) in rsnd_dmaen_prepare()
147 dmaen->chan = rsnd_dmaen_request_channel(io, in rsnd_dmaen_prepare()
150 if (IS_ERR_OR_NULL(dmaen->chan)) { in rsnd_dmaen_prepare()
151 dmaen->chan = NULL; in rsnd_dmaen_prepare()
[all …]
/sound/soc/tegra/
Dtegra_pcm.c75 struct dma_chan *chan; in tegra_pcm_open() local
95 chan = dma_request_slave_channel(cpu_dai->dev, dmap->chan_name); in tegra_pcm_open()
96 if (!chan) { in tegra_pcm_open()
103 ret = snd_dmaengine_pcm_open(substream, chan); in tegra_pcm_open()
109 dma_release_channel(chan); in tegra_pcm_open()
139 struct dma_chan *chan; in tegra_pcm_hw_params() local
149 chan = snd_dmaengine_pcm_get_chan(substream); in tegra_pcm_hw_params()
168 ret = dmaengine_slave_config(chan, &slave_config); in tegra_pcm_hw_params()
/sound/core/
Dpcm_dmaengine.c150 struct dma_chan *chan = prtd->dma_chan; in dmaengine_pcm_prepare_and_submit() local
161 desc = dmaengine_prep_dma_cyclic(chan, in dmaengine_pcm_prepare_and_submit()
301 struct dma_chan *chan) in snd_dmaengine_pcm_open() argument
306 if (!chan) in snd_dmaengine_pcm_open()
318 prtd->dma_chan = chan; in snd_dmaengine_pcm_open()
397 struct dma_chan *chan) in snd_dmaengine_pcm_refine_runtime_hwparams() argument
406 if (!hw || !chan || !dma_data) in snd_dmaengine_pcm_refine_runtime_hwparams()
409 ret = dma_get_slave_caps(chan, &dma_caps); in snd_dmaengine_pcm_refine_runtime_hwparams()

123