Camera app and messaging app on mako no mic in video mode

Bug #1566896 reported by Dave Morley
32
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Canonical System Image
Fix Released
Critical
Yuan-Chen Cheng
pulseaudio (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

STEPS:
1. Flash OTA-10-RC image from rc channel to mako
2. Open the camera app
3. Accept access to camera
4. Switch to video
5. Tap record
6. Accept Mic access
7. Record something while talking into the mic for 10 seconds
8. Playback the video

EXPECTED:
Audio to come from the speaker

ACTUAL:
I see the video footage but no audio.

Dave Morley (davmor2)
affects: camera-app (Ubuntu) → pulseaudio (Ubuntu)
summary: - Camera app on mako no mic in video mode
+ Camera app and messaging app on mako no mic in video mode
Revision history for this message
Pat McGowan (pat-mcgowan) wrote :

Is this related to recent changes needed on the android side?

Changed in canonical-devices-system-image:
assignee: nobody → John McAleely (john.mcaleely)
importance: Undecided → Critical
milestone: none → ww08-2016
status: New → Confirmed
assignee: John McAleely (john.mcaleely) → Yuan-Chen Cheng (ycheng-twn)
Revision history for this message
Jim Hodapp (jhodapp) wrote :

A note that Simon mentioned earlier today: "I suspect its the pulsedroid module rework rextsai and BinLi did"

tags: added: lt-blocker
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in pulseaudio (Ubuntu):
status: New → Confirmed
Revision history for this message
Rex Tsai (chihchun) wrote :

The issue can be verified on OTA-10-rc[1],

1) The recording functions are broken on both built-in mic and wired headset. (switching audio routing seems fine.)

I found a few error message from logcat, while testing with parec.
I/audio_hw_primary( 5603): select_devices: enter - uc_id 4
I/audio_hw_primary( 5603): select_devices: VOICE_CALL is active
E/audio_hw_primary( 5603): start_input_stream: cannot open device '/dev/snd/pcmC0D0c': Invalid argument
E/audio_hw_primary( 5603): disable_snd_device: Invalid sound device 0
D/audio_hw_primary( 5603): start_input_stream: exit: status(-5)

2) The other minor issue is pulseaudio module-trust-store.

The pulseaudio trust-store rejected to access, but the client seems ignore that and requesting input stream. (which caused the error in finding 1)

I: [pulseaudio] client.c: Created 8 "Native client (UNIX socket client)"
D: [pulseaudio] protocol-dbus.c: Interface org.PulseAudio.Core1.Client added for object /org/pulseaudio/core1/client8
D: [pulseaudio] protocol-native.c: Protocol version: remote 30, local 30
I: [pulseaudio] protocol-native.c: Got credentials: uid=32011 gid=32011 success=1
D: [pulseaudio] protocol-native.c: SHM possible: yes
D: [pulseaudio] protocol-native.c: Negotiated SHM: no
D: [pulseaudio] protocol-native.c: Disabling srbchannel, reason: Must be enabled by module parameter
D: [pulseaudio] module-augment-properties.c: Looking for .desktop file for camera-app
I: [pulseaudio] module-trust-store.c: Client application name is: 'qtubuntu-camera'
I: [pulseaudio] module-trust-store.c: Client apparmor profile is: 'com.ubuntu.camera_camera_3.0.0.644'
D: [pulseaudio] module-trust-store.c: Checking permission to record for client 8 (unknown)
D: [pulseaudio] module-trust-store.c: Checking queue, size: 1, thread object: no
D: [pulseaudio] module-trust-store.c: Starting thread to ask about client 8 (com.ubuntu.camera_camera_3.0.0.644)
I: [trust-store] module-trust-store.c: User needs to authorize the application..
D: Asking Ubuntu touch trust store for permission (app: com.ubuntu.camera_camera_3.0.0.644)
I: Request denied.
D: [pulseaudio] module-trust-store.c: Checking queue, size: 1, thread object: yes
D: [pulseaudio] module-trust-store.c: Letting client 8 (com.ubuntu.camera_camera_3.0.0.644) know the result (rejected)
I: [pulseaudio] client.c: Freed 8 "qtubuntu-camera"
I: [pulseaudio] protocol-native.c: Connection died.

[1] OTA-10-rc
current build number: 25
device name: mako
channel: ubuntu-touch/rc/ubuntu
last update: 2016-04-07 13:16:14
version version: 25
version ubuntu: 20160401.1
version tag: OTA-10-rc
version device: 20160401.1
version custom: 20160401.1

Revision history for this message
Rex Tsai (chihchun) wrote :

In 1:6.0-0ubuntu9.12, the default audio source is hardcoded to AUDIO_SOURCE_MIC.
   546 /* Setting audio source to MIC by default */
   547 pa_snprintf(audio_source, sizeof(audio_source), "%s=%u", AUDIO_PARAMETER_STREAM_INPUT_SOURCE, AUDIO_SOURCE_MIC);
   548 u->stream->common.set_parameters(&u->stream->common, audio_source);
   549 pa_log_debug("Setting audio source to AUDIO_SOURCE_MIC by default");

In the newer 1:6.0-0ubuntu9.23 which introduced the regression on mako, it use conversion_table_default_audio_source table to translate AUDIO_DEVICE_IN_BUILTIN_MIC.

src/modules/droid/droid-util.c
207: for (unsigned int i = 0; i < sizeof(conversion_table_default_audio_source) / (sizeof(uint32_t) * 2); i++) {

But AUDIO_DEVICE_IN_BUILTIN_MIC is missing in droid-util-44.h.[1] Thanks Simon Fels to find out the fix.

[1] https://paste.ubuntu.com/15669064/

Revision history for this message
Rex Tsai (chihchun) wrote :
Changed in canonical-devices-system-image:
status: Confirmed → Fix Committed
Changed in pulseaudio (Ubuntu):
status: Confirmed → Fix Committed
assignee: nobody → Yuan-Chen Cheng (ycheng-twn)
assignee: Yuan-Chen Cheng (ycheng-twn) → nobody
Changed in canonical-devices-system-image:
status: Fix Committed → Fix Released
Changed in pulseaudio (Ubuntu):
status: Fix Committed → Fix Released
tags: added: pulse-touch
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.