Home
last modified time | relevance | path

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

123

/sound/core/seq/
Dseq_midi_emul.c34 struct snd_midi_channel *chan,
38 struct snd_midi_channel *chan,
40 static void rpn(struct snd_midi_op *ops, void *drv, struct snd_midi_channel *chan,
42 static void nrpn(struct snd_midi_op *ops, void *drv, struct snd_midi_channel *chan,
47 struct snd_midi_channel *chan);
49 struct snd_midi_channel *chan);
50 static void snd_midi_reset_controllers(struct snd_midi_channel *chan);
73 struct snd_midi_channel *chan; in snd_midi_process_event() local
93 chan = chanset->channels + dest_channel; in snd_midi_process_event()
115 if (chan->note[ev->data.note.note] & SNDRV_MIDI_NOTE_ON) { in snd_midi_process_event()
[all …]
/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
95 #define LPAIF_RDMA_REG_ADDR(v, addr, chan) \ argument
96 (v->rdma_reg_base + (addr) + v->rdma_reg_stride * (chan))
100 #define LPAIF_RDMACTL_REG(v, chan) LPAIF_RDMA_REG_ADDR(v, 0x00, (chan)) argument
101 #define LPAIF_RDMABASE_REG(v, chan) LPAIF_RDMA_REG_ADDR(v, 0x04, (chan)) argument
102 #define LPAIF_RDMABUFF_REG(v, chan) LPAIF_RDMA_REG_ADDR(v, 0x08, (chan)) argument
103 #define LPAIF_RDMACURR_REG(v, chan) LPAIF_RDMA_REG_ADDR(v, 0x0C, (chan)) argument
[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) in apq8016_lpass_free_dma_channel() argument
156 clear_bit(chan, &drvdata->dma_ch_bit_map); in apq8016_lpass_free_dma_channel()
Dlpass-platform.c427 int chan, u32 interrupts) in lpass_dma_interrupt_handler() argument
434 if (interrupts & LPAIF_IRQ_PER(chan)) { in lpass_dma_interrupt_handler()
437 LPAIF_IRQ_PER(chan)); in lpass_dma_interrupt_handler()
447 if (interrupts & LPAIF_IRQ_XRUN(chan)) { in lpass_dma_interrupt_handler()
450 LPAIF_IRQ_XRUN(chan)); in lpass_dma_interrupt_handler()
461 if (interrupts & LPAIF_IRQ_ERR(chan)) { in lpass_dma_interrupt_handler()
464 LPAIF_IRQ_ERR(chan)); in lpass_dma_interrupt_handler()
483 int rv, chan; in lpass_platform_lpaif_irq() local
493 for (chan = 0; chan < LPASS_MAX_DMA_CHANNELS; chan++) { in lpass_platform_lpaif_irq()
494 if (irqs & LPAIF_IRQ_ALL(chan) && drvdata->substream[chan]) { in lpass_platform_lpaif_irq()
[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
153 if (data->chan) { in sprd_pcm_release_dma_channel()
154 dma_release_channel(data->chan); in sprd_pcm_release_dma_channel()
155 data->chan = NULL; in sprd_pcm_release_dma_channel()
180 data->chan = dma_request_slave_channel(dev, in sprd_pcm_request_dma_channel()
182 if (!data->chan) { in sprd_pcm_request_dma_channel()
240 struct dma_chan *chan = data->chan; in sprd_pcm_hw_params() local
277 ret = dmaengine_slave_config(chan, &config); in sprd_pcm_hw_params()
290 data->desc = chan->device->device_prep_slave_sg(chan, sg, in sprd_pcm_hw_params()
350 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()
311 dma_release_channel(stream->dma[0].chan); in sprd_platform_compr_set_params()
313 dma_release_channel(stream->dma[1].chan); in sprd_platform_compr_set_params()
408 if (dma->chan) { in sprd_platform_compr_free()
409 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
237 vp->chan); in snd_opl3_timer_func()
276 void snd_opl3_note_on(void *p, int note, int vel, struct snd_midi_channel *chan) in snd_opl3_note_on() argument
308 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);
Dopl3_drums.c122 int vel, struct snd_midi_channel *chan) in snd_opl3_drum_vol_set() argument
131 snd_opl3_calc_volume(&reg_val, vel, chan); in snd_opl3_drum_vol_set()
138 if (chan->gm_pan < 43) in snd_opl3_drum_vol_set()
140 if (chan->gm_pan > 85) in snd_opl3_drum_vol_set()
170 struct snd_midi_channel *chan) in snd_opl3_drum_switch() argument
203 snd_opl3_drum_vol_set(opl3, drum_voice, vel, chan); in snd_opl3_drum_switch()
/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 …]
Dopl4_local.h162 struct snd_midi_channel *chan; member
225 void snd_opl4_note_on(void *p, int note, int vel, struct snd_midi_channel *chan);
226 void snd_opl4_note_off(void *p, int note, int vel, struct snd_midi_channel *chan);
227 void snd_opl4_terminate_note(void *p, int note, struct snd_midi_channel *chan);
228 void snd_opl4_control(void *p, int type, struct snd_midi_channel *chan);
/sound/soc/
Dsoc-generic-dmaengine-pcm.c25 struct dma_chan *chan[SNDRV_PCM_STREAM_LAST + 1]; member
39 if (!pcm->chan[substream->stream]) in dmaengine_dma_dev()
42 return pcm->chan[substream->stream]->device->dev; in dmaengine_dma_dev()
85 struct dma_chan *chan = snd_dmaengine_pcm_get_chan(substream); in dmaengine_pcm_hw_params() local
104 ret = dmaengine_slave_config(chan, &slave_config); in dmaengine_pcm_hw_params()
119 struct dma_chan *chan = pcm->chan[substream->stream]; in dmaengine_pcm_set_runtime_hwparams() local
148 ret = dma_get_slave_caps(chan, &dma_caps); in dmaengine_pcm_set_runtime_hwparams()
208 struct dma_chan *chan = pcm->chan[substream->stream]; in dmaengine_pcm_open() local
215 return snd_dmaengine_pcm_open(substream, chan); in dmaengine_pcm_open()
230 if ((pcm->flags & SND_DMAENGINE_PCM_FLAG_HALF_DUPLEX) && pcm->chan[0]) in dmaengine_pcm_compat_request_channel()
[all …]
/sound/soc/txx9/
Dtxx9aclc.c123 struct dma_chan *chan = dmadata->dma_chan; in txx9aclc_dma_submit() local
131 desc = dmaengine_prep_slave_sg(chan, &sg, 1, in txx9aclc_dma_submit()
136 dev_err(&chan->dev->device, "cannot prepare slave dma\n"); in txx9aclc_dma_submit()
150 struct dma_chan *chan = dmadata->dma_chan; in txx9aclc_dma_tasklet() local
164 dmaengine_terminate_all(chan); in txx9aclc_dma_tasklet()
173 dma_async_issue_pending(chan); in txx9aclc_dma_tasklet()
192 dma_async_issue_pending(chan); in txx9aclc_dma_tasklet()
267 struct dma_chan *chan = dmadata->dma_chan; in txx9aclc_pcm_close() local
270 dmaengine_terminate_all(chan); in txx9aclc_pcm_close()
327 static bool filter(struct dma_chan *chan, void *param) in filter() argument
[all …]
/sound/soc/sh/rcar/
Ddma.c24 struct dma_chan *chan; member
103 if (dmaen->chan) in rsnd_dmaen_stop()
104 dmaengine_terminate_all(dmaen->chan); in rsnd_dmaen_stop()
121 if (dmaen->chan) in rsnd_dmaen_cleanup()
122 dma_release_channel(dmaen->chan); in rsnd_dmaen_cleanup()
124 dmaen->chan = NULL; in rsnd_dmaen_cleanup()
138 if (dmaen->chan) in rsnd_dmaen_prepare()
146 dmaen->chan = rsnd_dmaen_request_channel(io, in rsnd_dmaen_prepare()
149 if (IS_ERR_OR_NULL(dmaen->chan)) { in rsnd_dmaen_prepare()
150 dmaen->chan = NULL; in rsnd_dmaen_prepare()
[all …]
/sound/mips/
Dsgio2audio.c360 src_pos = readq(&mace->perif.audio.chan[ch].read_ptr); in snd_sgio2audio_dma_pull_frag()
383 writeq(src_pos, &mace->perif.audio.chan[ch].read_ptr); /* in bytes */ in snd_sgio2audio_dma_pull_frag()
408 dst_pos = readq(&mace->perif.audio.chan[ch].write_ptr); in snd_sgio2audio_dma_push_frag()
433 writeq(dst_pos, &mace->perif.audio.chan[ch].write_ptr); /* in bytes */ in snd_sgio2audio_dma_push_frag()
443 struct snd_sgio2audio_chan *chan = substream->runtime->private_data; in snd_sgio2audio_dma_start() local
444 int ch = chan->idx; in snd_sgio2audio_dma_start()
447 writeq(CHANNEL_CONTROL_RESET, &mace->perif.audio.chan[ch].control); in snd_sgio2audio_dma_start()
449 writeq(0, &mace->perif.audio.chan[ch].control); in snd_sgio2audio_dma_start()
457 &mace->perif.audio.chan[ch].control); in snd_sgio2audio_dma_start()
463 struct snd_sgio2audio_chan *chan = substream->runtime->private_data; in snd_sgio2audio_dma_stop() local
[all …]
/sound/soc/fsl/
Dimx-pcm-dma.c22 static bool filter(struct dma_chan *chan, void *param) in filter() argument
24 if (!imx_dma_is_general_purpose(chan)) in filter()
27 chan->private = param; in filter()
/sound/soc/cirrus/
Dep93xx-pcm.c38 static bool ep93xx_pcm_dma_filter(struct dma_chan *chan, void *filter_param) in ep93xx_pcm_dma_filter() argument
42 if (data->direction == ep93xx_dma_chan_direction(chan)) { in ep93xx_pcm_dma_filter()
43 chan->private = data; in ep93xx_pcm_dma_filter()
/sound/soc/img/
Dimg-i2s-in.c98 static inline void img_i2s_in_ch_writel(struct img_i2s_in *i2s, u32 chan, in img_i2s_in_ch_writel() argument
101 writel(val, i2s->channel_base + (chan * IMG_I2S_IN_CH_STRIDE) + reg); in img_i2s_in_ch_writel()
104 static inline u32 img_i2s_in_ch_readl(struct img_i2s_in *i2s, u32 chan, in img_i2s_in_ch_readl() argument
107 return readl(i2s->channel_base + (chan * IMG_I2S_IN_CH_STRIDE) + reg); in img_i2s_in_ch_readl()
110 static inline void img_i2s_in_ch_disable(struct img_i2s_in *i2s, u32 chan) in img_i2s_in_ch_disable() argument
114 reg = img_i2s_in_ch_readl(i2s, chan, IMG_I2S_IN_CH_CTL); in img_i2s_in_ch_disable()
116 img_i2s_in_ch_writel(i2s, chan, reg, IMG_I2S_IN_CH_CTL); in img_i2s_in_ch_disable()
119 static inline void img_i2s_in_ch_enable(struct img_i2s_in *i2s, u32 chan) in img_i2s_in_ch_enable() argument
123 reg = img_i2s_in_ch_readl(i2s, chan, IMG_I2S_IN_CH_CTL); in img_i2s_in_ch_enable()
125 img_i2s_in_ch_writel(i2s, chan, reg, IMG_I2S_IN_CH_CTL); in img_i2s_in_ch_enable()

123