Lines Matching refs:pt

32 int snd_pt2258_reset(struct snd_pt2258 *pt)
39 snd_i2c_lock(pt->i2c_bus);
40 if (snd_i2c_sendbytes(pt->i2c_dev, bytes, 1) != 1)
42 snd_i2c_unlock(pt->i2c_bus);
45 pt->mute = 1;
47 snd_i2c_lock(pt->i2c_bus);
48 if (snd_i2c_sendbytes(pt->i2c_dev, bytes, 1) != 1)
50 snd_i2c_unlock(pt->i2c_bus);
54 pt->volume[i] = 0;
57 snd_i2c_lock(pt->i2c_bus);
58 if (snd_i2c_sendbytes(pt->i2c_dev, bytes, 2) != 2)
60 snd_i2c_unlock(pt->i2c_bus);
65 snd_i2c_unlock(pt->i2c_bus);
83 struct snd_pt2258 *pt = kcontrol->private_data;
87 ucontrol->value.integer.value[0] = 79 - pt->volume[base];
88 ucontrol->value.integer.value[1] = 79 - pt->volume[base + 1];
95 struct snd_pt2258 *pt = kcontrol->private_data;
104 if (val0 == pt->volume[base] && val1 == pt->volume[base + 1])
107 pt->volume[base] = val0;
110 snd_i2c_lock(pt->i2c_bus);
111 if (snd_i2c_sendbytes(pt->i2c_dev, bytes, 2) != 2)
113 snd_i2c_unlock(pt->i2c_bus);
115 pt->volume[base + 1] = val1;
118 snd_i2c_lock(pt->i2c_bus);
119 if (snd_i2c_sendbytes(pt->i2c_dev, bytes, 2) != 2)
121 snd_i2c_unlock(pt->i2c_bus);
126 snd_i2c_unlock(pt->i2c_bus);
136 struct snd_pt2258 *pt = kcontrol->private_data;
138 ucontrol->value.integer.value[0] = !pt->mute;
145 struct snd_pt2258 *pt = kcontrol->private_data;
150 if (pt->mute == val)
153 pt->mute = val;
155 snd_i2c_lock(pt->i2c_bus);
156 if (snd_i2c_sendbytes(pt->i2c_dev, bytes, 1) != 1)
158 snd_i2c_unlock(pt->i2c_bus);
163 snd_i2c_unlock(pt->i2c_bus);
170 int snd_pt2258_build_controls(struct snd_pt2258 *pt)
193 err = snd_ctl_add(pt->card, snd_ctl_new1(&knew, pt));
205 err = snd_ctl_add(pt->card, snd_ctl_new1(&knew, pt));