Lines Matching refs:device
43 * 0 disables (this is default: present the device channels to AudioFlinger).
94 * This may differ from the device channel count when
95 * the device is not compatible with AudioFlinger
119 * This may differ from the device channel count when
120 * the device is not compatible with AudioFlinger
125 /* We may need to read more data from the device in order to data reduce to 16bit, 4chan */
140 * Extract the card and device numbers from the supplied key/value pairs.
141 * kvpairs A null-terminated string containing the key/value pairs or card and device.
142 * i.e. "card=1;device=42"
144 * device A pointer to a variable to receive the parsed-out device number.
145 * NOTE: The variables pointed to by card and device return -1 (undefined) if the
147 * Return true if the kvpairs string contain a card/device spec, false otherwise.
149 static bool parse_card_device_params(const char *kvpairs, int *card, int *device)
157 *device = -1;
164 param_val = str_parms_get_str(parms, "device", value, sizeof(value));
166 *device = atoi(value);
171 return *card >= 0 && *device >= 0;
176 if (profile->card < 0 || profile->device < 0) {
236 * following order: hw device > out stream
314 int device = -1;
316 if (!parse_card_device_params(kvpairs, &card, &device)) {
322 /* Lock the device because that is where the profile lives */
325 if (!profile_is_cached_for(out->profile, card, device)) {
326 /* cannot read pcm device info if playback is active */
331 int saved_device = out->profile->device;
333 out->profile->device = device;
337 out->profile->device = saved_device;
373 /* must be called with hw device and output stream mutexes locked */
376 ALOGV("start_output_stream(card:%d device:%d)", out->profile->card, out->profile->device);
480 ALOGV("adev_open_output_stream() handle:0x%X, device:0x%X, flags:0x%X, addr:%s",
522 /* Pull out the card/device pair */
523 parse_card_device_params(address, &(out->profile->card), &(out->profile->device));
609 ALOGV("adev_close_output_stream(c:%d d:%d)", out->profile->card, out->profile->device);
611 /* Close the pcm device */
708 int device = -1;
710 if (!parse_card_device_params(kvpairs, &card, &device)) {
718 if (card >= 0 && device >= 0 && !profile_is_cached_for(in->profile, card, device)) {
719 /* cannot read pcm device info if playback is active */
724 int saved_device = in->profile->device;
726 in->profile->device = device;
730 in->profile->device = saved_device;
771 /* must be called with hw device and output stream mutexes locked */
774 ALOGV("start_input_stream(card:%d device:%d)", in->profile->card, in->profile->device);
908 /* Pull out the card/device pair */
909 parse_card_device_params(address, &(in->profile->card), &(in->profile->device));
981 /* Close the pcm device */
1036 static int adev_dump(const audio_hw_device_t *device, int fd)
1041 static int adev_close(hw_device_t *device)
1043 struct audio_device *adev = (struct audio_device *)device;
1044 free(device);
1049 static int adev_open(const hw_module_t* module, const char* name, hw_device_t** device)
1081 *device = &adev->hw_device.common;