Home | History | Annotate | Download | only in audio

Lines Matching refs:info

682 static int audio_pcm_info_eq (struct audio_pcm_info *info, struct audsettings *as)
704 return info->freq == as->freq
705 && info->nchannels == as->nchannels
706 && info->sign == sign
707 && info->bits == bits
708 && info->swap_endianness == (as->endianness != AUDIO_HOST_ENDIANNESS);
711 void audio_pcm_init_info (struct audio_pcm_info *info, struct audsettings *as)
736 info->freq = as->freq;
737 info->bits = bits;
738 info->sign = sign;
739 info->nchannels = as->nchannels;
740 info->shift = (as->nchannels == 2) + shift;
741 info->align = (1 << info->shift) - 1;
742 info->bytes_per_second = info->freq << info->shift;
743 info->swap_endianness = (as->endianness != AUDIO_HOST_ENDIANNESS);
746 void audio_pcm_info_clear_buf (struct audio_pcm_info *info, void *buf, int len)
752 if (info->sign) {
753 memset (buf, 0x00, len << info->shift);
756 switch (info->bits) {
758 memset (buf, 0x80, len << info->shift);
765 int shift = info->nchannels - 1;
768 if (info->swap_endianness) {
782 int shift = info->nchannels - 1;
785 if (info->swap_endianness) {
797 info->bits);
823 if (audio_pcm_info_eq (&cap->hw.info, as)) {
916 sw->info = hw->info;
920 sw->ratio = ((int64_t) hw_cap->info.freq << 32) / sw->info.freq;
921 sw->rate = st_rate_start (sw->info.freq, hw_cap->info.freq);
931 hw, sw->info.freq, sw->info.bits, sw->info.nchannels);
1004 samples = size >> sw->info.shift;
1040 return ret << sw->info.shift;
1124 samples = size >> sw->info.shift;
1164 size >> sw->info.shift,
1170 return ret << sw->info.shift;
1174 static void audio_pcm_print_info (const char *cap, struct audio_pcm_info *info)
1177 cap, info->bits, info->sign, info->freq, info->nchannels);
1228 return sw->hw->samples << sw->hw->info.shift;
1341 live, (((int64_t) live << 32) / sw->ratio) << sw->info.shift
1344 return (((int64_t) live << 32) / sw->ratio) << sw->info.shift;
1367 live, dead, (((int64_t) dead << 32) / sw->ratio) << sw->info.shift);
1370 return (((int64_t) dead << 32) / sw->ratio) << sw->info.shift;
1388 int bytes = to_write << hw->info.shift;
1576 to_capture << hw->info.shift);
2087 audio_pcm_init_info (&hw->info, as);
2089 cap->buf = audio_calloc (AUDIO_FUNC, hw->samples, 1 << hw->info.shift);
2093 hw->samples, 1 << hw->info.shift);
2098 [hw->info.nchannels == 2]
2099 [hw->info.sign]
2100 [hw->info.swap_endianness]
2101 [audio_bits_to_index (hw->info.bits)];