• Home
  • Raw
  • Download

Lines Matching refs:pt

46 int snd_pt2258_reset(struct snd_pt2258 *pt)  in snd_pt2258_reset()  argument
53 snd_i2c_lock(pt->i2c_bus); in snd_pt2258_reset()
54 if (snd_i2c_sendbytes(pt->i2c_dev, bytes, 1) != 1) in snd_pt2258_reset()
56 snd_i2c_unlock(pt->i2c_bus); in snd_pt2258_reset()
59 pt->mute = 1; in snd_pt2258_reset()
61 snd_i2c_lock(pt->i2c_bus); in snd_pt2258_reset()
62 if (snd_i2c_sendbytes(pt->i2c_dev, bytes, 1) != 1) in snd_pt2258_reset()
64 snd_i2c_unlock(pt->i2c_bus); in snd_pt2258_reset()
68 pt->volume[i] = 0; in snd_pt2258_reset()
71 snd_i2c_lock(pt->i2c_bus); in snd_pt2258_reset()
72 if (snd_i2c_sendbytes(pt->i2c_dev, bytes, 2) != 2) in snd_pt2258_reset()
74 snd_i2c_unlock(pt->i2c_bus); in snd_pt2258_reset()
79 snd_i2c_unlock(pt->i2c_bus); in snd_pt2258_reset()
97 struct snd_pt2258 *pt = kcontrol->private_data; in pt2258_stereo_volume_get() local
101 ucontrol->value.integer.value[0] = 79 - pt->volume[base]; in pt2258_stereo_volume_get()
102 ucontrol->value.integer.value[1] = 79 - pt->volume[base + 1]; in pt2258_stereo_volume_get()
109 struct snd_pt2258 *pt = kcontrol->private_data; in pt2258_stereo_volume_put() local
118 if (val0 == pt->volume[base] && val1 == pt->volume[base + 1]) in pt2258_stereo_volume_put()
121 pt->volume[base] = val0; in pt2258_stereo_volume_put()
124 snd_i2c_lock(pt->i2c_bus); in pt2258_stereo_volume_put()
125 if (snd_i2c_sendbytes(pt->i2c_dev, bytes, 2) != 2) in pt2258_stereo_volume_put()
127 snd_i2c_unlock(pt->i2c_bus); in pt2258_stereo_volume_put()
129 pt->volume[base + 1] = val1; in pt2258_stereo_volume_put()
132 snd_i2c_lock(pt->i2c_bus); in pt2258_stereo_volume_put()
133 if (snd_i2c_sendbytes(pt->i2c_dev, bytes, 2) != 2) in pt2258_stereo_volume_put()
135 snd_i2c_unlock(pt->i2c_bus); in pt2258_stereo_volume_put()
140 snd_i2c_unlock(pt->i2c_bus); in pt2258_stereo_volume_put()
150 struct snd_pt2258 *pt = kcontrol->private_data; in pt2258_switch_get() local
152 ucontrol->value.integer.value[0] = !pt->mute; in pt2258_switch_get()
159 struct snd_pt2258 *pt = kcontrol->private_data; in pt2258_switch_put() local
164 if (pt->mute == val) in pt2258_switch_put()
167 pt->mute = val; in pt2258_switch_put()
169 snd_i2c_lock(pt->i2c_bus); in pt2258_switch_put()
170 if (snd_i2c_sendbytes(pt->i2c_dev, bytes, 1) != 1) in pt2258_switch_put()
172 snd_i2c_unlock(pt->i2c_bus); in pt2258_switch_put()
177 snd_i2c_unlock(pt->i2c_bus); in pt2258_switch_put()
184 int snd_pt2258_build_controls(struct snd_pt2258 *pt) in snd_pt2258_build_controls() argument
207 err = snd_ctl_add(pt->card, snd_ctl_new1(&knew, pt)); in snd_pt2258_build_controls()
219 err = snd_ctl_add(pt->card, snd_ctl_new1(&knew, pt)); in snd_pt2258_build_controls()