Home
last modified time | relevance | path

Searched refs:cdev (Results 1 – 22 of 22) sorted by relevance

/sound/usb/caiaq/
Daudio.c30 #define MAKE_CHECKBYTE(cdev,stream,i) \ argument
31 (stream << 1) | (~(i / (cdev->n_streams * BYTES_PER_SAMPLE_USB)) & 1)
51 activate_substream(struct snd_usb_caiaqdev *cdev, in activate_substream() argument
54 spin_lock(&cdev->spinlock); in activate_substream()
57 cdev->sub_playback[sub->number] = sub; in activate_substream()
59 cdev->sub_capture[sub->number] = sub; in activate_substream()
61 spin_unlock(&cdev->spinlock); in activate_substream()
65 deactivate_substream(struct snd_usb_caiaqdev *cdev, in deactivate_substream() argument
69 spin_lock_irqsave(&cdev->spinlock, flags); in deactivate_substream()
72 cdev->sub_playback[sub->number] = NULL; in deactivate_substream()
[all …]
Ddevice.c149 struct snd_usb_caiaqdev *cdev = urb->context; in usb_ep1_command_reply_dispatch() local
152 if (urb->status || !cdev) { in usb_ep1_command_reply_dispatch()
159 memcpy(&cdev->spec, buf+1, sizeof(struct caiaq_device_spec)); in usb_ep1_command_reply_dispatch()
160 cdev->spec.fw_version = le16_to_cpu(cdev->spec.fw_version); in usb_ep1_command_reply_dispatch()
163 cdev->spec.fw_version, in usb_ep1_command_reply_dispatch()
164 cdev->spec.num_analog_audio_in, in usb_ep1_command_reply_dispatch()
165 cdev->spec.num_analog_audio_out, in usb_ep1_command_reply_dispatch()
166 cdev->spec.num_midi_in, in usb_ep1_command_reply_dispatch()
167 cdev->spec.num_midi_out, in usb_ep1_command_reply_dispatch()
168 cdev->spec.data_alignment); in usb_ep1_command_reply_dispatch()
[all …]
Dinput.c190 static inline void snd_caiaq_input_report_abs(struct snd_usb_caiaqdev *cdev, in snd_caiaq_input_report_abs() argument
194 input_report_abs(cdev->input_dev, axis, in snd_caiaq_input_report_abs()
198 static void snd_caiaq_input_read_analog(struct snd_usb_caiaqdev *cdev, in snd_caiaq_input_read_analog() argument
202 struct input_dev *input_dev = cdev->input_dev; in snd_caiaq_input_read_analog()
204 switch (cdev->chip.usb_id) { in snd_caiaq_input_read_analog()
206 snd_caiaq_input_report_abs(cdev, ABS_X, buf, 2); in snd_caiaq_input_read_analog()
207 snd_caiaq_input_report_abs(cdev, ABS_Y, buf, 0); in snd_caiaq_input_read_analog()
208 snd_caiaq_input_report_abs(cdev, ABS_Z, buf, 1); in snd_caiaq_input_read_analog()
213 snd_caiaq_input_report_abs(cdev, ABS_X, buf, 0); in snd_caiaq_input_read_analog()
214 snd_caiaq_input_report_abs(cdev, ABS_Y, buf, 1); in snd_caiaq_input_read_analog()
[all …]
Dmidi.c28 struct snd_usb_caiaqdev *cdev = substream->rmidi->private_data; in snd_usb_caiaq_midi_input_trigger() local
30 if (!cdev) in snd_usb_caiaq_midi_input_trigger()
33 cdev->midi_receive_substream = up ? substream : NULL; in snd_usb_caiaq_midi_input_trigger()
44 struct snd_usb_caiaqdev *cdev = substream->rmidi->private_data; in snd_usb_caiaq_midi_output_close() local
45 if (cdev->midi_out_active) { in snd_usb_caiaq_midi_output_close()
46 usb_kill_urb(&cdev->midi_out_urb); in snd_usb_caiaq_midi_output_close()
47 cdev->midi_out_active = 0; in snd_usb_caiaq_midi_output_close()
52 static void snd_usb_caiaq_midi_send(struct snd_usb_caiaqdev *cdev, in snd_usb_caiaq_midi_send() argument
56 struct device *dev = caiaqdev_to_dev(cdev); in snd_usb_caiaq_midi_send()
58 cdev->midi_out_buf[0] = EP1_CMD_MIDI_WRITE; in snd_usb_caiaq_midi_send()
[all …]
Dcontrol.c24 struct snd_usb_caiaqdev *cdev = caiaqdev(chip->card); in control_info() local
32 switch (cdev->chip.usb_id) { in control_info()
70 struct snd_usb_caiaqdev *cdev = caiaqdev(chip->card); in control_get() local
75 = cdev->control_state[pos & ~CNT_INTVAL]; in control_get()
78 = !!(cdev->control_state[pos / 8] & (1 << pos % 8)); in control_get()
87 struct snd_usb_caiaqdev *cdev = caiaqdev(chip->card); in control_put() local
92 switch (cdev->chip.usb_id) { in control_put()
107 cdev->control_state[i] = v; in control_put()
109 if (cdev->chip.usb_id == in control_put()
113 cdev->ep8_out_buf[0] = i; in control_put()
[all …]
Ddevice.h119 struct snd_usb_caiaqdev *cdev; member
126 int snd_usb_caiaq_set_audio_params (struct snd_usb_caiaqdev *cdev, int rate, int depth, int bbp);
127 int snd_usb_caiaq_set_auto_msg (struct snd_usb_caiaqdev *cdev, int digital, int analog, int erp);
128 int snd_usb_caiaq_send_command(struct snd_usb_caiaqdev *cdev,
132 int snd_usb_caiaq_send_command_bank(struct snd_usb_caiaqdev *cdev,
Dinput.h5 void snd_usb_caiaq_input_dispatch(struct snd_usb_caiaqdev *cdev, char *buf, unsigned int len);
6 int snd_usb_caiaq_input_init(struct snd_usb_caiaqdev *cdev);
7 void snd_usb_caiaq_input_free(struct snd_usb_caiaqdev *cdev);
Daudio.h5 int snd_usb_caiaq_audio_init(struct snd_usb_caiaqdev *cdev);
6 void snd_usb_caiaq_audio_free(struct snd_usb_caiaqdev *cdev);
Dmidi.h5 int snd_usb_caiaq_midi_init(struct snd_usb_caiaqdev *cdev);
6 void snd_usb_caiaq_midi_handle_input(struct snd_usb_caiaqdev *cdev,
Dcontrol.h5 int snd_usb_caiaq_control_init(struct snd_usb_caiaqdev *cdev);
/sound/soc/intel/catpt/
Ddsp.c29 struct dma_chan *catpt_dma_request_config_chan(struct catpt_dev *cdev) in catpt_dma_request_config_chan() argument
39 chan = dma_request_channel(mask, catpt_dma_filter, cdev->dev); in catpt_dma_request_config_chan()
41 dev_err(cdev->dev, "request channel failed\n"); in catpt_dma_request_config_chan()
54 dev_err(cdev->dev, "slave config failed: %d\n", ret); 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
73 dev_err(cdev->dev, "prep dma memcpy failed\n"); in catpt_dma_memcpy()
78 catpt_updatel_shim(cdev, HMDC, in catpt_dma_memcpy()
84 dev_err(cdev->dev, "submit tx failed: %d\n", ret); in catpt_dma_memcpy()
93 catpt_updatel_shim(cdev, HMDC, in catpt_dma_memcpy()
99 int catpt_dma_memcpy_todsp(struct catpt_dev *cdev, struct dma_chan *chan, in catpt_dma_memcpy_todsp() argument
[all …]
Ddevice.c33 struct catpt_dev *cdev = dev_get_drvdata(dev); in catpt_suspend() local
37 chan = catpt_dma_request_config_chan(cdev); in catpt_suspend()
41 memset(&cdev->dx_ctx, 0, sizeof(cdev->dx_ctx)); in catpt_suspend()
42 ret = catpt_ipc_enter_dxstate(cdev, CATPT_DX_STATE_D3, &cdev->dx_ctx); in catpt_suspend()
48 ret = catpt_dsp_stall(cdev, true); in catpt_suspend()
52 ret = catpt_store_memdumps(cdev, chan); in catpt_suspend()
54 dev_err(cdev->dev, "store memdumps failed: %d\n", ret); in catpt_suspend()
58 ret = catpt_store_module_states(cdev, chan); in catpt_suspend()
60 dev_err(cdev->dev, "store module states failed: %d\n", ret); in catpt_suspend()
64 ret = catpt_store_streams_context(cdev, chan); in catpt_suspend()
[all …]
Dloader.c89 int catpt_store_streams_context(struct catpt_dev *cdev, struct dma_chan *chan) in catpt_store_streams_context() argument
93 list_for_each_entry(stream, &cdev->stream_list, node) { in catpt_store_streams_context()
99 dev_dbg(cdev->dev, "storing stream %d ctx: off 0x%08x size %d\n", in catpt_store_streams_context()
102 ret = catpt_dma_memcpy_fromdsp(cdev, chan, in catpt_store_streams_context()
103 cdev->dxbuf_paddr + off, in catpt_store_streams_context()
104 cdev->lpe_base + off, in catpt_store_streams_context()
107 dev_err(cdev->dev, "memcpy fromdsp failed: %d\n", ret); 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
119 for (i = 0; i < ARRAY_SIZE(cdev->modules); i++) { in catpt_store_module_states()
124 type = &cdev->modules[i]; in catpt_store_module_states()
[all …]
Dregisters.h133 #define catpt_num_dram(cdev) (hweight_long((cdev)->spec->dram_mask)) argument
134 #define catpt_num_iram(cdev) (hweight_long((cdev)->spec->iram_mask)) argument
135 #define catpt_dram_size(cdev) (catpt_num_dram(cdev) * CATPT_MEMBLOCK_SIZE) argument
136 #define catpt_iram_size(cdev) (catpt_num_iram(cdev) * CATPT_MEMBLOCK_SIZE) argument
140 #define catpt_shim_addr(cdev) \ argument
141 ((cdev)->lpe_ba + (cdev)->spec->host_shim_offset)
142 #define catpt_dma_addr(cdev, dma) \ argument
143 ((cdev)->lpe_ba + (cdev)->spec->host_dma_offset[dma])
144 #define catpt_ssp_addr(cdev, ssp) \ argument
145 ((cdev)->lpe_ba + (cdev)->spec->host_ssp_offset[ssp])
[all …]
Dipc.c55 static void catpt_dsp_send_tx(struct catpt_dev *cdev, in catpt_dsp_send_tx() argument
63 memcpy_toio(catpt_outbox_addr(cdev), tx->data, tx->size); in catpt_dsp_send_tx()
64 catpt_writel_shim(cdev, IPCC, header); in catpt_dsp_send_tx()
67 static int catpt_wait_msg_completion(struct catpt_dev *cdev, int timeout) in catpt_wait_msg_completion() argument
69 struct catpt_ipc *ipc = &cdev->ipc; in catpt_wait_msg_completion()
85 static int catpt_dsp_do_send_msg(struct catpt_dev *cdev, in catpt_dsp_do_send_msg() argument
89 struct catpt_ipc *ipc = &cdev->ipc; in catpt_dsp_do_send_msg()
101 catpt_dsp_send_tx(cdev, &request); in catpt_dsp_do_send_msg()
104 ret = catpt_wait_msg_completion(cdev, timeout); in catpt_dsp_do_send_msg()
106 dev_crit(cdev->dev, "communication severed: %d, rebooting dsp..\n", in catpt_dsp_do_send_msg()
[all …]
Dcore.h83 void (*pll_shutdown)(struct catpt_dev *cdev, bool enable);
84 int (*power_up)(struct catpt_dev *cdev);
85 int (*power_down)(struct catpt_dev *cdev);
117 int catpt_dmac_probe(struct catpt_dev *cdev);
118 void catpt_dmac_remove(struct catpt_dev *cdev);
119 struct dma_chan *catpt_dma_request_config_chan(struct catpt_dev *cdev);
120 int catpt_dma_memcpy_todsp(struct catpt_dev *cdev, struct dma_chan *chan,
123 int catpt_dma_memcpy_fromdsp(struct catpt_dev *cdev, struct dma_chan *chan,
127 void lpt_dsp_pll_shutdown(struct catpt_dev *cdev, bool enable);
128 void wpt_dsp_pll_shutdown(struct catpt_dev *cdev, bool enable);
[all …]
Dpcm.c101 catpt_stream_find(struct catpt_dev *cdev, u8 stream_hw_id) in catpt_stream_find() argument
105 spin_lock(&cdev->list_lock); in catpt_stream_find()
106 list_for_each_entry(pos, &cdev->stream_list, node) { in catpt_stream_find()
113 spin_unlock(&cdev->list_lock); in catpt_stream_find()
117 static u32 catpt_stream_read_position(struct catpt_dev *cdev, in catpt_stream_read_position() argument
122 memcpy_fromio(&pos, cdev->lpe_ba + stream->info.read_pos_regaddr, in catpt_stream_read_position()
127 static u32 catpt_stream_volume(struct catpt_dev *cdev, in catpt_stream_volume() argument
136 memcpy_fromio(&volume, cdev->lpe_ba + offset, sizeof(volume)); in catpt_stream_volume()
140 static u32 catpt_mixer_volume(struct catpt_dev *cdev, in catpt_mixer_volume() argument
149 memcpy_fromio(&volume, cdev->lpe_ba + offset, sizeof(volume)); in catpt_mixer_volume()
[all …]
Dmessages.c13 int catpt_ipc_get_fw_version(struct catpt_dev *cdev, in catpt_ipc_get_fw_version() argument
24 ret = catpt_dsp_send_msg(cdev, request, &reply); in catpt_ipc_get_fw_version()
26 dev_err(cdev->dev, "get fw version failed: %d\n", ret); in catpt_ipc_get_fw_version()
45 int catpt_ipc_alloc_stream(struct catpt_dev *cdev, in catpt_ipc_alloc_stream() argument
97 ret = catpt_dsp_send_msg(cdev, request, &reply); in catpt_ipc_alloc_stream()
99 dev_err(cdev->dev, "alloc stream type %d failed: %d\n", in catpt_ipc_alloc_stream()
106 int catpt_ipc_free_stream(struct catpt_dev *cdev, u8 stream_hw_id) in catpt_ipc_free_stream() argument
116 ret = catpt_dsp_send_msg(cdev, request, NULL); in catpt_ipc_free_stream()
118 dev_err(cdev->dev, "free stream %d failed: %d\n", in catpt_ipc_free_stream()
124 int catpt_ipc_set_device_format(struct catpt_dev *cdev, in catpt_ipc_set_device_format() argument
[all …]
Dsysfs.c14 struct catpt_dev *cdev = dev_get_drvdata(dev); in fw_version_show() local
18 pm_runtime_get_sync(cdev->dev); in fw_version_show()
20 ret = catpt_ipc_get_fw_version(cdev, &version); in fw_version_show()
22 pm_runtime_mark_last_busy(cdev->dev); in fw_version_show()
23 pm_runtime_put_autosuspend(cdev->dev); in fw_version_show()
36 struct catpt_dev *cdev = dev_get_drvdata(dev); in fw_info_show() local
38 return sprintf(buf, "%s\n", cdev->ipc.config.fw_info); in fw_info_show()
Dmessages.h69 int catpt_ipc_get_fw_version(struct catpt_dev *cdev,
207 int catpt_ipc_alloc_stream(struct catpt_dev *cdev,
217 int catpt_ipc_free_stream(struct catpt_dev *cdev, u8 stream_hw_id);
248 int catpt_ipc_set_device_format(struct catpt_dev *cdev,
273 int catpt_ipc_enter_dxstate(struct catpt_dev *cdev, enum catpt_dx_state state,
282 int catpt_ipc_get_mixer_stream_info(struct catpt_dev *cdev,
326 int catpt_ipc_reset_stream(struct catpt_dev *cdev, u8 stream_hw_id);
327 int catpt_ipc_pause_stream(struct catpt_dev *cdev, u8 stream_hw_id);
328 int catpt_ipc_resume_stream(struct catpt_dev *cdev, u8 stream_hw_id);
337 int catpt_ipc_set_volume(struct catpt_dev *cdev, u8 stream_hw_id,
[all …]
/sound/isa/cs423x/
Dcs4236.c294 struct pnp_dev *cdev) in snd_card_cs423x_pnp() argument
299 if (cdev) in snd_card_cs423x_pnp()
300 cport[dev] = pnp_port_start(cdev, 0); in snd_card_cs423x_pnp()
547 struct pnp_dev *cdev, *iter; in snd_cs423x_pnpbios_detect() local
562 cdev = NULL; in snd_cs423x_pnpbios_detect()
565 cdev = iter; in snd_cs423x_pnpbios_detect()
572 err = snd_card_cs423x_pnp(dev, card->private_data, pdev, cdev); in snd_cs423x_pnpbios_detect()
/sound/pci/hda/
Dhda_generic.c3922 struct led_classdev *cdev; in create_mute_led_cdev() local
3926 cdev = devm_kzalloc(&codec->core.dev, sizeof(*cdev), GFP_KERNEL); in create_mute_led_cdev()
3927 if (!cdev) in create_mute_led_cdev()
3930 cdev->name = micmute ? "hda::micmute" : "hda::mute"; in create_mute_led_cdev()
3931 cdev->max_brightness = 1; in create_mute_led_cdev()
3932 cdev->default_trigger = micmute ? "audio-micmute" : "audio-mute"; in create_mute_led_cdev()
3933 cdev->brightness_set_blocking = callback; in create_mute_led_cdev()
3934 cdev->brightness = ledtrig_audio_get(idx); in create_mute_led_cdev()
3935 cdev->flags = LED_CORE_SUSPENDRESUME; in create_mute_led_cdev()
3937 err = led_classdev_register(&codec->core.dev, cdev); in create_mute_led_cdev()
[all …]