/sound/usb/caiaq/ |
D | audio.c | 30 #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 …]
|
D | device.c | 135 struct snd_usb_caiaqdev *cdev = urb->context; in usb_ep1_command_reply_dispatch() local 138 if (urb->status || !cdev) { in usb_ep1_command_reply_dispatch() 145 memcpy(&cdev->spec, buf+1, sizeof(struct caiaq_device_spec)); in usb_ep1_command_reply_dispatch() 146 cdev->spec.fw_version = le16_to_cpu(cdev->spec.fw_version); in usb_ep1_command_reply_dispatch() 149 cdev->spec.fw_version, in usb_ep1_command_reply_dispatch() 150 cdev->spec.num_analog_audio_in, in usb_ep1_command_reply_dispatch() 151 cdev->spec.num_analog_audio_out, in usb_ep1_command_reply_dispatch() 152 cdev->spec.num_midi_in, in usb_ep1_command_reply_dispatch() 153 cdev->spec.num_midi_out, in usb_ep1_command_reply_dispatch() 154 cdev->spec.data_alignment); in usb_ep1_command_reply_dispatch() [all …]
|
D | input.c | 190 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 …]
|
D | midi.c | 28 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 …]
|
D | control.c | 24 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 …]
|
D | device.h | 119 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,
|
D | input.h | 5 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);
|
D | audio.h | 5 int snd_usb_caiaq_audio_init(struct snd_usb_caiaqdev *cdev); 6 void snd_usb_caiaq_audio_free(struct snd_usb_caiaqdev *cdev);
|
/sound/soc/intel/catpt/ |
D | dsp.c | 29 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 …]
|
D | device.c | 33 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 …]
|
D | loader.c | 89 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 …]
|
D | registers.h | 133 #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 …]
|
D | ipc.c | 55 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 …]
|
D | core.h | 74 void (*pll_shutdown)(struct catpt_dev *cdev, bool enable); 106 int catpt_dmac_probe(struct catpt_dev *cdev); 107 void catpt_dmac_remove(struct catpt_dev *cdev); 108 struct dma_chan *catpt_dma_request_config_chan(struct catpt_dev *cdev); 109 int catpt_dma_memcpy_todsp(struct catpt_dev *cdev, struct dma_chan *chan, 112 int catpt_dma_memcpy_fromdsp(struct catpt_dev *cdev, struct dma_chan *chan, 116 void lpt_dsp_pll_shutdown(struct catpt_dev *cdev, bool enable); 117 void wpt_dsp_pll_shutdown(struct catpt_dev *cdev, bool enable); 118 int catpt_dsp_power_up(struct catpt_dev *cdev); 119 int catpt_dsp_power_down(struct catpt_dev *cdev); [all …]
|
D | pcm.c | 101 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 …]
|
D | messages.c | 13 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 …]
|
D | sysfs.c | 14 struct catpt_dev *cdev = dev_get_drvdata(dev); in fw_version_show() local 18 ret = pm_runtime_resume_and_get(cdev->dev); in fw_version_show() 22 ret = catpt_ipc_get_fw_version(cdev, &version); in fw_version_show() 24 pm_runtime_mark_last_busy(cdev->dev); in fw_version_show() 25 pm_runtime_put_autosuspend(cdev->dev); in fw_version_show() 38 struct catpt_dev *cdev = dev_get_drvdata(dev); in fw_info_show() local 40 return sysfs_emit(buf, "%s\n", cdev->ipc.config.fw_info); in fw_info_show()
|
D | messages.h | 69 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); 246 int catpt_ipc_set_device_format(struct catpt_dev *cdev, 271 int catpt_ipc_enter_dxstate(struct catpt_dev *cdev, enum catpt_dx_state state, 280 int catpt_ipc_get_mixer_stream_info(struct catpt_dev *cdev, 324 int catpt_ipc_reset_stream(struct catpt_dev *cdev, u8 stream_hw_id); 325 int catpt_ipc_pause_stream(struct catpt_dev *cdev, u8 stream_hw_id); 326 int catpt_ipc_resume_stream(struct catpt_dev *cdev, u8 stream_hw_id); 335 int catpt_ipc_set_volume(struct catpt_dev *cdev, u8 stream_hw_id, [all …]
|
/sound/soc/sof/ |
D | sof-client.c | 29 struct sof_client_dev *cdev; member 41 struct sof_client_dev *cdev; member 49 struct sof_client_dev *cdev = auxiliary_dev_to_sof_client_dev(auxdev); in sof_client_auxdev_release() local 51 kfree(cdev->auxdev.dev.platform_data); in sof_client_auxdev_release() 52 kfree(cdev); in sof_client_auxdev_release() 55 static int sof_client_dev_add_data(struct sof_client_dev *cdev, const void *data, in sof_client_dev_add_data() argument 66 cdev->auxdev.dev.platform_data = d; in sof_client_dev_add_data() 174 struct sof_client_dev *cdev; in sof_client_dev_register() local 177 cdev = kzalloc(sizeof(*cdev), GFP_KERNEL); in sof_client_dev_register() 178 if (!cdev) in sof_client_dev_register() [all …]
|
D | sof-client.h | 30 #define sof_client_dev_to_sof_dev(cdev) ((cdev)->sdev) argument 38 int sof_client_ipc_tx_message(struct sof_client_dev *cdev, void *ipc_msg, 41 struct dentry *sof_client_get_debugfs_root(struct sof_client_dev *cdev); 42 struct device *sof_client_get_dma_dev(struct sof_client_dev *cdev); 43 const struct sof_ipc_fw_version *sof_client_get_fw_version(struct sof_client_dev *cdev); 44 size_t sof_client_get_ipc_max_payload_size(struct sof_client_dev *cdev); 45 enum sof_ipc_type sof_client_get_ipc_type(struct sof_client_dev *cdev); 48 int sof_client_core_module_get(struct sof_client_dev *cdev); 49 void sof_client_core_module_put(struct sof_client_dev *cdev); 52 typedef void (*sof_client_event_callback)(struct sof_client_dev *cdev, void *msg_buf); [all …]
|
D | sof-client-probes.c | 93 static int sof_probes_init(struct sof_client_dev *cdev, u32 stream_tag, in sof_probes_init() argument 110 ret = sof_client_ipc_tx_message(cdev, msg, &reply, sizeof(reply)); in sof_probes_init() 123 static int sof_probes_deinit(struct sof_client_dev *cdev) in sof_probes_deinit() argument 131 return sof_client_ipc_tx_message(cdev, &msg, &reply, sizeof(reply)); in sof_probes_deinit() 134 static int sof_probes_info(struct sof_client_dev *cdev, unsigned int cmd, in sof_probes_info() argument 137 size_t max_msg_size = sof_client_get_ipc_max_payload_size(cdev); in sof_probes_info() 152 ret = sof_client_ipc_tx_message(cdev, &msg, reply, max_msg_size); in sof_probes_info() 186 static int sof_probes_points_info(struct sof_client_dev *cdev, in sof_probes_points_info() argument 190 return sof_probes_info(cdev, SOF_IPC_PROBE_POINT_INFO, in sof_probes_points_info() 207 static int sof_probes_points_add(struct sof_client_dev *cdev, in sof_probes_points_add() argument [all …]
|
D | sof-client-ipc-msg-injector.c | 35 struct sof_client_dev *cdev = inode->i_private; in sof_msg_inject_dfs_open() local 38 if (sof_client_get_fw_state(cdev) == SOF_FW_CRASHED) in sof_msg_inject_dfs_open() 55 struct sof_client_dev *cdev = file->private_data; in sof_msg_inject_dfs_read() local 56 struct sof_msg_inject_priv *priv = cdev->data; in sof_msg_inject_dfs_read() 76 struct sof_client_dev *cdev = file->private_data; in sof_msg_inject_ipc4_dfs_read() local 77 struct sof_msg_inject_priv *priv = cdev->data; in sof_msg_inject_ipc4_dfs_read() 122 static int sof_msg_inject_send_message(struct sof_client_dev *cdev) in sof_msg_inject_send_message() argument 124 struct sof_msg_inject_priv *priv = cdev->data; in sof_msg_inject_send_message() 125 struct device *dev = &cdev->auxdev.dev; in sof_msg_inject_send_message() 135 ret = sof_client_ipc_tx_message(cdev, priv->tx_buffer, priv->rx_buffer, in sof_msg_inject_send_message() [all …]
|
D | sof-client-ipc-flood-test.c | 38 struct sof_client_dev *cdev = inode->i_private; in sof_ipc_flood_dfs_open() local 41 if (sof_client_get_fw_state(cdev) == SOF_FW_CRASHED) in sof_ipc_flood_dfs_open() 59 static int sof_debug_ipc_flood_test(struct sof_client_dev *cdev, in sof_debug_ipc_flood_test() argument 64 struct sof_ipc_flood_priv *priv = cdev->data; in sof_debug_ipc_flood_test() 65 struct device *dev = &cdev->auxdev.dev; in sof_debug_ipc_flood_test() 87 ret = sof_client_ipc_tx_message(cdev, &hdr, &reply, sizeof(reply)); in sof_debug_ipc_flood_test() 157 struct sof_client_dev *cdev = file->private_data; in sof_ipc_flood_dfs_write() local 158 struct device *dev = &cdev->auxdev.dev; in sof_ipc_flood_dfs_write() 227 ret = sof_debug_ipc_flood_test(cdev, flood_duration_test, in sof_ipc_flood_dfs_write() 247 struct sof_client_dev *cdev = file->private_data; in sof_ipc_flood_dfs_read() local [all …]
|
D | sof-client-probes.h | 17 int (*startup)(struct sof_client_dev *cdev, struct snd_compr_stream *cstream, 19 int (*shutdown)(struct sof_client_dev *cdev, struct snd_compr_stream *cstream, 21 int (*set_params)(struct sof_client_dev *cdev, struct snd_compr_stream *cstream, 24 int (*trigger)(struct sof_client_dev *cdev, struct snd_compr_stream *cstream, 26 int (*pointer)(struct sof_client_dev *cdev, struct snd_compr_stream *cstream,
|
/sound/soc/sof/intel/ |
D | hda-probes.c | 28 static int hda_probes_compr_startup(struct sof_client_dev *cdev, in hda_probes_compr_startup() argument 32 struct snd_sof_dev *sdev = sof_client_dev_to_sof_dev(cdev); in hda_probes_compr_startup() 48 static int hda_probes_compr_shutdown(struct sof_client_dev *cdev, in hda_probes_compr_shutdown() argument 53 struct snd_sof_dev *sdev = sof_client_dev_to_sof_dev(cdev); in hda_probes_compr_shutdown() 69 static int hda_probes_compr_set_params(struct sof_client_dev *cdev, in hda_probes_compr_set_params() argument 75 struct snd_sof_dev *sdev = sof_client_dev_to_sof_dev(cdev); in hda_probes_compr_set_params() 103 static int hda_probes_compr_trigger(struct sof_client_dev *cdev, in hda_probes_compr_trigger() argument 108 struct snd_sof_dev *sdev = sof_client_dev_to_sof_dev(cdev); in hda_probes_compr_trigger() 113 static int hda_probes_compr_pointer(struct sof_client_dev *cdev, in hda_probes_compr_pointer() argument
|