Home
last modified time | relevance | path

Searched refs:buf (Results 1 – 25 of 207) sorted by relevance

123456789

/sound/firewire/bebob/
Dbebob_command.c14 u8 *buf; in avc_audio_set_selector() local
17 buf = kzalloc(12, GFP_KERNEL); in avc_audio_set_selector()
18 if (buf == NULL) in avc_audio_set_selector()
21 buf[0] = 0x00; /* AV/C CONTROL */ in avc_audio_set_selector()
22 buf[1] = 0x08 | (0x07 & subunit_id); /* AUDIO SUBUNIT ID */ in avc_audio_set_selector()
23 buf[2] = 0xb8; /* FUNCTION BLOCK */ in avc_audio_set_selector()
24 buf[3] = 0x80; /* type is 'selector'*/ in avc_audio_set_selector()
25 buf[4] = 0xff & fb_id; /* function block id */ in avc_audio_set_selector()
26 buf[5] = 0x10; /* control attribute is CURRENT */ in avc_audio_set_selector()
27 buf[6] = 0x02; /* selector length is 2 */ in avc_audio_set_selector()
[all …]
Dbebob.h123 snd_bebob_read_block(struct fw_unit *unit, u64 addr, void *buf, int size) in snd_bebob_read_block() argument
127 buf, size, 0); in snd_bebob_read_block()
131 snd_bebob_read_quad(struct fw_unit *unit, u64 addr, u32 *buf) in snd_bebob_read_quad() argument
135 (void *)buf, sizeof(u32), 0); in snd_bebob_read_quad()
173 avc_bridgeco_fill_unit_addr(u8 buf[AVC_BRIDGECO_ADDR_BYTES], in avc_bridgeco_fill_unit_addr()
178 buf[0] = 0xff; /* Unit */ in avc_bridgeco_fill_unit_addr()
179 buf[1] = dir; in avc_bridgeco_fill_unit_addr()
180 buf[2] = AVC_BRIDGECO_PLUG_MODE_UNIT; in avc_bridgeco_fill_unit_addr()
181 buf[3] = unit; in avc_bridgeco_fill_unit_addr()
182 buf[4] = 0xff & pid; in avc_bridgeco_fill_unit_addr()
[all …]
Dbebob_maudio.c135 get_meter(struct snd_bebob *bebob, void *buf, unsigned int size) in get_meter() argument
139 buf, size, 0); in get_meter()
146 u8 *buf; in check_clk_sync() local
148 buf = kmalloc(size, GFP_KERNEL); in check_clk_sync()
149 if (buf == NULL) in check_clk_sync()
152 err = get_meter(bebob, buf, size); in check_clk_sync()
157 *sync = (buf[size - 2] != 0xff); in check_clk_sync()
159 kfree(buf); in check_clk_sync()
174 u8 *buf; in avc_maudio_set_special_clk() local
180 buf = kmalloc(12, GFP_KERNEL); in avc_maudio_set_special_clk()
[all …]
Dbebob_focusrite.c61 u32 *buf, unsigned int size) in saffire_read_block() argument
65 __be32 *tmp = (__be32 *)buf; in saffire_read_block()
74 buf[i] = be32_to_cpu(tmp[i]); in saffire_read_block()
230 saffire_meter_get(struct snd_bebob *bebob, u32 *buf, unsigned int size) in saffire_meter_get() argument
246 err = saffire_read_block(bebob, offset, buf, size); in saffire_meter_get()
248 swap(buf[1], buf[3]); in saffire_meter_get()
249 swap(buf[2], buf[3]); in saffire_meter_get()
250 swap(buf[3], buf[4]); in saffire_meter_get()
252 swap(buf[7], buf[10]); in saffire_meter_get()
253 swap(buf[8], buf[10]); in saffire_meter_get()
[all …]
/sound/firewire/oxfw/
Doxfw-command.c14 u8 *buf; in avc_stream_set_format() local
17 buf = kmalloc(len + 10, GFP_KERNEL); in avc_stream_set_format()
18 if (buf == NULL) in avc_stream_set_format()
21 buf[0] = 0x00; /* CONTROL */ in avc_stream_set_format()
22 buf[1] = 0xff; /* UNIT */ in avc_stream_set_format()
23 buf[2] = 0xbf; /* EXTENDED STREAM FORMAT INFORMATION */ in avc_stream_set_format()
24 buf[3] = 0xc0; /* SINGLE subfunction */ in avc_stream_set_format()
25 buf[4] = dir; /* Plug Direction */ in avc_stream_set_format()
26 buf[5] = 0x00; /* UNIT */ in avc_stream_set_format()
27 buf[6] = 0x00; /* PCR (Isochronous Plug) */ in avc_stream_set_format()
[all …]
Doxfw-spkr.c31 u8 *buf; in avc_audio_feature_mute() local
35 buf = kmalloc(11, GFP_KERNEL); in avc_audio_feature_mute()
36 if (!buf) in avc_audio_feature_mute()
40 buf[0] = 0x01; /* AV/C, STATUS */ in avc_audio_feature_mute()
43 buf[0] = 0x00; /* AV/C, CONTROL */ in avc_audio_feature_mute()
46 buf[1] = 0x08; /* audio unit 0 */ in avc_audio_feature_mute()
47 buf[2] = 0xb8; /* FUNCTION BLOCK */ in avc_audio_feature_mute()
48 buf[3] = 0x81; /* function block type: feature */ in avc_audio_feature_mute()
49 buf[4] = fb_id; /* function block ID */ in avc_audio_feature_mute()
50 buf[5] = 0x10; /* control attribute: current */ in avc_audio_feature_mute()
[all …]
/sound/usb/caiaq/
Dinput.c204 int axis, const unsigned char *buf, in snd_caiaq_input_report_abs() argument
208 (buf[offset * 2] << 8) | buf[offset * 2 + 1]); in snd_caiaq_input_report_abs()
212 const unsigned char *buf, in snd_caiaq_input_read_analog() argument
219 snd_caiaq_input_report_abs(cdev, ABS_X, buf, 2); in snd_caiaq_input_read_analog()
220 snd_caiaq_input_report_abs(cdev, ABS_Y, buf, 0); in snd_caiaq_input_read_analog()
221 snd_caiaq_input_report_abs(cdev, ABS_Z, buf, 1); in snd_caiaq_input_read_analog()
226 snd_caiaq_input_report_abs(cdev, ABS_X, buf, 0); in snd_caiaq_input_read_analog()
227 snd_caiaq_input_report_abs(cdev, ABS_Y, buf, 1); in snd_caiaq_input_read_analog()
228 snd_caiaq_input_report_abs(cdev, ABS_Z, buf, 2); in snd_caiaq_input_read_analog()
231 snd_caiaq_input_report_abs(cdev, ABS_HAT0X, buf, 4); in snd_caiaq_input_read_analog()
[all …]
/sound/firewire/
Dfcp.c33 u8 *buf; in avc_general_set_sig_fmt() local
47 buf = kzalloc(8, GFP_KERNEL); in avc_general_set_sig_fmt()
48 if (buf == NULL) in avc_general_set_sig_fmt()
51 buf[0] = 0x00; /* AV/C CONTROL */ in avc_general_set_sig_fmt()
52 buf[1] = 0xff; /* UNIT */ in avc_general_set_sig_fmt()
54 buf[2] = 0x19; /* INPUT PLUG SIGNAL FORMAT */ in avc_general_set_sig_fmt()
56 buf[2] = 0x18; /* OUTPUT PLUG SIGNAL FORMAT */ in avc_general_set_sig_fmt()
57 buf[3] = 0xff & pid; /* plug id */ in avc_general_set_sig_fmt()
58 buf[4] = 0x90; /* EOH_1, Form_1, FMT. AM824 */ in avc_general_set_sig_fmt()
59 buf[5] = 0x07 & sfc; /* FDF-hi. AM824, frequency */ in avc_general_set_sig_fmt()
[all …]
/sound/firewire/dice/
Ddice-proc.c115 } buf; in dice_proc_read() local
126 quadlets = min_t(u32, sections[1], sizeof(buf.global) / 4); in dice_proc_read()
127 if (dice_proc_read_mem(dice, &buf.global, sections[0], quadlets) < 0) in dice_proc_read()
131 buf.global.owner_hi >> 16, in dice_proc_read()
132 buf.global.owner_hi & 0xffff, buf.global.owner_lo); in dice_proc_read()
133 snd_iprintf(buffer, " notification: %08x\n", buf.global.notification); in dice_proc_read()
134 dice_proc_fixup_string(buf.global.nick_name, NICK_NAME_SIZE); in dice_proc_read()
135 snd_iprintf(buffer, " nick name: %s\n", buf.global.nick_name); in dice_proc_read()
138 buf.global.clock_select & CLOCK_SOURCE_MASK), in dice_proc_read()
140 (buf.global.clock_select & CLOCK_RATE_MASK) in dice_proc_read()
[all …]
Ddice.h116 void *buf, unsigned int len);
119 void *buf, unsigned int len);
123 void *buf, unsigned int len) in snd_dice_transaction_write_global() argument
127 buf, len); in snd_dice_transaction_write_global()
131 void *buf, unsigned int len) in snd_dice_transaction_read_global() argument
135 buf, len); in snd_dice_transaction_read_global()
139 void *buf, unsigned int len) in snd_dice_transaction_write_tx() argument
142 buf, len); in snd_dice_transaction_write_tx()
146 void *buf, unsigned int len) in snd_dice_transaction_read_tx() argument
149 buf, len); in snd_dice_transaction_read_tx()
[all …]
/sound/core/seq/
Dseq_midi_event.c52 static void note_decode(struct snd_seq_event *ev, unsigned char *buf);
53 static void one_param_decode(struct snd_seq_event *ev, unsigned char *buf);
54 static void pitchbend_decode(struct snd_seq_event *ev, unsigned char *buf);
55 static void two_param_decode(struct snd_seq_event *ev, unsigned char *buf);
56 static void songpos_decode(struct snd_seq_event *ev, unsigned char *buf);
65 void (*decode)(struct snd_seq_event *ev, unsigned char *buf);
96 static int extra_decode_ctrl14(struct snd_midi_event *dev, unsigned char *buf, int len,
98 static int extra_decode_xrpn(struct snd_midi_event *dev, unsigned char *buf, int count,
103 int (*decode)(struct snd_midi_event *dev, unsigned char *buf, int len,
124 dev->buf = kmalloc(bufsize, GFP_KERNEL); in snd_midi_event_new()
[all …]
/sound/pci/hda/
Dhda_eld.c148 #define GRAB_BITS(buf, byte, lowbit, bits) \ argument
154 (buf[byte] >> (lowbit)) & ((1 << (bits)) - 1); \
159 const unsigned char *buf) in hdmi_update_short_audio_desc() argument
164 val = GRAB_BITS(buf, 1, 0, 7); in hdmi_update_short_audio_desc()
170 a->channels = GRAB_BITS(buf, 0, 0, 3); in hdmi_update_short_audio_desc()
176 a->format = GRAB_BITS(buf, 0, 3, 4); in hdmi_update_short_audio_desc()
183 val = GRAB_BITS(buf, 2, 0, 3); in hdmi_update_short_audio_desc()
196 a->max_bitrate = GRAB_BITS(buf, 2, 0, 8); in hdmi_update_short_audio_desc()
216 a->profile = GRAB_BITS(buf, 2, 0, 3); in hdmi_update_short_audio_desc()
220 a->format = GRAB_BITS(buf, 2, 3, 5); in hdmi_update_short_audio_desc()
[all …]
Dhda_sysfs.c31 char *buf) in power_on_acct_show() argument
35 return sprintf(buf, "%u\n", jiffies_to_msecs(codec->power_on_acct)); in power_on_acct_show()
40 char *buf) in power_off_acct_show() argument
44 return sprintf(buf, "%u\n", jiffies_to_msecs(codec->power_off_acct)); in power_off_acct_show()
54 char *buf) \
57 return sprintf(buf, "0x%x\n", codec->field); \
63 char *buf) \
66 return sprintf(buf, "%s\n", \
81 char *buf) in pin_configs_show() argument
87 len += sprintf(buf + len, "0x%02x 0x%08x\n", in pin_configs_show()
[all …]
/sound/synth/emux/
Demux_proc.c29 struct snd_info_buffer *buf) in snd_emux_proc_info_read() argument
37 snd_iprintf(buf, "Device: %s\n", emu->name); in snd_emux_proc_info_read()
38 snd_iprintf(buf, "Ports: %d\n", emu->num_ports); in snd_emux_proc_info_read()
39 snd_iprintf(buf, "Addresses:"); in snd_emux_proc_info_read()
41 snd_iprintf(buf, " %d:%d", emu->client, emu->ports[i]); in snd_emux_proc_info_read()
42 snd_iprintf(buf, "\n"); in snd_emux_proc_info_read()
43 snd_iprintf(buf, "Use Counter: %d\n", emu->used); in snd_emux_proc_info_read()
44 snd_iprintf(buf, "Max Voices: %d\n", emu->max_voices); in snd_emux_proc_info_read()
45 snd_iprintf(buf, "Allocated Voices: %d\n", emu->num_voices); in snd_emux_proc_info_read()
47 snd_iprintf(buf, "Memory Size: %d\n", emu->memhdr->size); in snd_emux_proc_info_read()
[all …]
/sound/hda/
Dhdac_sysfs.c21 char *buf) \
24 return sprintf(buf, "0x%x\n", codec->type); \
31 char *buf) \
34 return sprintf(buf, "%s\n", \
49 char *buf) in modalias_show() argument
51 return snd_hdac_codec_modalias(dev_to_hdac_dev(dev), buf, 256); in modalias_show()
89 struct widget_attribute *attr, char *buf);
92 const char *buf, size_t count);
109 char *buf) in widget_attr_show() argument
121 return wid_attr->show(codec, nid, wid_attr, buf); in widget_attr_show()
[all …]
/sound/soc/codecs/
Dsigmadsp-i2c.c20 uint8_t *buf; in sigmadsp_write_i2c() local
23 buf = kzalloc(2 + len, GFP_KERNEL | GFP_DMA); in sigmadsp_write_i2c()
24 if (!buf) in sigmadsp_write_i2c()
27 put_unaligned_be16(addr, buf); in sigmadsp_write_i2c()
28 memcpy(buf + 2, data, len); in sigmadsp_write_i2c()
30 ret = i2c_master_send(control_data, buf, len + 2); in sigmadsp_write_i2c()
32 kfree(buf); in sigmadsp_write_i2c()
45 uint8_t buf[2]; in sigmadsp_read_i2c() local
48 put_unaligned_be16(addr, buf); in sigmadsp_read_i2c()
51 msgs[0].len = sizeof(buf); in sigmadsp_read_i2c()
[all …]
Drt5514-spi.c180 u8 buf[8]; in rt5514_spi_prepare() local
190 rt5514_spi_burst_read(RT5514_BUFFER_VOICE_BASE, (u8 *)&buf, in rt5514_spi_prepare()
191 sizeof(buf)); in rt5514_spi_prepare()
192 rt5514_dsp->buf_base = buf[0] | buf[1] << 8 | buf[2] << 16 | in rt5514_spi_prepare()
193 buf[3] << 24; in rt5514_spi_prepare()
195 rt5514_spi_burst_read(RT5514_BUFFER_VOICE_LIMIT, (u8 *)&buf, in rt5514_spi_prepare()
196 sizeof(buf)); in rt5514_spi_prepare()
197 rt5514_dsp->buf_limit = buf[0] | buf[1] << 8 | buf[2] << 16 | in rt5514_spi_prepare()
198 buf[3] << 24; in rt5514_spi_prepare()
200 rt5514_spi_burst_read(RT5514_BUFFER_VOICE_RP, (u8 *)&buf, in rt5514_spi_prepare()
[all …]
Dwm_adsp.c167 void *buf; member
173 struct wm_adsp_buf *buf = kzalloc(sizeof(*buf), GFP_KERNEL); in wm_adsp_buf_alloc() local
175 if (buf == NULL) in wm_adsp_buf_alloc()
178 buf->buf = vmalloc(len); in wm_adsp_buf_alloc()
179 if (!buf->buf) { in wm_adsp_buf_alloc()
180 vfree(buf); in wm_adsp_buf_alloc()
183 memcpy(buf->buf, src, len); in wm_adsp_buf_alloc()
186 list_add_tail(&buf->list, list); in wm_adsp_buf_alloc()
188 return buf; in wm_adsp_buf_alloc()
194 struct wm_adsp_buf *buf = list_first_entry(list, in wm_adsp_buf_free() local
[all …]
/sound/drivers/opl4/
Dopl4_proc.c57 char* buf; in snd_opl4_mem_proc_read() local
59 buf = vmalloc(count); in snd_opl4_mem_proc_read()
60 if (!buf) in snd_opl4_mem_proc_read()
62 snd_opl4_read_memory(opl4, buf, pos, count); in snd_opl4_mem_proc_read()
63 if (copy_to_user(_buf, buf, count)) { in snd_opl4_mem_proc_read()
64 vfree(buf); in snd_opl4_mem_proc_read()
67 vfree(buf); in snd_opl4_mem_proc_read()
78 char *buf; in snd_opl4_mem_proc_write() local
80 buf = vmalloc(count); in snd_opl4_mem_proc_write()
81 if (!buf) in snd_opl4_mem_proc_write()
[all …]
/sound/core/
Dmemory.c43 char buf[256]; in copy_to_user_fromio()
46 if (c > sizeof(buf)) in copy_to_user_fromio()
47 c = sizeof(buf); in copy_to_user_fromio()
48 memcpy_fromio(buf, (void __iomem *)src, c); in copy_to_user_fromio()
49 if (copy_to_user(dst, buf, c)) in copy_to_user_fromio()
76 char buf[256]; in copy_from_user_toio()
79 if (c > sizeof(buf)) in copy_from_user_toio()
80 c = sizeof(buf); in copy_from_user_toio()
81 if (copy_from_user(buf, src, c)) in copy_from_user_toio()
83 memcpy_toio(dst, buf, c); in copy_from_user_toio()
/sound/soc/fsl/
Dimx-audmux.c69 char *buf; in audmux_read_file() local
85 buf = kmalloc(PAGE_SIZE, GFP_KERNEL); in audmux_read_file()
86 if (!buf) in audmux_read_file()
89 ret = snprintf(buf, PAGE_SIZE, "PDCR: %08x\nPTCR: %08x\n", in audmux_read_file()
93 ret += snprintf(buf + ret, PAGE_SIZE - ret, in audmux_read_file()
97 ret += snprintf(buf + ret, PAGE_SIZE - ret, in audmux_read_file()
101 ret += snprintf(buf + ret, PAGE_SIZE - ret, in audmux_read_file()
105 ret += snprintf(buf + ret, PAGE_SIZE - ret, in audmux_read_file()
108 ret += snprintf(buf + ret, PAGE_SIZE - ret, "\n"); in audmux_read_file()
111 ret += snprintf(buf + ret, PAGE_SIZE - ret, in audmux_read_file()
[all …]
/sound/arm/
Dpxa2xx-pcm-lib.c152 struct snd_dma_buffer *buf = &substream->dma_buffer; in pxa2xx_pcm_preallocate_dma_buffer() local
154 buf->dev.type = SNDRV_DMA_TYPE_DEV; in pxa2xx_pcm_preallocate_dma_buffer()
155 buf->dev.dev = pcm->card->dev; in pxa2xx_pcm_preallocate_dma_buffer()
156 buf->private_data = NULL; in pxa2xx_pcm_preallocate_dma_buffer()
157 buf->area = dma_alloc_wc(pcm->card->dev, size, &buf->addr, GFP_KERNEL); in pxa2xx_pcm_preallocate_dma_buffer()
158 if (!buf->area) in pxa2xx_pcm_preallocate_dma_buffer()
160 buf->bytes = size; in pxa2xx_pcm_preallocate_dma_buffer()
168 struct snd_dma_buffer *buf; in pxa2xx_pcm_free_dma_buffers() local
175 buf = &substream->dma_buffer; in pxa2xx_pcm_free_dma_buffers()
176 if (!buf->area) in pxa2xx_pcm_free_dma_buffers()
[all …]
/sound/soc/omap/
Domap-pcm.c180 struct snd_dma_buffer *buf = &substream->dma_buffer; in omap_pcm_preallocate_dma_buffer() local
183 buf->dev.type = SNDRV_DMA_TYPE_DEV; in omap_pcm_preallocate_dma_buffer()
184 buf->dev.dev = pcm->card->dev; in omap_pcm_preallocate_dma_buffer()
185 buf->private_data = NULL; in omap_pcm_preallocate_dma_buffer()
186 buf->area = dma_alloc_wc(pcm->card->dev, size, &buf->addr, GFP_KERNEL); in omap_pcm_preallocate_dma_buffer()
187 if (!buf->area) in omap_pcm_preallocate_dma_buffer()
190 buf->bytes = size; in omap_pcm_preallocate_dma_buffer()
197 struct snd_dma_buffer *buf; in omap_pcm_free_dma_buffers() local
205 buf = &substream->dma_buffer; in omap_pcm_free_dma_buffers()
206 if (!buf->area) in omap_pcm_free_dma_buffers()
[all …]
/sound/usb/line6/
Dmidibuf.c59 this->buf = kmalloc(size, GFP_KERNEL); in line6_midibuf_init()
61 if (this->buf == NULL) in line6_midibuf_init()
114 memcpy(this->buf + this->pos_write, data, length); in line6_midibuf_write()
119 memcpy(this->buf + this->pos_write, data, length1); in line6_midibuf_write()
120 memcpy(this->buf, data + length1, length2); in line6_midibuf_write()
156 command = this->buf[this->pos_read]; in line6_midibuf_read()
180 if (this->buf[this->pos_read + i] & 0x80) in line6_midibuf_read()
189 if (this->buf[this->pos_read + i] & 0x80) in line6_midibuf_read()
196 if (this->buf[i] & 0x80) in line6_midibuf_read()
219 memcpy(data + repeat, this->buf + this->pos_read, length); in line6_midibuf_read()
[all …]
Dpod.c193 const unsigned char *buf = pod->line6.buffer_message; in line6_pod_process_message() local
195 if (memcmp(buf, pod_version_header, sizeof(pod_version_header)) == 0) { in line6_pod_process_message()
196 pod->firmware_version = buf[13] * 100 + buf[14] * 10 + buf[15]; in line6_pod_process_message()
197 pod->device_id = ((int)buf[8] << 16) | ((int)buf[9] << 8) | in line6_pod_process_message()
198 (int) buf[10]; in line6_pod_process_message()
204 if (buf[0] != (LINE6_SYSEX_BEGIN | LINE6_CHANNEL_DEVICE) && in line6_pod_process_message()
205 buf[0] != (LINE6_SYSEX_BEGIN | LINE6_CHANNEL_UNKNOWN)) { in line6_pod_process_message()
208 if (memcmp(buf + 1, line6_midi_id, sizeof(line6_midi_id)) != 0) in line6_pod_process_message()
211 if (buf[5] == POD_SYSEX_SYSTEM && buf[6] == POD_MONITOR_LEVEL) { in line6_pod_process_message()
212 short value = ((int)buf[7] << 12) | ((int)buf[8] << 8) | in line6_pod_process_message()
[all …]

123456789