static status_t s_init(alsa_device_t *module, ALSAHandleList &list) { list.clear(); snd_pcm_uframes_t bufferSize = _defaultsOut.bufferSize; for (size_t i = 1; (bufferSize & ~i) != 0; i <<= 1) bufferSize &= ~i; _defaultsOut.module = module; _defaultsOut.bufferSize = bufferSize; list.push_back(_defaultsOut); bufferSize = _defaultsIn.bufferSize; for (size_t i = 1; (bufferSize & ~i) != 0; i <<= 1) bufferSize &= ~i; _defaultsIn.module = module; _defaultsIn.bufferSize = bufferSize; list.push_back(_defaultsIn); return NO_ERROR; }
static status_t s_init(alsa_device_t *module, ALSAHandleList &list) { list.clear(); snd_pcm_uframes_t bufferSize = _defaultsOut.bufferSize; for (size_t i = 1; (bufferSize & ~i) != 0; i <<= 1) bufferSize &= ~i; _defaultsOut.module = module; _defaultsOut.bufferSize = bufferSize; list.push_back(_defaultsOut); bufferSize = _defaultsUSBIn.bufferSize; for (size_t i = 1; (bufferSize & ~i) != 0; i <<= 1) bufferSize &= ~i; _defaultsUSBIn.module = module; _defaultsUSBIn.bufferSize = bufferSize; _defaultsUSBIn.modPrivate = (void*)usbAudio; list.push_back(_defaultsUSBIn); ALOGW("use USB audio in as default"); bufferSize = _defaultsIn.bufferSize; for (size_t i = 1; (bufferSize & ~i) != 0; i <<= 1) bufferSize &= ~i; _defaultsIn.module = module; _defaultsIn.bufferSize = bufferSize; _defaultsIn.modPrivate = (void*)builtinAudio; list.push_back(_defaultsIn); ALOGW("use AML audio in as default"); return NO_ERROR; }