Re: sink creation initialization timings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I think I might understand this now.

It appears the initial load of module-udev-detect (in /etc/pulse/default.ps) fails to open the audio device because its busy (why I dont know - there is no sound).
So the attempt to create the remap sink in my ~/.config/pulse/default.pa fails because the default sink doesnt exist at that point.

Now Im guessing that the udev module is polling the audio devices every so often (because it handles eg usb devices)  and after a while (1-3 secs) the hardware audio device becomes available then it loads the device etc. and loads the profiles.
But of course this is past the point for running commands in default.pa.

This also means that when I run the remap command manually all the sinks exist so everything works.

So next question is how to run the remap command at this point.
Is the only option to add a udev command?

Is there any way to get the initial udev load to wait for the device to become free?

David




On Sun, Dec 27, 2020 at 6:54 PM David Osguthorpe <david.osguthorpe@xxxxxxxxx> wrote:
PS Should say I havent attempted to change anything in the profiles  (ie anything in 
/usr/share/pulseaudio/alsa-mixer/profile-sets or /lib/udev/rules.d/90-pulseaudio.rules- its all default Ubuntu 20.04.

On Sun, Dec 27, 2020 at 6:36 PM David Osguthorpe <david.osguthorpe@xxxxxxxxx> wrote:
If I stop the pulse daemon (systemctl --user mask pulseaudio.socket, systemctl --user stop pulseaudio)
then start the daemon with pulseaudio -vvvvv or systemctl --user start pulseaudio everything works, the remap device remap-analog-surround-40 exists and is set as the default sink (no reboot).

I have not tried explicitly using the commands via pacmd - Ill see what happens.

I have a feeling its something to do with profiles - but dont understand why the profiles seem to be activated after everything else and how to change this - well I dont understand profiles.

On Sun, Dec 27, 2020 at 5:51 PM guest271314 <guest271314@xxxxxxxxx> wrote:
What happens when you run the commands at terminal without using or relying on default.pa or ~/.config/pulse?

On Sun, Dec 27, 2020 at 9:40 AM David Osguthorpe <david.osguthorpe@xxxxxxxxx> wrote:

This is direct from the boot logs:

default.pa file in ~/.config/pulse

#!/usr/bin/pulseaudio -nF

# 


.include /etc/pulse/default.pa


.fail


set-default-sink alsa_output.pci-0000_00_1f.3.analog-surround-40


load-module module-remap-sink sink_name=remap-analog-surround-40 master=alsa_output.pci-0000_00_1f.3.analog-surround-40  channels=4 channel_map=front-left,front-right,rear-left,rear-right master_channel_map=front-left,rear-left,front-right,rear-right remix=no



### Make some devices default

#set-default-sink output

set-default-sink remap-analog-surround-40

#set-default-source input



syslog portion where fails to load:



Dec 27 13:33:33 david-MacBookPro pulseaudio[1422]: Starting GLib main loop

Dec 27 13:33:33 david-MacBookPro pulseaudio[1422]: Loaded "module-filter-heuristics" (index: #21; argument: "").

Dec 27 13:33:33 david-MacBookPro pulseaudio[1422]: Loaded "module-filter-apply" (index: #22; argument: "").

Dec 27 13:33:33 david-MacBookPro pulseaudio[1422]: Master sink not found

Dec 27 13:33:33 david-MacBookPro pulseaudio[1422]: Failed to load module "module-remap-sink" (argument: "sink_name=remap-analog-surround-40 master=alsa_output.pci-0000_00_1f.3.analog-surround-40  channels=4 channel_map=front-left,front-right,rear-left,rear-right master_channel_map=front-left,rear-left,front-right,rear-right remix=no"): initialization failed.

Dec 27 13:33:33 david-MacBookPro pulseaudio[1422]: Sink alsa_output.pci-0000_00_1f.3.analog-surround-40 does not exist.

Dec 27 13:33:33 david-MacBookPro pulseaudio[1422]: Sink remap-analog-surround-40 does not exist.

Dec 27 13:33:33 david-MacBookPro pulseaudio[1422]: Successfully connected to D-Bus session bus fd35a79135b7241371a4f2745fe88d2d as :1.8



syslog from same boot where analog-surround-40 is first mentioned:


Dec 27 13:33:37 david-MacBookPro pulseaudio[1422]: Looking at profile output:analog-surround-40

Dec 27 13:33:37 david-MacBookPro pulseaudio[1422]: Checking for playback on Analogue Surround 4.0 (analog-surround-40)

Dec 27 13:33:37 david-MacBookPro pulseaudio[1422]: Trying surround40:0 with SND_PCM_NO_AUTO_FORMAT ...

Dec 27 13:33:37 david-MacBookPro pulseaudio[1422]: Managed to open surround40:0

Dec 27 13:33:37 david-MacBookPro pulseaudio[1422]: snd_pcm_hw_params_set_format(Signed 16 bit Little Endian) failed: Invalid argument

Dec 27 13:33:37 david-MacBookPro pulseaudio[1422]: snd_pcm_hw_params_set_format(Signed 16 bit Big Endian) failed: Invalid argument

Dec 27 13:33:37 david-MacBookPro pulseaudio[1422]: snd_pcm_hw_params_set_format(Float 32 bit Little Endian) failed: Invalid argument

Dec 27 13:33:37 david-MacBookPro pulseaudio[1422]: snd_pcm_hw_params_set_format(Float 32 bit Big Endian) failed: Invalid argument

Dec 27 13:33:37 david-MacBookPro pulseaudio[1422]: Maximum hw buffer size is 92 ms

Dec 27 13:33:38 david-MacBookPro pulseaudio[1422]: Set buffer size first (to 4408 samples), period size second (to 1102 samples).

Dec 27 13:33:38 david-MacBookPro pulseaudio[1422]: Device surround40:0 doesn't support sample format s16le, changed to s32le.

Dec 27 13:33:38 david-MacBookPro pulseaudio[1422]: Profile output:analog-surround-40 supported.

Dec 27 13:33:38 david-MacBookPro pulseaudio[1422]: Removing path 'analog-output' as it is a subset of 'analog-output-speaker'.



analog-surround-40 is a valid setting for Sound output in the Settings dialog - and is set  as the default output device.



_______________________________________________
pulseaudio-discuss mailing list
pulseaudio-discuss@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss
_______________________________________________
pulseaudio-discuss mailing list
pulseaudio-discuss@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss
_______________________________________________
pulseaudio-discuss mailing list
pulseaudio-discuss@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss

[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux