Skip to contentSkip to conversation

2.4.0-test11: es1371 mixer problems

DISCUSSION Dick Streefland 4 participants 6 messages Nov 24, 2000 – Nov 30, 2000

lore
Share & tools
lore
#0 lore raw

2.4.0-test11 introduced a problem with the mixer device of my SB128 soundcard (es1371 driver). When I start a mixer application like xmixer or aumix, only a small subset of the mixer devices are available. With 2.4.0-test10, using the same .config, all devices are available.

I've looked through the test11 patch and noticed that it contains a lot of changes like:

_IOC_DIR --> _SIOC_DIR
_IOC_READ --> _SIOC_READ
_IOC_WRITE --> _SIOC_WRITE
_IOC_SIZE --> _SIOC_SIZE

These changes are not yet applied to ac97.c and ac97_codec.c, but that does not seem to be the problem, because after making these changes (see patch below), the problem persists.

Signature · 60 lines
Dick Streefland                      ////            TASKING Software BV
[email protected]         (@ @)         http://www.tasking.com
--------------------------------oOO--(_)--OOo---------------------------

--- linux-2.4.0-test11/drivers/sound/ac97.c.orig	Fri Jan  7 00:01:56 2000
+++ linux-2.4.0-test11/drivers/sound/ac97.c	Thu Nov 23 00:02:31 2000
@@ -407,19 +407,19 @@
 	/* Read or write request. */
 	ret = -EINVAL;
 	if (_IOC_TYPE (cmd) == 'M') {
-	    int dir = _IOC_DIR (cmd);
+	    int dir = _SIOC_DIR (cmd);
 	    int channel = _IOC_NR (cmd);
 
 	    if (channel >= 0 && channel < SOUND_MIXER_NRDEVICES) {
 		ret = 0;
-		if (dir & _IOC_WRITE) {
+		if (dir & _SIOC_WRITE) {
 		    int val;
 		    if (get_user (val, (int *) arg) == 0)
 			ret = ac97_set_mixer (dev, channel, val);
 		    else
 			ret = -EFAULT;
 		}
-		if (ret >= 0 && (dir & _IOC_READ)) {
+		if (ret >= 0 && (dir & _SIOC_READ)) {
 		    if (dev->last_written_OSS_values[channel]
 			== AC97_REGVAL_UNKNOWN)
 			dev->last_written_OSS_values[channel]
--- linux-2.4.0-test11/drivers/sound/ac97_codec.c.orig	Tue Nov 21 21:41:02 2000
+++ linux-2.4.0-test11/drivers/sound/ac97_codec.c	Thu Nov 23 00:02:45 2000
@@ -405,13 +405,13 @@
 		return 0;
 	}
 
-	if (_IOC_TYPE(cmd) != 'M' || _IOC_SIZE(cmd) != sizeof(int))
+	if (_IOC_TYPE(cmd) != 'M' || _SIOC_SIZE(cmd) != sizeof(int))
 		return -EINVAL;
 
 	if (cmd == OSS_GETVERSION)
 		return put_user(SOUND_VERSION, (int *)arg);
 
-	if (_IOC_DIR(cmd) == _IOC_READ) {
+	if (_SIOC_DIR(cmd) == _SIOC_READ) {
 		switch (_IOC_NR(cmd)) {
 		case SOUND_MIXER_RECSRC: /* give them the current record source */
 			if (!codec->recmask_io) {
@@ -451,7 +451,7 @@
 		return put_user(val, (int *)arg);
 	}
 
-	if (_IOC_DIR(cmd) == (_IOC_WRITE|_IOC_READ)) {
+	if (_SIOC_DIR(cmd) == (_SIOC_WRITE|_SIOC_READ)) {
 		codec->modcnt++;
 		if (get_user(val, (int *)arg))
 			return -EFAULT;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/
#1 lore raw

Dick Streefland <[email protected]> wrote:

| 2.4.0-test11 introduced a problem with the mixer device of my SB128
| soundcard (es1371 driver). When I start a mixer application like
| xmixer or aumix, only a small subset of the mixer devices are available.
| With 2.4.0-test10, using the same .config, all devices are available.

This is a followup to my own message to report that the mixer is working again after I disabled the CONFIG_SOUND_TVMIXER option. I don't know what exactly this option does (no help text), but since I have a Hauppauge (BT878) TV-card, I did enable this option. In test11, drivers/media/video/tvmixer.c was modified so that it now looks for tvmixer devices, and it actually finds one:

tvmixer: debug: MSP3415D-A2
tvmixer: MSP3415D-A2 (bt848 #0) registered with minor 0
tvmixer: debug: (unset)

This mixer probably replaces the normal AC97 mixer device. So, in what situations do you need CONFIG_SOUND_TVMIXER? It would be nice if someone could come up with an entry for Documentation/Configure.help.

Signature · 7 lines
Dick Streefland                      ////            TASKING Software BV
[email protected]         (@ @)         http://www.tasking.com
--------------------------------oOO--(_)--OOo---------------------------
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/
#2 lore raw
In reply to Dick Streefland

On Thursday 2000-11-30 18:24, Robert Schiele wrote:

| On Thu, Nov 30, 2000 at 01:47:25PM +0100, Dick Streefland wrote:
| > This mixer probably replaces the normal AC97 mixer device. So, in
| > what situations do you need CONFIG_SOUND_TVMIXER? It would be nice if
| > someone could come up with an entry for Documentation/Configure.help.
| 
| In fact it does not 'replace' the other mixer device, but it adds
| another one. The problem on your system is, that you load the new
| module before your sound card module.
| This means with only your sound card module, the mixer for your sound
| card is major 14/minor 0. With tvmixer module loaded before your sound
| card module, major 14/minor 0 is assigned to tvmixer and your sound
| card mixer gets major 14/minor 16. This is a problem for some mixer
| applications, because they always control the first mixer device.
| So you should just make sure, your sound card module is loaded
| _before_ the tvmixer module.

OK, that makes it somewhat clearer to me. However, I don't use modules and have everything compiled in, so I can't control the order in which the mixer devices get loaded. Perhaps the initialization order in the kernel should be changed?

Excuse my ignorance, but what exactly is the purpose of the tvmixer? I'm currently controlling the TV audio volume with the ac97 mixer, using an external cable between the TV card and sound card.

Signature · 7 lines
Dick Streefland                      ////            TASKING Software BV
[email protected]         (@ @)         http://www.tasking.com
--------------------------------oOO--(_)--OOo---------------------------
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/
#3 lore raw
Quoted 3 lines

OK, that makes it somewhat clearer to me. However, I don't use modules and have everything compiled in, so I can't control the order in which the mixer devices get loaded.

Exactly that's why I compile nearly everything as modules :-) The other reason is that the turn-around times for driver hacking are *much* smaller (until you managed to code a bug which kills your box...).

Quoted 2 lines

Perhaps the initialization order in the
kernel should be changed?

Just because you don't like it? No. Get real. Most newer gui mixer's I've seen allow you to switch between mixer devices with tab's. Even the other ones allow you to specify the device you want to use. And if you will never ever use tvmixer just disable it.

Quoted 1 line

Excuse my ignorance, but what exactly is the purpose of the tvmixer?

Control volume/bass/treble of the TV card (assuming the hardware allows this, doesn't work with all cards).

Quoted 2 lines

I'm currently controlling the TV audio volume with the ac97 mixer, using an external cable between the TV card and sound card.

That's why most people don't need it. If you would have connected your speakers directly to the TV card without the soundcard (+ assorted mixer) inbetween you would probably love tvmixer...

Gerd

Signature · 7 lines
Wirtschaftsinformatiker == Leute, die zwar die aktuellen Aktienkurse
jedes Softwareherstellers kennen, aber keines der Produkte auch nur
ansatzweise bedienen können.		-- Benedict Mangelsdorff
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/
#4 lore raw
In reply to Dick Streefland
Quoted 13 lines · Dick Streefland

Dick Streefland <[email protected]> wrote:

| 2.4.0-test11 introduced a problem with the mixer device of my SB128
| soundcard (es1371 driver). When I start a mixer application like
| xmixer or aumix, only a small subset of the mixer devices are available.
| With 2.4.0-test10, using the same .config, all devices are available.

This is a followup to my own message to report that the mixer is working again after I disabled the CONFIG_SOUND_TVMIXER option. I don't know what exactly this option does (no help text), but since I have a Hauppauge (BT878) TV-card, I did enable this option. In test11, drivers/media/video/tvmixer.c was modified so that it now looks for tvmixer devices, and it actually finds one:

Quoted 7 lines

tvmixer: debug: MSP3415D-A2
tvmixer: MSP3415D-A2 (bt848 #0) registered with minor 0
tvmixer: debug: (unset)

This mixer probably replaces the normal AC97 mixer device. So, in what situations do you need CONFIG_SOUND_TVMIXER? It would be nice if someone could come up with an entry for Documentation/Configure.help.

In fact it does not 'replace' the other mixer device, but it adds another one. The problem on your system is, that you load the new module before your sound card module.
This means with only your sound card module, the mixer for your sound card is major 14/minor 0. With tvmixer module loaded before your sound card module, major 14/minor 0 is assigned to tvmixer and your sound card mixer gets major 14/minor 16. This is a problem for some mixer applications, because they always control the first mixer device. So you should just make sure, your sound card module is loaded _before_ the tvmixer module.

Robert

Signature · 2 lines
Robert Schiele			mailto:[email protected]
Tel./Fax: +49-621-10059		http://webrum.uni-mannheim.de/math/rschiele/
#5 lore raw
In reply to Dick Streefland
Quoted 17 lines · Dick Streefland

On Thursday 2000-11-30 18:24, Robert Schiele wrote:

| On Thu, Nov 30, 2000 at 01:47:25PM +0100, Dick Streefland wrote:
| > This mixer probably replaces the normal AC97 mixer device. So, in
| > what situations do you need CONFIG_SOUND_TVMIXER? It would be nice if
| > someone could come up with an entry for Documentation/Configure.help.
| 
| In fact it does not 'replace' the other mixer device, but it adds
| another one. The problem on your system is, that you load the new
| module before your sound card module.
| This means with only your sound card module, the mixer for your sound
| card is major 14/minor 0. With tvmixer module loaded before your sound
| card module, major 14/minor 0 is assigned to tvmixer and your sound
| card mixer gets major 14/minor 16. This is a problem for some mixer
| applications, because they always control the first mixer device.
| So you should just make sure, your sound card module is loaded
| _before_ the tvmixer module.
Quoted 4 lines

OK, that makes it somewhat clearer to me. However, I don't use modules and have everything compiled in, so I can't control the order in which the mixer devices get loaded. Perhaps the initialization order in the kernel should be changed?

Ditto this problem with via82c686a audio - likely all sound cards with tvmixer linked in.

If initialization order in the kernel is not changed and you don't want modules, you can swap /dev/mixer0 and /dev/mixer1 as an inelegant workaround.

Quoted 3 lines

Excuse my ignorance, but what exactly is the purpose of the tvmixer? I'm currently controlling the TV audio volume with the ac97 mixer, using an external cable between the TV card and sound card.

There exists a mixer for the pass-through on the WinTV bt848 cards at least, as well as treble/bass control. Many stations broadcast with obscene amounts of bass, and so access to this is nice as you don't have to spoil your main EQ.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/