Lines Matching refs:spkr

149 	struct fw_spkr *spkr = oxfw->spec;  in spkr_mute_get()  local
151 value->value.integer.value[0] = !spkr->mute; in spkr_mute_get()
160 struct fw_spkr *spkr = oxfw->spec; in spkr_mute_put() local
166 if (mute == spkr->mute) in spkr_mute_put()
169 err = avc_audio_feature_mute(oxfw->unit, spkr->mute_fb_id, &mute, in spkr_mute_put()
173 spkr->mute = mute; in spkr_mute_put()
182 struct fw_spkr *spkr = oxfw->spec; in spkr_volume_info() local
185 info->count = spkr->mixer_channels; in spkr_volume_info()
186 info->value.integer.min = spkr->volume_min; in spkr_volume_info()
187 info->value.integer.max = spkr->volume_max; in spkr_volume_info()
198 struct fw_spkr *spkr = oxfw->spec; in spkr_volume_get() local
201 for (i = 0; i < spkr->mixer_channels; ++i) in spkr_volume_get()
202 value->value.integer.value[channel_map[i]] = spkr->volume[i]; in spkr_volume_get()
211 struct fw_spkr *spkr = oxfw->spec; in spkr_volume_put() local
217 for (i = 0; i < spkr->mixer_channels; ++i) { in spkr_volume_put()
218 if (value->value.integer.value[i] < spkr->volume_min || in spkr_volume_put()
219 value->value.integer.value[i] > spkr->volume_max) in spkr_volume_put()
227 for (i = 0; i < spkr->mixer_channels; ++i) in spkr_volume_put()
229 spkr->volume[i]) in spkr_volume_put()
235 for (i = 0; i <= spkr->mixer_channels; ++i) { in spkr_volume_put()
239 spkr->volume_fb_id, &volume, in spkr_volume_put()
245 spkr->volume[i - 1] = volume; in spkr_volume_put()
269 struct fw_spkr *spkr; in snd_oxfw_add_spkr() local
273 spkr = devm_kzalloc(&oxfw->card->card_dev, sizeof(struct fw_spkr), in snd_oxfw_add_spkr()
275 if (!spkr) in snd_oxfw_add_spkr()
277 oxfw->spec = spkr; in snd_oxfw_add_spkr()
280 spkr->mixer_channels = 1; in snd_oxfw_add_spkr()
281 spkr->mute_fb_id = 0x01; in snd_oxfw_add_spkr()
282 spkr->volume_fb_id = 0x01; in snd_oxfw_add_spkr()
284 spkr->mixer_channels = 6; in snd_oxfw_add_spkr()
285 spkr->mute_fb_id = 0x01; in snd_oxfw_add_spkr()
286 spkr->volume_fb_id = 0x02; in snd_oxfw_add_spkr()
289 err = avc_audio_feature_volume(oxfw->unit, spkr->volume_fb_id, in snd_oxfw_add_spkr()
290 &spkr->volume_min, 0, CTL_MIN, CTL_READ); in snd_oxfw_add_spkr()
293 err = avc_audio_feature_volume(oxfw->unit, spkr->volume_fb_id, in snd_oxfw_add_spkr()
294 &spkr->volume_max, 0, CTL_MAX, CTL_READ); in snd_oxfw_add_spkr()
298 err = avc_audio_feature_mute(oxfw->unit, spkr->mute_fb_id, &spkr->mute, in snd_oxfw_add_spkr()
303 first_ch = spkr->mixer_channels == 1 ? 0 : 1; in snd_oxfw_add_spkr()
304 for (i = 0; i < spkr->mixer_channels; ++i) { in snd_oxfw_add_spkr()
305 err = avc_audio_feature_volume(oxfw->unit, spkr->volume_fb_id, in snd_oxfw_add_spkr()
306 &spkr->volume[i], first_ch + i, in snd_oxfw_add_spkr()