alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Tanu Kaskinen <tanuk@iki.fi>
To: General PulseAudio Discussion <pulseaudio-discuss@lists.freedesktop.org>
Cc: ffado-devel@lists.sourceforge.net, alsa-devel@alsa-project.org,
	ramon.fried@linaro.org
Subject: Re: [PATCH] Suppress udev detection of sound card for some units on IEEE 1394 bus
Date: Sat, 11 Aug 2018 13:12:52 +0300	[thread overview]
Message-ID: <d451629cf26ca5abfec14b96c8791019f3b45d15.camel@iki.fi> (raw)
In-Reply-To: <20180715105735.13008-1-o-takashi@sakamocchi.jp>

On Sun, 2018-07-15 at 19:57 +0900, Takashi Sakamoto wrote:
> A bug was filed to bugzilla.kernel.org for a quirk of some models which
> ALSA BeBoB driver supports.
> 
> Bug 199365 - repeating bus resets on Firewire bus with Focusrite Saffaire 26/io
> https://bugzilla.kernel.org/show_bug.cgi?id=199365
> 
> Some models (two models as long as I know) have a quirk to disappear from
> IEEE 1394 bus at disconnections of packet streaming. Corresponding
> character devices are removed according to 'remove' callbacks of relevant
> drivers from Linux dd core. Then the models re-appear on the bus by
> generating bus resets and corresponding character devices are added
> according to 'probe' callbacks from Linux dd core.
> 
> In a view of ALSA applications, this looks that plug-out/plug-in occur in
> a sequential order for the models when they stop playback/capture substream.
> For most applications, this doesn't cause large issue. However, this quirk
> is not good for combination of below modules in PulseAudio. PulseAudio
> enters endless loop to detect the models and start/stop PCM substream.
>  - module-udev-detect
>  - module-alsa-card
>  - module-suspend-on-idle
> 
> In detail, please read my comment no.6:
> https://bugzilla.kernel.org/show_bug.cgi?id=199365#c6
> 
> This commit suppressed udev detection of sound card for the issued models.
> For the models, 'PULSE_IGNORE' flag is added to udev rules, then
> module-udev-detect don't handle the models and PulseAudio never uses the
> models automatically. In a scenario for users to load
> module-alsa-card/module-alsa-sink/module-alsa-source by hand, although
> these modules can still stop PCM substreams with module-suspend-on-idle,
> PulseAudio never enters the endless loop because udev detection doesn't
> work for the models. In this case, as long as special files for ALSA
> character devices for these models are the same, corresponding sinks and
> sources are available even if the voluntary plug-out/plug-in occur.
> 
> (Focusrite Saffire Pro 10 i/o with systemd 237)
> $ udevadm info -q all -p /devices/pci0000:00/0000:00:07.0/fw1/fw1.0/sound/card1
> P: /devices/pci0000:00/0000:00:07.0/fw1/fw1.0/sound/card1
> E: DEVPATH=/devices/pci0000:00/0000:00:07.0/fw1/fw1.0/sound/card1
> E: ID_BUS=firewire
> E: ID_FOR_SEAT=sound-pci-0000_00_07_0
> E: ID_ID=firewire-0x00130e01000606e0
> E: ID_MODEL=Pro10IO
> E: ID_MODEL_FROM_DATABASE=XIO2213A/B/XIO2221 IEEE-1394b OHCI Controller [Cheetah Express]
> E: ID_MODEL_ID=0x000006
> E: ID_PATH=pci-0000:00:07.0
> E: ID_PATH_TAG=pci-0000_00_07_0
> E: ID_PCI_CLASS_FROM_DATABASE=Serial bus controller
> E: ID_PCI_INTERFACE_FROM_DATABASE=OHCI
> E: ID_PCI_SUBCLASS_FROM_DATABASE=FireWire (IEEE 1394)
> E: ID_SERIAL=0x00130e01000606e0
> E: ID_SERIAL_SHORT=0x00130e01000606e0
> E: ID_VENDOR=Focusrite
> E: ID_VENDOR_FROM_DATABASE=Texas Instruments
> E: ID_VENDOR_ID=0x00130e
> E: SOUND_INITIALIZED=1
> E: SUBSYSTEM=sound
> E: SYSTEMD_WANTS=sound.target
> E: TAGS=:systemd:seat:
> E: USEC_INITIALIZED=957089064
> 
> (Focusrite Saffire Pro 26 i/o with systemd 237)
> $ udevadm info -q all -p /devices/pci0000:00/0000:00:07.0/fw1/fw1.0/sound/card1
> P: /devices/pci0000:00/0000:00:07.0/fw1/fw1.0/sound/card1
> E: DEVPATH=/devices/pci0000:00/0000:00:07.0/fw1/fw1.0/sound/card1
> E: ID_BUS=firewire
> E: ID_FOR_SEAT=sound-pci-0000_00_07_0
> E: ID_ID=firewire-0x00130e0100030cdd
> E: ID_MODEL=Pro26IO
> E: ID_MODEL_FROM_DATABASE=XIO2213A/B/XIO2221 IEEE-1394b OHCI Controller [Cheetah Express]
> E: ID_MODEL_ID=0x000003
> E: ID_PATH=pci-0000:00:07.0
> E: ID_PATH_TAG=pci-0000_00_07_0
> E: ID_PCI_CLASS_FROM_DATABASE=Serial bus controller
> E: ID_PCI_INTERFACE_FROM_DATABASE=OHCI
> E: ID_PCI_SUBCLASS_FROM_DATABASE=FireWire (IEEE 1394)
> E: ID_SERIAL=0x00130e0100030cdd
> E: ID_SERIAL_SHORT=0x00130e0100030cdd
> E: ID_VENDOR=Focusrite
> E: ID_VENDOR_FROM_DATABASE=Texas Instruments
> E: ID_VENDOR_ID=0x00130e
> E: SOUND_INITIALIZED=1
> E: SUBSYSTEM=sound
> E: SYSTEMD_WANTS=sound.target
> E: TAGS=:systemd:seat:
> E: USEC_INITIALIZED=1071026684
> 
> Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
> ---
>  .../alsa/mixer/profile-sets/90-pulseaudio.rules        | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/src/modules/alsa/mixer/profile-sets/90-pulseaudio.rules b/src/modules/alsa/mixer/profile-sets/90-pulseaudio.rules
> index ceb61d9e5..19b826b52 100644
> --- a/src/modules/alsa/mixer/profile-sets/90-pulseaudio.rules
> +++ b/src/modules/alsa/mixer/profile-sets/90-pulseaudio.rules
> @@ -19,6 +19,7 @@ SUBSYSTEM!="sound", GOTO="pulseaudio_end"
>  ACTION!="change", GOTO="pulseaudio_end"
>  KERNEL!="card*", GOTO="pulseaudio_end"
>  SUBSYSTEMS=="usb", GOTO="pulseaudio_check_usb"
> +SUBSYSTEMS=="firewire", GOTO="pulseaudio_firewire_quirk"
>  
>  SUBSYSTEMS=="platform", DRIVERS=="thinkpad_acpi", ENV{PULSE_IGNORE}="1"
>  
> @@ -109,4 +110,13 @@ ATTRS{idVendor}=="1038", ATTRS{idProduct}=="1250", ENV{PULSE_PROFILE_SET}="steel
>  ATTRS{idVendor}=="1038", ATTRS{idProduct}=="1260", ENV{PULSE_PROFILE_SET}="steelseries-arctis-7-usb-audio.conf"
>  ATTRS{idVendor}=="147a", ATTRS{idProduct}=="e055", ENV{PULSE_PROFILE_SET}="cmedia-high-speed-true-hdaudio.conf"
>  
> +GOTO="pulseaudio_end"
> +
> +LABEL="pulseaudio_firewire_quirk"
> +
> +# Focusrite Saffire Pro 10/26 i/o has a quirk to disappear from IEEE 1394 bus when losing connections.
> +# https://bugzilla.kernel.org/show_bug.cgi?id=199365
> +ENV{ID_VENDOR_ID}=="0x00130e", ENV{ID_MODEL_ID}=="0x000003", ENV{PULSE_IGNORE}="1"
> +ENV{ID_VENDOR_ID}=="0x00130e", ENV{ID_MODEL_ID}=="0x000006", ENV{PULSE_IGNORE}="1"
> +
>  LABEL="pulseaudio_end"

Thanks! Applied.

-- 
Tanu

https://www.patreon.com/tanuk
https://liberapay.com/tanuk
_______________________________________________
pulseaudio-discuss mailing list
pulseaudio-discuss@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss

      reply	other threads:[~2018-08-11 10:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-15 10:57 [PATCH] Suppress udev detection of sound card for some units on IEEE 1394 bus Takashi Sakamoto
2018-08-11 10:12 ` Tanu Kaskinen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d451629cf26ca5abfec14b96c8791019f3b45d15.camel@iki.fi \
    --to=tanuk@iki.fi \
    --cc=alsa-devel@alsa-project.org \
    --cc=ffado-devel@lists.sourceforge.net \
    --cc=pulseaudio-discuss@lists.freedesktop.org \
    --cc=ramon.fried@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).