Bug 164101 - not able to select working mixer with alsa output plugin; fix included in description.
not able to select working mixer with alsa output plugin; fix included in des...
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: xmms (Show other bugs)
rawhide
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: John (J5) Palmieri
: Patch
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-07-24 19:06 EDT by Suhan Andrei
Modified: 2013-03-13 00:48 EDT (History)
2 users (show)

See Also:
Fixed In Version: 4
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-11-27 02:01:46 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Suhan Andrei 2005-07-24 19:06:28 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.10) Gecko/20050720 Fedora/1.0.6-1.1.fc3 Firefox/1.0.6

Description of problem:

Point is that some cards( noticed on :see below lspci output) in alsa may have only index not null for a certain device name.
(actually think at index zero is a device that is not simple see also libasound->snd_mixer_find_selem in mixer/simple.c)

Fix is to add also index in combo of mixer names.

Including device index into the combo strings make it posible to select any mixer device. Otherwise plugin will always select a device with index zero as one can see in parse_mixer_name() from Output/alsa/audio.c

------Output/alsa/configure.c --------
static int get_mixer_devices(GtkCombo *combo, int card)
{	
	GList *items = NULL;
	int err = 0;
	snd_mixer_t *mixer;
	snd_mixer_elem_t *current;

	if ((err = alsa_get_mixer(&mixer, card)) < 0)
		return err;
		
	current = snd_mixer_first_elem(mixer);
	
	while (current)
	{
	  static char mixer_name[512]={0};

		const char *sname = snd_mixer_selem_get_name(current);
		if (snd_mixer_selem_is_active(current) &&
		    snd_mixer_selem_has_playback_volume(current))
		  {
		    /*must add also the index in name*/
		    int index = snd_mixer_selem_get_index(current);
		    snprintf(mixer_name, 511, "%s,%d", sname, index);

			items = g_list_append(items, g_strdup(mixer_name));
		  }
		current = snd_mixer_elem_next(current);		
	}
	
	gtk_combo_set_popdown_strings(combo, items);

	return 0;
}


------------ lspci output -----------------
06:02.0 Multimedia audio controller: Cirrus Logic CS 4614/22/24 [CrystalClear SoundFusion Audio Accelerator] (rev01)
        Subsystem: Hercules Fortissimo III 7.1
        Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B-
        Status: Cap+ 66Mhz- UDF- FastB2B- ParErr- DEVSEL=slow >TAbort- <TAbort- <MAbort- >SERR- <PERR-
        Latency: 32 (1000ns min, 6000ns max)
        Interrupt: pin A routed to IRQ 18
        Region 0: Memory at ff9ff000 (32-bit, non-prefetchable) [size=4K]
        Region 1: Memory at ff800000 (32-bit, non-prefetchable) [size=1M]
        Capabilities: [40] Power Management version 2
                Flags: PMEClk- DSI+ D1+ D2+ AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
                Status: D0 PME-Enable- DSel=0 DScale=0 PME-



Version-Release number of selected component (if applicable):
xmms-1.2.10-9, alsa-lib-1.0.9rc4, kernel-2.6.11

How reproducible:
Always

Steps to Reproduce:
NA as fix included in description
  

Actual Results:  NA as fix included in description

Expected Results:  NA as fix included in description

Additional info:
Comment 1 Marius Andreiana 2005-11-02 06:09:38 EST
Salut Andrei, please try FC4+extras, does it work now?
Comment 2 Suhan Andrei 2005-11-26 19:21:47 EST
Salut Marius, FC4+extras = OK ! Thanks.
Comment 3 Marius Andreiana 2005-11-27 02:01:46 EST
Closing bug as it works now. Bafta!

Note You need to log in before you can comment on or make changes to this bug.