Ticket #544 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

module-hal-detect detects first device only

Reported by: cmt Owned by: lennart
Milestone: 0.9.16 Component: module-hal-detect
Keywords: FreeBSD module-hal-detect Cc:

Description

On recent FreeBSDs (7.2-RC) multi-output/codec chips like HDA capable devices show up as multiple /dev/dsp* devices and likewise as multiple devices in lshal (see attachment). module-hal-detect in pulseaudio 0.9.14 (FreeBSD ports) and 0.9.15 use the first device (index 0) very deliberately, judging from the comment in 0.9.15. On systems like mine where the main output is driven via a device different than dsp0 (dsp1 here) the "right" output device never shows up as a sink. Changing a single line of code in module-hal-detect remedies this, but obviously there was some reason in not using any device beyond index 0, so there must be a better solution than the attaced patch.

Attachments

lshal_devices (5.2 kB) - added by cmt 3 years ago.
output of lshal stripped to the relevant devices
patch-src_modules_module-hal-detect.c (493 bytes) - added by cmt 3 years ago.
patch to module-hal-detect.c which fixes the issue on my system
patch-src_modules_module-hal-detect.2.c (2.4 kB) - added by cmt 3 years ago.
adds option "subdevs" when compiled HAVE_OSS

Change History

Changed 3 years ago by cmt

output of lshal stripped to the relevant devices

Changed 3 years ago by cmt

patch to module-hal-detect.c which fixes the issue on my system

Changed 3 years ago by lennart

I doubt it makes sense to merge this patch: do we really want to initialize all subdevices of a device unconditioanlly? We certainly don't want that on ALSA, so doubt we want that on OSS either.

Changed 3 years ago by cmt

Perhaps it makes sense to add an option for initializing all subdevices or even specifying which subdevice to use. I have no idea how much flexibility and how much semi-intelligent heuristic is needed here, as I'm using pulseaudio in the simplest way possible...

Changed 3 years ago by lennart

Sounds reasonable. Would be happy to take a patch for that.

Changed 3 years ago by cmt

adds option "subdevs" when compiled HAVE_OSS

Changed 3 years ago by cmt

patch-src_modules_module-hal-detect.2.c (against 0.9.15) should do the job (tested only 0.9.14 backport, as I'm having libtool fun with 0.9.15 but no time to investigate...) Gruß aus Karlsruhe.

Changed 3 years ago by lennart

  • status changed from new to closed
  • resolution set to fixed
  • milestone set to 0.9.16

Fixed in r0113e72.

Thanks for the patch!

Note: See TracTickets for help on using tickets.