Opened 18 years ago

Closed 18 years ago

#1217 closed defect (fixed)

Failure to find ALSA volume control is considered fatal

Reported by: mythtv@… Owned by: danielk
Priority: minor Milestone: 0.20
Component: mythtv Version: head
Severity: medium Keywords: ALSA Audio
Cc: Ticket locked: no

Description

The attached patch resolves some issue that I encountered attempting to configure my system to use an ALSA audio output device.

  • Bug fix: If certain volume controls are not present for a given card (i.e. "Master" and "PCM") then the audio device was disabled. This patch simply prints a debug message indicating that the controls could not be found.
  • Code tidy: Removed the "elem" and "sid" member variables from the class. These variables were only valid within certain functions of the class and therefore it is risky to offer them to all functions (the "sid" member in particular was initialised to point to a stack location of a calling function).
  • Enhancement: I have an M-Audio Revolution 7.1 soundcard, which uses an Envy24HT chipset and that exposes it's volume controls as a number of mono "DAC" controls, as opposed to a single multi-channel control. The existing code only supported controlling the volume for a multi-channel control, so I have added code that looks for multiple mono controls if the first control found does not support the channel being configured.

Attachments (2)

alsa.patch (4.0 KB) - added by mythtv@… 18 years ago.
1217-v1.patch (9.1 KB) - added by danielk 18 years ago.
fixes some problems with original patch

Download all attachments as: .zip

Change History (6)

Changed 18 years ago by mythtv@…

Attachment: alsa.patch added

comment:1 Changed 18 years ago by danielk

Owner: changed from Isaac Richards to danielk

Changed 18 years ago by danielk

Attachment: 1217-v1.patch added

fixes some problems with original patch

comment:2 Changed 18 years ago by danielk

Milestone: 0.20

There is too much potential for this to break things for it to make it into 0.19, and the problem of no audio can easily be addressed by disabling internal volume control.

The patch also didn't fully address problem #1, though I believe that is fixed in '1217-v1.patch', please test that patch. Also, it might be nice if you popped up an OSD telling the user that their mixer settings are broken, so they aren't confused when the volume control does not work.

comment:3 Changed 18 years ago by mythtv@…

Your version of the patch works just as mine.

I have no idea as to how to pop up an OSD, but I'll look into it when I get a chance.

comment:4 Changed 18 years ago by danielk

Resolution: fixed
Status: newclosed

(In [8929]) Fixes #1217, by applying patch from mythtv AT dadeos.freeserve dot co.uk

  • Makes failure to initialize the mixer a non-fatal error for ALSA audio out.
  • Catches a few more failure cases
  • Allows a card without MASTER/PCM to work (M-Audio Revolution 7.1).

This has been ready for over a week, I was just waiting for the release in case this breaks anything.

Note: See TracTickets for help on using tickets.