On Fri, 2016-02-26 at 13:18 +0100, Nazar Mokrynskyi wrote: > Can I add debug output somewhere in source code to understand what is > going wrong, where and why?
pa_alsa_set_hw_params() in src/modules/alsa/alsa-util.c tries to configure the hardware, but it fails. You can add more logging there, and since aplay+arecord works, you can compare what pulseaudio does to what aplay and arecord do, and figure out what is the critical difference. You can also have a look at pa_alsa_profile_set_probe(), that's the higher-level function that goes through all the configured profiles on a card and checks which ones work. FWIW, the log that you posted already has a fair bit of stuff. I'll paste here the relevant section. Note that the output is already open at this point, because the previous checked profile was output:analog- stereo, and since the output parts of the two profiles are the same, pulseaudio doesn't close the output when it moves from checking output:analog-stereo to checking output:analog-stereo+input:analog- stereo. That is, it's opening the microphone that is failing. ( 0.064| 0.000) D: [pulseaudio] alsa-mixer.c: Looking at profile output:analog-stereo-output+input:analog-stereo-input ( 0.064| 0.000) D: [pulseaudio] alsa-mixer.c: Checking for recording on Analog Stereo (analog-stereo-input) ( 0.064| 0.000) D: [pulseaudio] alsa-util.c: Trying hw:2 with SND_PCM_NO_AUTO_FORMAT ... ( 0.064| 0.000) D: [pulseaudio] alsa-util.c: Managed to open hw:2 ( 0.064| 0.000) D: [pulseaudio] alsa-util.c: Maximum hw buffer size is 1820 ms ( 0.064| 0.000) I: [pulseaudio] (alsa-lib)pcm_hw.c: SNDRV_PCM_IOCTL_HW_PARAMS failed (-5) ( 0.064| 0.000) I: [pulseaudio] (alsa-lib)pcm_hw.c: SNDRV_PCM_IOCTL_HW_PARAMS failed (-5) ( 0.065| 0.000) I: [pulseaudio] (alsa-lib)pcm_hw.c: SNDRV_PCM_IOCTL_HW_PARAMS failed (-5) ( 0.065| 0.000) I: [pulseaudio] (alsa-lib)pcm_hw.c: SNDRV_PCM_IOCTL_HW_PARAMS failed (-5) ( 0.065| 0.000) D: [pulseaudio] alsa-util.c: Set neither period nor buffer size. ( 0.065| 0.000) I: [pulseaudio] (alsa-lib)pcm_hw.c: SNDRV_PCM_IOCTL_HW_PARAMS failed (-5) ( 0.065| 0.000) I: [pulseaudio] alsa-util.c: snd_pcm_hw_params failed: Input/output error ( 0.065| 0.000) D: [pulseaudio] alsa-util.c: Trying hw:2 without SND_PCM_NO_AUTO_FORMAT ... ( 0.066| 0.000) D: [pulseaudio] alsa-util.c: Managed to open hw:2 ( 0.066| 0.000) D: [pulseaudio] alsa-util.c: Maximum hw buffer size is 1820 ms ( 0.066| 0.000) I: [pulseaudio] (alsa-lib)pcm_hw.c: SNDRV_PCM_IOCTL_HW_PARAMS failed (-5) ( 0.066| 0.000) I: [pulseaudio] (alsa-lib)pcm_hw.c: SNDRV_PCM_IOCTL_HW_PARAMS failed (-5) ( 0.067| 0.000) I: [pulseaudio] (alsa-lib)pcm_hw.c: SNDRV_PCM_IOCTL_HW_PARAMS failed (-5) ( 0.067| 0.000) I: [pulseaudio] (alsa-lib)pcm_hw.c: SNDRV_PCM_IOCTL_HW_PARAMS failed (-5) ( 0.067| 0.000) D: [pulseaudio] alsa-util.c: Set neither period nor buffer size. ( 0.067| 0.000) I: [pulseaudio] (alsa-lib)pcm_hw.c: SNDRV_PCM_IOCTL_HW_PARAMS failed (-5) ( 0.067| 0.000) I: [pulseaudio] alsa-util.c: snd_pcm_hw_params failed: Input/output error ( 0.067| 0.000) D: [pulseaudio] alsa-util.c: Trying plug:hw:2 with SND_PCM_NO_AUTO_FORMAT ... ( 0.068| 0.000) D: [pulseaudio] alsa-util.c: Managed to open plug:hw:2 ( 0.068| 0.000) D: [pulseaudio] alsa-util.c: Maximum hw buffer size is 1820 ms ( 0.068| 0.000) I: [pulseaudio] (alsa-lib)pcm_hw.c: SNDRV_PCM_IOCTL_HW_PARAMS failed (-5) ( 0.068| 0.000) I: [pulseaudio] (alsa-lib)pcm_hw.c: SNDRV_PCM_IOCTL_HW_PARAMS failed (-5) ( 0.069| 0.000) I: [pulseaudio] (alsa-lib)pcm_hw.c: SNDRV_PCM_IOCTL_HW_PARAMS failed (-5) ( 0.069| 0.000) I: [pulseaudio] (alsa-lib)pcm_hw.c: SNDRV_PCM_IOCTL_HW_PARAMS failed (-5) ( 0.069| 0.000) D: [pulseaudio] alsa-util.c: Set neither period nor buffer size. ( 0.070| 0.000) I: [pulseaudio] (alsa-lib)pcm_hw.c: SNDRV_PCM_IOCTL_HW_PARAMS failed (-5) ( 0.070| 0.000) I: [pulseaudio] alsa-util.c: snd_pcm_hw_params failed: Input/output error ( 0.070| 0.000) D: [pulseaudio] alsa-util.c: Trying plug:hw:2 without SND_PCM_NO_AUTO_FORMAT ... ( 0.070| 0.000) D: [pulseaudio] alsa-util.c: Managed to open plug:hw:2 ( 0.070| 0.000) D: [pulseaudio] alsa-util.c: Maximum hw buffer size is 1820 ms ( 0.070| 0.000) I: [pulseaudio] (alsa-lib)pcm_hw.c: SNDRV_PCM_IOCTL_HW_PARAMS failed (-5) ( 0.071| 0.000) I: [pulseaudio] (alsa-lib)pcm_hw.c: SNDRV_PCM_IOCTL_HW_PARAMS failed (-5) ( 0.071| 0.000) I: [pulseaudio] (alsa-lib)pcm_hw.c: SNDRV_PCM_IOCTL_HW_PARAMS failed (-5) ( 0.072| 0.000) I: [pulseaudio] (alsa-lib)pcm_hw.c: SNDRV_PCM_IOCTL_HW_PARAMS failed (-5) ( 0.072| 0.000) D: [pulseaudio] alsa-util.c: Set neither period nor buffer size. ( 0.072| 0.000) I: [pulseaudio] (alsa-lib)pcm_hw.c: SNDRV_PCM_IOCTL_HW_PARAMS failed (-5) ( 0.072| 0.000) I: [pulseaudio] alsa-util.c: snd_pcm_hw_params failed: Input/output error ( 0.072| 0.000) I: [pulseaudio] alsa-util.c: Failed to set hardware parameters on plug:hw:2: Input/output error -- Tanu _______________________________________________ pulseaudio-discuss mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss
