Lines Matching refs:spkr

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