Lines Matching refs:cfg

110     struct a2dp_config      cfg;  member
194 static int calc_audiotime(struct a2dp_config cfg, int bytes) in calc_audiotime() argument
196 int chan_count = popcount(cfg.channel_flags); in calc_audiotime()
198 ASSERTC(cfg.format == AUDIO_FORMAT_PCM_16_BIT, in calc_audiotime()
199 "unsupported sample sz", cfg.format); in calc_audiotime()
201 return (int)(((int64_t)bytes * (1000000 / (chan_count * 2))) / cfg.rate); in calc_audiotime()
434 …common->cfg.channel_flags = (channel_count == 1 ? AUDIO_CHANNEL_IN_MONO : AUDIO_CHANNEL_IN_STEREO); in a2dp_read_audio_config()
435 common->cfg.format = AUDIO_STREAM_DEFAULT_FORMAT; in a2dp_read_audio_config()
436 common->cfg.rate = sample_rate; in a2dp_read_audio_config()
438 INFO("got config %d %d", common->cfg.format, common->cfg.rate); in a2dp_read_audio_config()
640 us_delay = calc_audiotime(out->common.cfg, bytes); in out_write()
653 DEBUG("rate %" PRIu32,out->common.cfg.rate); in out_get_sample_rate()
655 return out->common.cfg.rate; in out_get_sample_rate()
670 out->common.cfg.rate = rate; in out_set_sample_rate()
694 DEBUG("channels 0x%" PRIx32, out->common.cfg.channel_flags); in out_get_channels()
696 return out->common.cfg.channel_flags; in out_get_channels()
702 DEBUG("format 0x%x", out->common.cfg.format); in out_get_format()
703 return out->common.cfg.format; in out_get_format()
808 out->common.cfg.rate) * 1000; in out_get_latency()
839 uint64_t latency_frames = (uint64_t)out_get_latency(stream) * out->common.cfg.rate / 1000; in out_get_presentation_position()
859 uint64_t latency_frames = (uint64_t)out_get_latency(stream) * out->common.cfg.rate / 1000; in out_get_render_position()
896 return in->common.cfg.rate; in in_get_sample_rate()
905 if (in->common.cfg.rate > 0 && in->common.cfg.rate == rate) in in_set_sample_rate()
924 return in->common.cfg.channel_flags; in in_get_channels()
1051 us_delay = calc_audiotime(in->common.cfg, bytes); in in_read()
1131 out->common.cfg.channel_flags = AUDIO_STREAM_DEFAULT_CHANNEL_FLAG; in adev_open_output_stream()
1132 out->common.cfg.format = AUDIO_STREAM_DEFAULT_FORMAT; in adev_open_output_stream()
1133 out->common.cfg.rate = AUDIO_STREAM_DEFAULT_RATE; in adev_open_output_stream()