Audio: out_open_pcm_devices - use out->config instead of pcm_device->pcm_profile...
authorstenkinevgeniy <stenkinevgeniy@gmail.com>
Tue, 8 May 2018 06:52:05 +0000 (06:52 +0000)
committerstenkinevgeniy <stenkinevgeniy@gmail.com>
Tue, 8 May 2018 15:33:04 +0000 (15:33 +0000)
Current get_pcm_device return always first finded pcm_profile.
And out->pcm_dev_list always have only pcm_device_playback pcm_profiles.

But if we need use deep_buffer pcm device
we need use deep_bufer pcm_config - current hal
don't did this...

And we configure out->config in adev_open_output_stream
function with proper pcm_config (deep or no).

Change-Id: I86fdb18202afb0e83393f32830d57c929f174ae6

audio/audio_hw.c

index 01bec826d0c49ff81d9b4f0cf171d514325b8643..20664573dc02f25db5d9b07ec81656dd0682bfee 100644 (file)
@@ -2416,7 +2416,7 @@ static int out_open_pcm_devices(struct stream_out *out)
               __func__, pcm_device_card, pcm_device_id);
 
         pcm_device->pcm = pcm_open(pcm_device_card, pcm_device_id,
-                               PCM_OUT | PCM_MONOTONIC, &pcm_device->pcm_profile->config);
+                               PCM_OUT | PCM_MONOTONIC, &out->config);
 
         if (pcm_device->pcm && !pcm_is_ready(pcm_device->pcm)) {
             ALOGE("%s: %s", __func__, pcm_get_error(pcm_device->pcm));