Lines Matching refs:buf

20 	u8 *buf;  in oxfw_mute_command()  local
24 buf = kmalloc(11, GFP_KERNEL); in oxfw_mute_command()
25 if (!buf) in oxfw_mute_command()
29 buf[0] = 0x01; /* AV/C, STATUS */ in oxfw_mute_command()
32 buf[0] = 0x00; /* AV/C, CONTROL */ in oxfw_mute_command()
35 buf[1] = 0x08; /* audio unit 0 */ in oxfw_mute_command()
36 buf[2] = 0xb8; /* FUNCTION BLOCK */ in oxfw_mute_command()
37 buf[3] = 0x81; /* function block type: feature */ in oxfw_mute_command()
38 buf[4] = oxfw->device_info->mute_fb_id; /* function block ID */ in oxfw_mute_command()
39 buf[5] = 0x10; /* control attribute: current */ in oxfw_mute_command()
40 buf[6] = 0x02; /* selector length */ in oxfw_mute_command()
41 buf[7] = 0x00; /* audio channel number */ in oxfw_mute_command()
42 buf[8] = 0x01; /* control selector: mute */ in oxfw_mute_command()
43 buf[9] = 0x01; /* control data length */ in oxfw_mute_command()
45 buf[10] = 0xff; in oxfw_mute_command()
47 buf[10] = *value ? 0x70 : 0x60; in oxfw_mute_command()
49 err = fcp_avc_transaction(oxfw->unit, buf, 11, buf, 11, 0x3fe); in oxfw_mute_command()
57 if (buf[0] != response_ok) { in oxfw_mute_command()
63 *value = buf[10] == 0x70; in oxfw_mute_command()
68 kfree(buf); in oxfw_mute_command()
78 u8 *buf; in oxfw_volume_command() local
82 buf = kmalloc(12, GFP_KERNEL); in oxfw_volume_command()
83 if (!buf) in oxfw_volume_command()
87 buf[0] = 0x01; /* AV/C, STATUS */ in oxfw_volume_command()
90 buf[0] = 0x00; /* AV/C, CONTROL */ in oxfw_volume_command()
93 buf[1] = 0x08; /* audio unit 0 */ in oxfw_volume_command()
94 buf[2] = 0xb8; /* FUNCTION BLOCK */ in oxfw_volume_command()
95 buf[3] = 0x81; /* function block type: feature */ in oxfw_volume_command()
96 buf[4] = oxfw->device_info->volume_fb_id; /* function block ID */ in oxfw_volume_command()
97 buf[5] = attribute; /* control attribute */ in oxfw_volume_command()
98 buf[6] = 0x02; /* selector length */ in oxfw_volume_command()
99 buf[7] = channel; /* audio channel number */ in oxfw_volume_command()
100 buf[8] = 0x02; /* control selector: volume */ in oxfw_volume_command()
101 buf[9] = 0x02; /* control data length */ in oxfw_volume_command()
103 buf[10] = 0xff; in oxfw_volume_command()
104 buf[11] = 0xff; in oxfw_volume_command()
106 buf[10] = *value >> 8; in oxfw_volume_command()
107 buf[11] = *value; in oxfw_volume_command()
110 err = fcp_avc_transaction(oxfw->unit, buf, 12, buf, 12, 0x3fe); in oxfw_volume_command()
118 if (buf[0] != response_ok) { in oxfw_volume_command()
124 *value = (buf[10] << 8) | buf[11]; in oxfw_volume_command()
129 kfree(buf); in oxfw_volume_command()