Lines Matching refs:wave_fmt
45 static void query_format(struct emu10k1_wavedevice *wave_dev, struct wave_format *wave_fmt)
51 if ((wave_fmt->channels > 2) && (wave_fmt->id != AFMT_S16_LE) && (wave_fmt->id != AFMT_U8))
52 wave_fmt->channels = 2;
54 if ((wave_fmt->channels < 1) || (wave_fmt->channels > WAVEOUT_MAXVOICES))
55 wave_fmt->channels = 2;
57 if (wave_fmt->channels == 2)
60 woinst->num_voices = wave_fmt->channels;
62 if (wave_fmt->samplingrate >= 0x2ee00)
63 wave_fmt->samplingrate = 0x2ee00;
65 wave_fmt->passthrough = 0;
71 switch (wave_fmt->id) {
73 wave_fmt->bitsperchannel = 16;
76 wave_fmt->bitsperchannel = 8;
83 wave_fmt->id = AFMT_S16_LE;
84 wave_fmt->bitsperchannel = 16;
91 (wave_fmt->samplingrate != 48000 && !is_ac3)) {
99 wave_fmt->samplingrate = 48000;
100 wave_fmt->channels = 2;
103 wave_fmt->passthrough = 1;
110 wave_fmt->bitsperchannel = 16;
116 wave_fmt->passthrough = 2;
117 wave_fmt->bitsperchannel = 16;
121 wave_fmt->bytesperchannel = wave_fmt->bitsperchannel >> 3;
122 wave_fmt->bytespersample = wave_fmt->channels * wave_fmt->bytesperchannel;
123 wave_fmt->bytespersec = wave_fmt->bytespersample * wave_fmt->samplingrate;
125 if (wave_fmt->channels == 2)
126 wave_fmt->bytespervoicesample = wave_fmt->channels * wave_fmt->bytesperchannel;
128 wave_fmt->bytespervoicesample = wave_fmt->bytesperchannel;