Pulseaudio failing in wcd9335 audio codec HiFi UCM profile?

Hi Guys,

I have backported wcd9335 audio codec driver from

https://git.linaro.org/people/srinivas.kandagatla/linux.git/log/?h=wcd9335

on 4.14.53 kernel.

Version: Debian Buster/Sid
Kernel: 4.14.53
Pulseaudio: 11.1 & 12
alsaucm: 1.1.3

ls /usr/share/alsa/ucm/DB820c/
DB820c.conf HiFi HDMI

id linaro
uid=1000(linaro) gid=1000(linaro) groups=1000(linaro),4(adm),20(dialout),24(cdrom),27(sudo),29(audio),30(dip),44(video),46(plugdev),50(staff),10
1(systemd-journal),106(netdev),108(bluetooth),110(pulse),111(pulse-access)

ls -al /dev/snd/*
crw-rw----+ 1 root audio 116, 2 Sep 5 12:58 /dev/snd/comprC0D0
crw-rw----+ 1 root audio 116, 0 Sep 5 12:58 /dev/snd/controlC0
crw-rw----+ 1 root audio 116, 25 Sep 5 12:58 /dev/snd/pcmC0D1c
crw-rw----+ 1 root audio 116, 17 Sep 5 12:58 /dev/snd/pcmC0D1p
crw-rw----+ 1 root audio 116, 26 Sep 5 12:58 /dev/snd/pcmC0D2c
crw-rw----+ 1 root audio 116, 18 Sep 5 12:58 /dev/snd/pcmC0D2p
crw-rw----+ 1 root audio 116, 33 Sep 5 12:58 /dev/snd/timer

/dev/snd/by-path:
total 0
drwxr-xr-x 2 root root 60 Sep 5 12:58 .
drwxr-xr-x 3 root root 200 Sep 5 12:58 …
lrwxrwxrwx 1 root root 12 Sep 5 12:58 platform-sound → …/controlC0

I have 3.5mm Headphone with MIC. When i set Headphone from command line. It will work but when it comes to pulseaudio it fails to work.

/usr/bin/alsaucm -c DB820c set _verb HiFi set _enadev Headphones

I: [pulseaudio] alsa-ucm.c: UCM available for card DB820c
I: [pulseaudio] alsa-ucm.c: Set UCM verb to HiFi
D: [pulseaudio] alsa-ucm.c: Got PlaybackPCM for verb HiFi: plughw:0,1
D: [pulseaudio] alsa-ucm.c: Got CapturePCM for verb HiFi: plughw:0,2
D: [pulseaudio] alsa-ucm.c: Got TQ for verb HiFi: HDMI
D: [pulseaudio] alsa-ucm.c: Got CaptureChannels for device Handset: 1
D: [pulseaudio] alsa-ucm.c: Got JackControl for device Handset: Headphone Jack
D: [pulseaudio] alsa-ucm.c: UCM capture device Handset fetch pcm from verb default plughw:0,2
D: [pulseaudio] alsa-ucm.c: No _conflictingdevs for device Handset
D: [pulseaudio] alsa-ucm.c: No _supporteddevs for device Handset
D: [pulseaudio] alsa-ucm.c: Got PlaybackChannels for device Headphones: 2
D: [pulseaudio] alsa-ucm.c: Got JackControl for device Headphones: Headphone Jack
D: [pulseaudio] alsa-ucm.c: UCM playback device Headphones fetch pcm from verb default plughw:0,1
D: [pulseaudio] alsa-ucm.c: No _conflictingdevs for device Headphones
D: [pulseaudio] alsa-ucm.c: No _supporteddevs for device Headphones
I: [pulseaudio] alsa-ucm.c: Set UCM verb to HDMI
D: [pulseaudio] alsa-ucm.c: Got PlaybackPCM for verb HDMI: plughw:0,2
D: [pulseaudio] alsa-ucm.c: Got TQ for verb HDMI: HiFi
D: [pulseaudio] alsa-ucm.c: Got PlaybackChannels for device HDMI-stereo: 2
D: [pulseaudio] alsa-ucm.c: UCM playback device HDMI-stereo fetch pcm from verb default plughw:0,2
D: [pulseaudio] alsa-ucm.c: No _conflictingdevs for device HDMI-stereo
D: [pulseaudio] alsa-ucm.c: No _supporteddevs for device HDMI-stereo
I: [pulseaudio] module-alsa-card.c: Found UCM profiles
D: [pulseaudio] alsa-ucm.c: UCM mapping: Mapping HDMI: plughw:0,2: sink dev HDMI-stereo
D: [pulseaudio] alsa-mixer.c: Profile HDMI (HDMI output.), input=(null), output=(null) priority=1000, supported=yes n_input_mappings=0, n_output
_mappings=1
D: [pulseaudio] alsa-mixer.c: Output HDMI: plughw:0,2: sink
D: [pulseaudio] alsa-ucm.c: UCM mapping: Mapping HiFi: plughw:0,2: source dev Handset
D: [pulseaudio] alsa-ucm.c: UCM mapping: Mapping HiFi: plughw:0,1: sink dev Headphones
D: [pulseaudio] alsa-mixer.c: Profile HiFi (Play HiFi quality Music.), input=(null), output=(null) priority=8000, supported=yes n_input_mappings=1, n_output_mappings=1
D: [pulseaudio] alsa-mixer.c: Input HiFi: plughw:0,2: source
D: [pulseaudio] alsa-mixer.c: Output HiFi: plughw:0,1: sink
I: [pulseaudio] alsa-ucm.c: Set ucm verb to HDMI
D: [pulseaudio] alsa-util.c: Trying plughw:0,2 with SND_PCM_NO_AUTO_FORMAT …
D: [pulseaudio] alsa-util.c: Managed to open plughw:0,2
D: [pulseaudio] alsa-util.c: Maximum hw buffer size is 2972 ms
I: [pulseaudio] alsa-util.c: snd_pcm_hw_params_set_buffer_size_near() failed: Invalid argument
D: [pulseaudio] alsa-util.c: Set period size first (to 1102 samples), buffer size second (to 4408 samples).
D: [pulseaudio] alsa-ucm.c: Profile HDMI supported.
I: [pulseaudio] (alsa-lib)control.c: Invalid CTL plughw:0,2
I: [pulseaudio] alsa-util.c: Unable to attach to mixer plughw:0,2: No such file or directory
I: [pulseaudio] alsa-util.c: Successfully attached to mixer ‘hw:0’
I: [pulseaudio] alsa-ucm.c: UCM jack HDMI-stereo has_control=0
I: [pulseaudio] alsa-ucm.c: Set ucm verb to HiFi
D: [pulseaudio] alsa-util.c: Trying plughw:0,1 with SND_PCM_NO_AUTO_FORMAT …
D: [pulseaudio] alsa-util.c: Managed to open plughw:0,1
D: [pulseaudio] alsa-util.c: Maximum hw buffer size is 2972 ms
I: [pulseaudio] alsa-util.c: snd_pcm_hw_params_set_buffer_size_near() failed: Invalid argument
I: [pulseaudio] (alsa-lib)pcm_hw.c: SNDRV_PCM_IOCTL_PREPARE failed (-22)
I: [pulseaudio] alsa-util.c: snd_pcm_hw_params_set_buffer_size_near() failed: Invalid argument
I: [pulseaudio] (alsa-lib)pcm_hw.c: SNDRV_PCM_IOCTL_PREPARE failed (-22)
D: [pulseaudio] alsa-util.c: Set neither period nor buffer size.
I: [pulseaudio] (alsa-lib)pcm_hw.c: SNDRV_PCM_IOCTL_PREPARE failed (-22)
I: [pulseaudio] alsa-util.c: snd_pcm_hw_params failed: Invalid argument
D: [pulseaudio] alsa-util.c: Trying plughw:0,1 without SND_PCM_NO_AUTO_FORMAT …
D: [pulseaudio] alsa-util.c: Managed to open plughw:0,1
D: [pulseaudio] alsa-util.c: Maximum hw buffer size is 2972 ms
I: [pulseaudio] alsa-util.c: snd_pcm_hw_params_set_buffer_size_near() failed: Invalid argument
I: [pulseaudio] (alsa-lib)pcm_hw.c: SNDRV_PCM_IOCTL_PREPARE failed (-22)
I: [pulseaudio] alsa-util.c: snd_pcm_hw_params_set_buffer_size_near() failed: Invalid argument
I: [pulseaudio] (alsa-lib)pcm_hw.c: SNDRV_PCM_IOCTL_PREPARE failed (-22)
D: [pulseaudio] alsa-util.c: Set neither period nor buffer size.
I: [pulseaudio] (alsa-lib)pcm_hw.c: SNDRV_PCM_IOCTL_PREPARE failed (-22)
I: [pulseaudio] alsa-util.c: snd_pcm_hw_params failed: Invalid argument
I: [pulseaudio] alsa-util.c: Failed to set hardware parameters on plughw:0,1: Invalid argument
D: [pulseaudio] alsa-mixer.c: Profile set 0xaaaadddcb180, auto_profiles=no, probed=yes, n_mappings=1, n_profiles=1, n_decibel_fixes=0
D: [pulseaudio] alsa-mixer.c: Mapping HDMI: plughw:0,2: sink (HDMI Digital Stereo Output), priority=100, channel_map=front-left,front-right, sup
ported=yes, direction=1
D: [pulseaudio] alsa-mixer.c: Profile HDMI (HDMI output.), input=(null), output=(null) priority=1000, supported=yes n_input_mappings=0, n_output
_mappings=1
D: [pulseaudio] alsa-mixer.c: Output HDMI: plughw:0,2: sink
D: [pulseaudio] alsa-ucm.c: Check device HDMI-stereo conformance with 0 other devices
D: [pulseaudio] alsa-ucm.c: First device in combination, number 1
D: [pulseaudio] alsa-ucm.c: Add port [Out] HDMI-stereo: HDMI Digital Stereo Output
D: [pulseaudio] alsa-ucm.c: Port [Out] HDMI-stereo direction output, priority 100
D: [pulseaudio] alsa-ucm.c: Adding profile HDMI to port [Out] HDMI-stereo.
I: [pulseaudio] module-card-restore.c: Restoring port latency offsets for card alsa_card.platform-sound.
D: [pulseaudio] module-alsa-card.c: Found 0 jacks.
I: [pulseaudio] card.c: Created 0 “alsa_card.platform-sound”
I: [pulseaudio] alsa-ucm.c: Set UCM verb to HDMI
D: [pulseaudio] reserve-wrap.c: Unable to contact D-Bus session bus: org.freedesktop.DBus.Error.NotSupported: Unable to autolaunch a dbus-daemon
without a $DISPLAY for X11
D: [pulseaudio] alsa-util.c: Trying plughw:0,2 with SND_PCM_NO_AUTO_FORMAT …
D: [pulseaudio] alsa-util.c: Managed to open plughw:0,2
I: [pulseaudio] alsa-util.c: Cannot disable ALSA period wakeups
D: [pulseaudio] alsa-util.c: Maximum hw buffer size is 2972 ms
D: [pulseaudio] alsa-util.c: Set buffer size first (to 88200 samples), period size second (to 88200 samples).
I: [pulseaudio] alsa-util.c: ALSA period wakeups were not disabled
I: [pulseaudio] alsa-sink.c: Successfully opened device plughw:0,2.
I: [pulseaudio] alsa-sink.c: Selected mapping ‘HDMI Digital Stereo Output’ (HDMI: plughw:0,2: sink).
I: [pulseaudio] alsa-sink.c: Successfully enabled mmap() mode.
I: [pulseaudio] alsa-sink.c: Successfully enabled timer-based scheduling mode.
D: [pulseaudio] alsa-ucm.c: Check device HDMI-stereo conformance with 0 other devices
D: [pulseaudio] alsa-ucm.c: First device in combination, number 1
D: [pulseaudio] alsa-ucm.c: Port [Out] HDMI-stereo direction output, priority 100
I: [pulseaudio] alsa-ucm.c: ALSA device plughw:0,2 roles: (null)
I: [pulseaudio] sink.c: Created sink 0 “alsa_output.platform-sound.HDMI__plughw_0_2__sink” with sample spec s16le 2ch 44100Hz and channel map fr
ont-left,front-right

As you can see that HDMI is working but when it comes to PCM on HiFi failing.

pacmd list-sinks | grep -e ‘name:’ -e ‘index:’

  • index: 0
    name: <alsa_output.platform-sound.HDMI__plughw_0_2__sink>

root@OpenQ:~# aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: DB820c [DB820c], device 1: MultiMedia2 () []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: DB820c [DB820c], device 2: MultiMedia3 (
) []
Subdevices: 1/1
Subdevice #0: subdevice #0
root@OpenQ:~# arecord -l
**** List of CAPTURE Hardware Devices ****
card 0: DB820c [DB820c], device 1: MultiMedia2 () []
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: DB820c [DB820c], device 2: MultiMedia3 (
) []
Subdevices: 1/1
Subdevice #0: subdevice #0

apt-cache depends pulseaudio
pulseaudio
  Depends: libasound2
  Depends: libc6
  Depends: libcap2
  Depends: libdbus-1-3
  Depends: libgcc1
  Depends: libice6
  Depends: libltdl7
  Depends: liborc-0.4-0
  Depends: libpulse0
  Depends: libsm6
  Depends: libsndfile1
  Depends: libsoxr0
  Depends: libspeexdsp1
  Depends: libstdc++6
  Depends: libsystemd0
  Depends: libtdb1
  Depends: libudev1
  Depends: libwebrtc-audio-processing1
  Depends: libx11-6
  Depends: libx11-xcb1
  Depends: libxcb1
  Depends: libxtst6
  Depends: adduser
  Depends: lsb-base
  Depends: libasound2-plugins
  Depends: pulseaudio-utils
  Recommends: rtkit
  Recommends: libpam-systemd
  Recommends: dbus-user-session
  Suggests: udev
  Suggests: pavumeter
  Suggests: pavucontrol
  Suggests: <paman>
  Suggests: paprefs

If required more information feel free to ask.

Thanks,
parbatha

Hi Parbatha,
I just pushed few fixes to ucm files at srinivas.kandagatla/alsa-lib.git - [no description]
I have verified these with my 4.14 branch, it should work for you too.
Let me know!
Thanks,
Srini

Hi Srinivas,

Multimedia 1 support compress playback format.
Multimedia 2 & 3 support PCM playback and capture mode.

HDMI on pluhgw:0,0 fails.

cat /proc/asound/card0/compr0/info 
card: 0
device: 0
stream: PLAYBACK
id: (MultiMedia1)

I: [pulseaudio] alsa-ucm.c: UCM available for card DB820c
I: [pulseaudio] alsa-ucm.c: Set UCM verb to HDMI
D: [pulseaudio] alsa-ucm.c: Got PlaybackPCM for verb HDMI: plughw:0,0
D: [pulseaudio] alsa-ucm.c: Got TQ for verb HDMI: HiFi
D: [pulseaudio] alsa-ucm.c: Got PlaybackChannels for device HDMI-stereo: 2
D: [pulseaudio] alsa-ucm.c: UCM playback device HDMI-stereo fetch pcm from verb default plughw:0,0
D: [pulseaudio] alsa-ucm.c: No _conflictingdevs for device HDMI-stereo
D: [pulseaudio] alsa-ucm.c: No _supporteddevs for device HDMI-stereo
I: [pulseaudio] module-alsa-card.c: Found UCM profiles
D: [pulseaudio] alsa-ucm.c: UCM mapping: Mapping HDMI: plughw:0,0: sink dev HDMI-stereo
D: [pulseaudio] alsa-mixer.c: Profile HDMI (HDMI output.), input=(null), output=(null) priority=1000, supported=yes n_input_mappings=0, n_output
_mappings=1
D: [pulseaudio] alsa-mixer.c: Output HDMI: plughw:0,0: sink
I: [pulseaudio] alsa-ucm.c: Set ucm verb to HDMI
D: [pulseaudio] alsa-util.c: Trying plughw:0,0 with SND_PCM_NO_AUTO_FORMAT ...
I: [pulseaudio] (alsa-lib)pcm_hw.c: open '/dev/snd/pcmC0D0p' failed (-2)
I: [pulseaudio] alsa-util.c: Error opening PCM device plughw:0,0: No such file or directory
D: [pulseaudio] alsa-mixer.c: Profile set 0xaaaadeeba270, auto_profiles=no, probed=yes, n_mappings=0, n_profiles=0, n_decibel_fixes=0
E: [pulseaudio] module-alsa-card.c: Failed to find a working profile.
E: [pulseaudio] module.c: Failed to load module "module-alsa-card" (argument: "device_id="0" name="platform-sound" card_name="alsa_card.platform
-sound" namereg_fail=false tsched=yes fixed_latency_range=no ignore_dB=no deferred_volume=yes use_ucm=yes card_properties="module-udev-detect.di
scovered=1""): initialization failed.
I: [pulseaudio] module-udev-detect.c: Card /devices/platform/sound/sound/card0 (alsa_card.platform-sound) failed to load module.
I: [pulseaudio] module-udev-detect.c: Found 1 cards.

Scenario 1: HDMI (MultiMedia3 - hw:0,2) works. If HiFi(playback & captured) is commented/disabled.

Scenario 2: HDMI (MultiMedia3 - hw:0,2) fails. HiFi playback(MultiMedia2 - hw:0,1) works. HiFi Capture(Multimedia3 - hw:0,2) disabled/commented.

[  115.821516] q6routing adsp-pil:smd-edge:apr:q6adm:routing: Found Matching Copp 0x0
[  115.821656] qcom-q6adm aprsvc:q6adm:4:8: cmd = 0x10325 return error = 0x2
[  115.828133] q6routing adsp-pil:smd-edge:apr:q6adm:routing: DSP returned error[2]
[  120.887569] qcom-q6adm aprsvc:q6adm:4:8: cmd = 0x10327 return error = 0x2
[  120.887673] qcom-q6adm aprsvc:q6adm:4:8: DSP returned error[2]
[  120.893358] qcom-q6adm aprsvc:q6adm:4:8: Failed to close copp -22

alsa-ucm.c: Failed to set verb HDMI

Scenario 3: HDMI(Multimedia 3) fails. HiFi Playback(Multimedia 2) fails. HiFi Capture(Multimedia 3) fails.

[   22.223125] wcd9335-codec wcd9335-codec.0: ERROR: Invalid decimator: -1
[   22.227891] wcd9335-codec wcd9335-codec.0: Cannot set TX Decimator rate
[   22.234494] wcd9335-codec wcd9335-codec.0: ASoC: can't set wcd9335_tx1 hw params: -22
[   22.241087]  SLIM Capture: ASoC: hw_params BE failed -22
[   22.249069]  MultiMedia3: ASoC: hw_params BE failed -22

Scenario 4: HDMI(Multimedia 3) commented/disabled. HiFi Playback(Multimedia 2) fails. HiFi Capture(Multimedia 3) fails.

[  132.667017] wcd9335-codec wcd9335-codec.0: ERROR: Invalid decimator: -1
[  132.667020] wcd9335-codec wcd9335-codec.0: Cannot set TX Decimator rate
[  132.667023] wcd9335-codec wcd9335-codec.0: ASoC: can't set wcd9335_tx1 hw params: -22
[  132.667024]  SLIM Capture: ASoC: hw_params BE failed -22
[  132.667026]  MultiMedia3: ASoC: hw_params BE failed -22

D: [pulseaudio] alsa-ucm.c: Got PlaybackPCM for verb HiFi: plughw:0,1
D: [pulseaudio] alsa-ucm.c: Got CapturePCM for verb HiFi: plughw:0,2
D: [pulseaudio] alsa-ucm.c: Got CaptureChannels for device Handset: 1
D: [pulseaudio] alsa-ucm.c: UCM capture device Handset fetch pcm from verb default plughw:0,2
D: [pulseaudio] alsa-ucm.c: No _conflictingdevs for device Handset
D: [pulseaudio] alsa-ucm.c: No _supporteddevs for device Handset
D: [pulseaudio] alsa-ucm.c: Got PlaybackChannels for device Headphones: 2
D: [pulseaudio] alsa-ucm.c: UCM playback device Headphones fetch pcm from verb default plughw:0,1
D: [pulseaudio] alsa-ucm.c: No _conflictingdevs for device Headphones
D: [pulseaudio] alsa-ucm.c: No _supporteddevs for device Headphones
I: [pulseaudio] module-alsa-card.c: Found UCM profiles
D: [pulseaudio] alsa-ucm.c: UCM mapping: Mapping HiFi: plughw:0,2: source dev Handset
D: [pulseaudio] alsa-ucm.c: UCM mapping: Mapping HiFi: plughw:0,1: sink dev Headphones
D: [pulseaudio] alsa-mixer.c: Profile HiFi (Play HiFi quality Music.), input=(null), output=(null) priority=8000, supported=yes n_input_mappings=1, n_output_mappings=1
D: [pulseaudio] alsa-mixer.c: Input HiFi: plughw:0,2: source
D: [pulseaudio] alsa-mixer.c: Output HiFi: plughw:0,1: sink
I: [pulseaudio] alsa-ucm.c: Set ucm verb to HiFi
D: [pulseaudio] alsa-util.c: Trying plughw:0,1 with SND_PCM_NO_AUTO_FORMAT ...
D: [pulseaudio] alsa-util.c: Managed to open plughw:0,1
D: [pulseaudio] alsa-util.c: Maximum hw buffer size is 2972 ms
I: [pulseaudio] alsa-util.c: snd_pcm_hw_params_set_buffer_size_near() failed: Invalid argument
D: [pulseaudio] alsa-util.c: Set period size first (to 1102 samples), buffer size second (to 4408 samples).
D: [pulseaudio] alsa-util.c: Trying plughw:0,2 with SND_PCM_NO_AUTO_FORMAT ...
D: [pulseaudio] alsa-util.c: Managed to open plughw:0,2
D: [pulseaudio] alsa-util.c: Maximum hw buffer size is 5944 ms
I: [pulseaudio] (alsa-lib)pcm_hw.c: SNDRV_PCM_IOCTL_HW_PARAMS failed (-22)
I: [pulseaudio] (alsa-lib)pcm_hw.c: SNDRV_PCM_IOCTL_HW_PARAMS failed (-22)
I: [pulseaudio] (alsa-lib)pcm_hw.c: SNDRV_PCM_IOCTL_HW_PARAMS failed (-22)
I: [pulseaudio] (alsa-lib)pcm_hw.c: SNDRV_PCM_IOCTL_HW_PARAMS failed (-22)
D: [pulseaudio] alsa-util.c: Set neither period nor buffer size.
I: [pulseaudio] (alsa-lib)pcm_hw.c: SNDRV_PCM_IOCTL_HW_PARAMS failed (-22)
I: [pulseaudio] alsa-util.c: snd_pcm_hw_params failed: Invalid argument
D: [pulseaudio] alsa-util.c: Trying plughw:0,2 without SND_PCM_NO_AUTO_FORMAT ...
D: [pulseaudio] alsa-util.c: Managed to open plughw:0,2
D: [pulseaudio] alsa-util.c: Maximum hw buffer size is 5944 ms
I: [pulseaudio] (alsa-lib)pcm_hw.c: SNDRV_PCM_IOCTL_HW_PARAMS failed (-22)
I: [pulseaudio] (alsa-lib)pcm_hw.c: SNDRV_PCM_IOCTL_HW_PARAMS failed (-22)
I: [pulseaudio] (alsa-lib)pcm_hw.c: SNDRV_PCM_IOCTL_HW_PARAMS failed (-22)
I: [pulseaudio] (alsa-lib)pcm_hw.c: SNDRV_PCM_IOCTL_HW_PARAMS failed (-22)
D: [pulseaudio] alsa-util.c: Set neither period nor buffer size.
I: [pulseaudio] (alsa-lib)pcm_hw.c: SNDRV_PCM_IOCTL_HW_PARAMS failed (-22)
I: [pulseaudio] alsa-util.c: snd_pcm_hw_params failed: Invalid argument
I: [pulseaudio] alsa-util.c: Failed to set hardware parameters on plughw:0,2: Invalid argument
I: [pulseaudio] (alsa-lib)main.c: cdev is not defined!
I: [pulseaudio] (alsa-lib)main.c: Unable to disable verb HiFi

Thanks & Regards,
Ganesh Biradar

Hi Parbatha,
The UCM files which I shared are for DB820c
HDMI digital audio is on Mulitmedia1
WCD9335 analog audio is on Multimedia2 and Multimedia3

As of Now we are not setting any compressed audio profile Yet, as pluseaudio does not support compressed audio yet.
So can you try out without compressed audio and let me know.
Thanks,
srini

Hi Srinivas,

I have tried getting HiFi Playback(on Multimedia 2) & HiFi Capture(on Multimedia 3). Both failed.

I got following error.

[   39.098925] wcd9335-codec wcd9335-codec.0: ERROR: Invalid decimator: -1
[   39.103693] wcd9335-codec wcd9335-codec.0: Cannot set TX Decimator rate
[   39.110278] wcd9335-codec wcd9335-codec.0: ASoC: can't set wcd9335_tx1 hw params: -22
[   39.116875]  SLIM Capture: ASoC: hw_params BE failed -22
[   39.124859]  MultiMedia3: ASoC: hw_params BE failed -22

If I disabled HiFi Capture and only enable HiFi playback(pulseaudio detect Headphones playback). i get following error and no sound while playing test wav file.

[   28.387361] q6routing adsp-pil:smd-edge:apr:q6adm:routing: Found Matching Copp 0x0
[   28.387517] qcom-q6adm aprsvc:q6adm:4:8: cmd = 0x10325 return error = 0x2
[   28.393847] q6routing adsp-pil:smd-edge:apr:q6adm:routing: DSP returned error[2]
[   38.117118] qcom-q6adm aprsvc:q6adm:4:8: cmd = 0x10327 return error = 0x2
[   38.117175] qcom-q6adm aprsvc:q6adm:4:8: DSP returned error[2]
[   38.123048] qcom-q6adm aprsvc:q6adm:4:8: Failed to close copp -22

For Error:"[ 39.098925] wcd9335-codec wcd9335-codec.0: ERROR: Invalid decimator: -1"
Are you sure that you have cset “name=‘SLIM TX0 MUX’ DEC0” in HiFi UCM ?
I did update the UCM yesterday with these changes.

For "[ 28.387361] q6routing adsp-pil:smd-edge:apr:q6adm:routing: "
You need kernel/git/broonie/sound.git - ASoC

I pushed my 4.14 WIP branch to srinivas.kandagatla/linux.git - srini kernel working tree

This should have all the patches.

Thanks,
srini

Hi Srinivas,

Are you sure that you have cset “name=‘SLIM TX0 MUX’ DEC0” in HiFi UCM ?

yes.

I have rebase release/qcomlt-4.14-audio on top of my kernel and tested still i’m getting below errors.

[   38.866452] wcd9335-codec wcd9335-codec.0: ERROR: Invalid decimator: -1
[   38.871169] wcd9335-codec wcd9335-codec.0: Cannot set TX Decimator rate
[   38.877767] wcd9335-codec wcd9335-codec.0: ASoC: can't set wcd9335_tx1 hw params: -22
[   38.884355]  SLIM Capture: ASoC: hw_params BE failed -22
[   38.892336]  MultiMedia3: ASoC: hw_params BE failed -22

Added more debug info:

[   24.623604] wcd9335-codec wcd9335-codec.0: wcd9335_hw_params: TX sample rate: 48000
[   24.628367] wcd9335-codec wcd9335-codec.0: SLIM TX0 port DAI ID:1
[   24.635982] wcd9335-codec wcd9335-codec.0: tx_port 0 tx_port_reg:0xd83a
[   24.642232] wcd9335-codec wcd9335-codec.0: RX_MIX_TX0 going to SLIM TX0
[   24.648656] wcd9335-codec wcd9335-codec.0: tx_mux_sel 0 tx_port 0 decimator -1
[   24.655269] wcd9335-codec wcd9335-codec.0: ERROR: Invalid decimator: -1
[   24.662548] wcd9335-codec wcd9335-codec.0: Cannot set TX Decimator rate
[   24.669021] wcd9335-codec wcd9335-codec.0: ASoC: can't set wcd9335_tx1 hw params: -22
[   24.675623]  SLIM Capture: ASoC: hw_params BE failed -22
[   24.683599]  MultiMedia3: ASoC: hw_params BE failed -22

Thanks & Regards,
parbatha

Hi Srinivas,

The issue was on my side. In HiFi capture, one special character added it cause for failure to set. Now it is working and Headset is getting detected.

I have to do the proper test. I will update my result.

In DB820c.conf, HDMI is enabled and I’m getting the following logs on serial console

[   21.638148]  MultiMedia1: ASoC: no backend DAIs enabled for MultiMedia1
[   21.638285]  MultiMedia1: ASoC: no backend DAIs enabled for MultiMedia1
[   21.640971]  MultiMedia1: ASoC: no backend DAIs enabled for MultiMedia1
[   21.641286]  MultiMedia1: ASoC: no backend DAIs enabled for MultiMedia1
[   21.641466]  MultiMedia1: ASoC: no backend DAIs enabled for MultiMedia1
[   21.641698]  MultiMedia1: ASoC: no backend DAIs enabled for MultiMedia1
[   21.641867]  MultiMedia1: ASoC: no backend DAIs enabled for MultiMedia1

which failing HiFi. If I disabled HDMI, HiFi works fine.

Is there a way to test HDMI digital audio.

regards,
Parbatha

Hi Parbatha,
The way I test this is using “PulseAudio Volume Control” UI, where I can select correct profile.
I have no issues switching between HDMI and Hifi on linaro-alip-dragonboard-820c-183 build.
I use simple lxplayer to test audio for this usecase.

–srini

Hi Srinivas,

ls /dev/snd/
by-path    pcmC0D0c  pcmC0D1c  pcmC0D2c  timer
controlC0  pcmC0D0p  pcmC0D1p  pcmC0D2p
  1. HiFi Disabled, HDMI(MultiMedia1) Enabled - HDMI working
  2. HiFi Enabled, HDMI(MultiMedia1) Enabled - Pulseaudio fails to detect HiFi and HDMI.
  3. HiFi Enabled, HDMI(MultiMedia1) Disabled - HiFi works, HDMI fails

following logs prints continuously(case 2).

**MultiMedia1: ASoC: no backend DAIs enabled for MultiMedia1**

regards,
parbatha

Hi Parbatha,

Can you please share the command to enable Headphone. I am trying to test audio interface and i have tried some commands but i am not able to enable Headphone.

So if you have some commands to test audio interfaces headphone and other as well, can you please share it.

Regards,
Hiren

Hi Hiren,

Please take a look. It will help you.

For uncompress format use aplay/arecord.

regards,
parbatha

Thank you for your help, now i am able to capture/playback with Headphone.

Hi Parbatha and @srini

I am also trying audio on expansion connector (Lineouts, Speaker and Mic). Is this interface supported? I am using 4.14.96 kernel working/qualcomm/kernel.git - Qualcomm Landing Team kernel

I tried below command for Lineout1, no error while applying commands, but nothing play on speaker connected to Lineout1.

amixer -c 0 cset iface=MIXER,name=‘SLIM RX0 MUX’ ZERO
amixer -c 0 cset iface=MIXER,name=‘SLIM RX1 MUX’ ZERO
amixer -c 0 cset iface=MIXER,name=‘SLIM RX2 MUX’ ZERO
amixer -c 0 cset iface=MIXER,name=‘SLIM RX3 MUX’ AIF4_PB
amixer -c 0 cset iface=MIXER,name=‘SLIM RX4 MUX’ ZERO
amixer -c 0 cset iface=MIXER,name=‘SLIM RX5 MUX’ ZERO
amixer -c 0 cset iface=MIXER,name=‘SLIM RX6 MUX’ ZERO
amixer -c 0 cset iface=MIXER,name=‘SLIM RX7 MUX’ ZERO
amixer -c 0 cset iface=MIXER,name=‘SLIMBUS_6_RX Audio Mixer MultiMedia2’ 1
amixer -c 0 cset iface=MIXER,name=‘RX INT3_2 MUX’ RX3
amixer -c 0 cset iface=MIXER,name=‘RX3 Digital Volume’ 68

aplay -D hw:0,1 /usr/share/sounds/alsa/Front_Center.wav