Remove psuedo master from pci/hda/analog_patch.c . It does not function well!
PATCH 1/1 Remove psuedo master from pci/hda/analog_patch.c . It does not function well!
Hi I noticed after installing 1.0.16rc-1 today that my Thinkpad T61 with AD1984 had a Master mixer now. Problem is it's not very good in that it
1) does not follow with PCM (the real master) volume well. It causes a volume disparity and does not
follow or even boost PCM signal. So it just a bad mister.
2) it does not mute the volume (since PCM is the real master mixer you have to go to PCM to mute the volume!)
I have fixed a problem in Gstreamer so that Gnome (gnome volume mixer) does finally work correctly for the AD1984 which does not have a Master. When it looks for a master mixer it now will fallback to PCM as a master mixer (the code is upsteam too). You can find this here:
http://bugzilla.gnome.org/show_bug.cgi?id=506928
I have a feeling this is why this patch was put in. I have fixed the problem in Gnome, KDE has allways worked. just fine.
But I would honestly love it if this code was removed!!! If you need a Master can you rename PCM to master for the AD1984! I have attached a patch to remove this code .. because it is so does not function well!
alsa-kernel/pci/hda/patch_analog.c +0 -20
@@ -170,26 +170,6 @@ static int ad198x_build_controls(struct }if (spec->dig_in_nid) { err =snd_hda_create_spdif_in_ctls (codec, spec->dig_in_nid); -if (err <0 ) -return err; - } - -/* if we have no master control, let's create it */ -if (!snd_hda_find_mixer_ctl (codec,"Master Playback Volume" )) { -snd_hda_set_vmaster_tlv (codec, spec->vmaster_nid, -HDA_OUTPUT , spec->vmaster_tlv); - err =snd_hda_add_vmaster (codec,"Master Playback Volume" , - spec->vmaster_tlv, - (spec->slave_vols ? - spec->slave_vols : ad_slave_vols)); -if (err <0 ) -return err; - } -if (!snd_hda_find_mixer_ctl (codec,"Master Playback Switch" )) { - err =snd_hda_add_vmaster (codec,"Master Playback Switch" , -NULL , - (spec->slave_sws ? - spec->slave_sws : ad_slave_sws));if (err <0 )return err; }
alsa-kernel/pci/hda/patch_analog.c +0 -20
@@ -170,26 +170,6 @@ static int ad198x_build_controls(struct }if (spec->dig_in_nid) { err =snd_hda_create_spdif_in_ctls (codec, spec->dig_in_nid); -if (err <0 ) -return err; - } - -/* if we have no master control, let's create it */ -if (!snd_hda_find_mixer_ctl (codec,"Master Playback Volume" )) { -snd_hda_set_vmaster_tlv (codec, spec->vmaster_nid, -HDA_OUTPUT , spec->vmaster_tlv); - err =snd_hda_add_vmaster (codec,"Master Playback Volume" , - spec->vmaster_tlv, - (spec->slave_vols ? - spec->slave_vols : ad_slave_vols)); -if (err <0 ) -return err; - } -if (!snd_hda_find_mixer_ctl (codec,"Master Playback Switch" )) { - err =snd_hda_add_vmaster (codec,"Master Playback Switch" , -NULL , - (spec->slave_sws ? - spec->slave_sws : ad_slave_sws));if (err <0 )return err; }
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
At Fri, 25 Jan 2008 01:11:38 -0600,
Quoted 7 lines · Jerone Young
Hi I noticed after installing 1.0.16rc-1 today that my Thinkpad T61 with AD1984 had a Master mixer now. Problem is it's not very good in that it
1) does not follow with PCM (the real master) volume well. It causes a volume disparity and does not
follow or even boost PCM signal. So it just a bad mister.
Hm, the PCM volume should follow the master even in the current code. Doesn't the output volume change if you change the master volume (not mute)?
Please check the AMP out value of the NID 0x04 in /proc/asound/card0/codec#*. This corresponds to the PCM volume. Compare the values between master=100% and master=50%.
Quoted 2 lines
2) it does not mute the volume (since PCM is the real master mixer you have to go to PCM to mute the volume!)
There is no PCM "switch" to mute.
It's a known problem and the patch below should fix.
Quoted 5 lines
I have fixed a problem in Gstreamer so that Gnome (gnome volume mixer) does finally work correctly for the AD1984 which does not have a Master. When it looks for a master mixer it now will fallback to PCM as a master mixer (the code is upsteam too). You can find this here:
Quoted 7 lines
http://bugzilla.gnome.org/show_bug.cgi?id=506928
I have a feeling this is why this patch was put in. I have fixed the problem in Gnome, KDE has allways worked. just fine.
But I would honestly love it if this code was removed!!! If you need a Master can you rename PCM to master for the AD1984!
PCM volume is no real master, unfortunately. The analog loopbacks can be played regardless of PCM volume. That's why it wasn't named as master at the first place.
Quoted 2 lines
I have attached a
patch to remove this code .. because it is so does not function well!
(Can you stop! writing!! with!!! too much exclamation marks please?)
It's nothing but a bug that I overlooked.
Let's fix this more reasonablly.
thanks,
Takashi
---
pci/hda/patch_analog.c +2 -0
@@ -138,6 +138,7 @@ static const char *ad_slave_vols[] = {"Side Playback Volume" ,"Headphone Playback Volume" ,"Mono Playback Volume" , +"Speaker Playback Volume" , NULL };
@@ -149,6 +150,7 @@ static const char *ad_slave_sws[] = {"Side Playback Switch" ,"Headphone Playback Switch" ,"Mono Playback Switch" , +"Speaker Playback Switch" , NULL };
Ok less explication this time ;-) .. it was a late night. I have found something interesting though.
I took some time and actually evaluated the behavior of the Windows Vista Driver by Analog Devices was done for the AD1984. They do not have a PCM mixer, instead each indivdual application has there own mixer (this is a windows feature), and when you manipulate the individual mixer it manipulates the audio of that application. But there is not a PCM mixer for all apps. Just a Master. Also they have IEC958 (SDPIF) seen as a second sound device. It appears that they made what we call PCM the Master.
Now looking at our driver, it appears we should be doing the same. I actually have a good example why. If I am running playback through IEC958 (SDPIF) and I do anything to the PCM mixer it has no effect on PCM audio coming from applications that are running through IEC958. Only when I go to the application (assuming the application has it's own mixer code .. we will say VLC is a good example), does the actual PCM for that application get effected. So if I mute the PCM mixer, PCM audio runs over IEC958 without being muted, it only mutes it for speaker and the headphones.
What I see here is what we label as PCM is actually just the Master volume for Speaker & Headphones. But does not actually manipulate the PCM audio.
So really PCM really should be made Master Playback as it really does not manipulate PCM audio but just the how it is played back through Speaker & Headphones.
Quoted 75 lines · Takashi Iwai
At Fri, 25 Jan 2008 01:11:38 -0600,
Quoted 7 lines · Jerone Young
Hi I noticed after installing 1.0.16rc-1 today that my Thinkpad T61 with AD1984 had a Master mixer now. Problem is it's not very good in that it
1) does not follow with PCM (the real master) volume well. It causes a volume disparity and does not
follow or even boost PCM signal. So it just a bad mister.Hm, the PCM volume should follow the master even in the current code. Doesn't the output volume change if you change the master volume (not mute)?
Please check the AMP out value of the NID0x04in /proc/asound/card0/codec#*. This corresponds to the PCM volume. Compare the values between master=100% and master=50%.Quoted 2 lines
2) it does not mute the volume (since PCM is the real master mixer you have to go to PCM to mute the volume!)
There is no PCM "switch" to mute.
It's a known problem and the patch below should fix.Quoted 5 lines
I have fixed a problem in Gstreamer so that Gnome (gnome volume mixer) does finally work correctly for the AD1984 which does not have a Master. When it looks for a master mixer it now will fallback to PCM as a master mixer (the code is upsteam too). You can find this here:
Quoted 7 lines
http://bugzilla.gnome.org/show_bug.cgi?id=506928
I have a feeling this is why this patch was put in. I have fixed the problem in Gnome, KDE has allways worked. just fine.
But I would honestly love it if this code was removed!!! If you need a Master can you rename PCM to master for the AD1984!
PCM volume is no real master, unfortunately. The analog loopbacks can be played regardless of PCM volume. That's why it wasn't named as master at the first place.
Quoted 2 lines
I have attached a
patch to remove this code .. because it is so does not function well!(Can you stop! writing!! with!!! too much exclamation marks please?)
It's nothing but a bug that I overlooked.
Let's fix this more reasonablly.thanks,
Takashi
---
diff -r
303f894ac2a8pci/hda/patch_analog.cpci/hda/patch_analog.c Fri Jan 25 08:42:21 2008 +0100 renamed from pci/hda/patch_analog.c Thu Jan 24 18:46:42 2008 +0100 +2
-0@@ -138,6 +138,7 @@ static const char *ad_slave_vols[] = { "Side Playback Volume", "Headphone Playback Volume", "Mono Playback Volume", + "Speaker Playback Volume", NULL };@@ -149,6 +150,7 @@ static const char *ad_slave_sws[] = { "Side Playback Switch", "Headphone Playback Switch", "Mono Playback Switch", + "Speaker Playback Switch", NULL };
At Fri, 25 Jan 2008 07:41:48 -0600,
Quoted 3 lines · Jerone Young
Ok less explication this time ;-) .. it was a late night. I have found something interesting though.
Thanks ;)
Quoted 8 lines
I took some time and actually evaluated the behavior of the Windows Vista Driver by Analog Devices was done for the AD1984. They do not have a PCM mixer, instead each indivdual application has there own mixer (this is a windows feature), and when you manipulate the individual mixer it manipulates the audio of that application. But there is not a PCM mixer for all apps. Just a Master. Also they have IEC958 (SDPIF) seen as a second sound device. It appears that they made what we call PCM the Master.
Maybe Windows driver doesn't use the analog loopback feature inside the codec, but does everything on software.
Quoted 9 lines
Now looking at our driver, it appears we should be doing the same. I actually have a good example why. If I am running playback through IEC958 (SDPIF) and I do anything to the PCM mixer it has no effect on PCM audio coming from applications that are running through IEC958. Only when I go to the application (assuming the application has it's own mixer code .. we will say VLC is a good example), does the actual PCM for that application get effected. So if I mute the PCM mixer, PCM audio runs over IEC958 without being muted, it only mutes it for speaker and the headphones.
OK now I see the problem. IEC958 isn't assigned to the master volume/switch list indeed.
Quoted 3 lines
What I see here is what we label as PCM is actually just the Master volume for Speaker & Headphones. But does not actually manipulate the PCM audio.
Correct. It's because the SPDIF has an individual (a sort of) DAC. So, we need to adjust this as well.
Quoted 3 lines
So really PCM really should be made Master Playback as it really does not manipulate PCM audio but just the how it is played back through Speaker & Headphones.
A fix is easy, but this might cause another problem when a non-audio signal is sent.
Could you try the patch below with the latest HG tree? (Or, you can apply this after my previous patch to 1.0.16-rc1.)
If the SPDIF volume/switch are changed together with the master successfully, then please test AC3 or DTS output if possible. I'd like to know whether it breaks now.
If it still works, I'll happily apply the patch to the upstream tree.
Thanks,
Takashi
---
pci/hda/patch_analog.c +3 -0
@@ -139,6 +139,7 @@ static const char *ad_slave_vols[] = {"Headphone Playback Volume" ,"Mono Playback Volume" ,"Speaker Playback Volume" , +"IEC958 Playback Volume" , NULL };
@@ -151,6 +152,7 @@ static const char *ad_slave_sws[] = {"Headphone Playback Switch" ,"Mono Playback Switch" ,"Speaker Playback Switch" , +"IEC958 Playback Volume" , NULL };
@@ -3078,6 +3080,7 @@ static const char *ad1884_slave_vols[] ="Internal Mic Playback Volume" ,"Docking Mic Playback Volume" "Beep Playback Volume" , +"IEC958 Playback Volume" , NULL };
I tested both patches. They work and master volume works for both Speakers & IEC958. It can controll up and down volume.
Speakers now mute.
One issue though when you mute the Master it does not mute IEC958. It will mute the speakers but not the IEC958 PCM stream. I am not sure if this desired behavior?
Oh also AC3 passthrough still works fine (you really can't manipulate this audio). I streamed some Doubly 5.1 streams over and they worked fine.
Besides that one issue you should put those 2 patches upstream.
Quoted 89 lines · Takashi Iwai
At Fri, 25 Jan 2008 07:41:48 -0600,
Quoted 3 lines · Jerone Young
Ok less explication this time ;-) .. it was a late night. I have found something interesting though.
Thanks ;)
Quoted 8 lines
I took some time and actually evaluated the behavior of the Windows Vista Driver by Analog Devices was done for the AD1984. They do not have a PCM mixer, instead each indivdual application has there own mixer (this is a windows feature), and when you manipulate the individual mixer it manipulates the audio of that application. But there is not a PCM mixer for all apps. Just a Master. Also they have IEC958 (SDPIF) seen as a second sound device. It appears that they made what we call PCM the Master.
Maybe Windows driver doesn't use the analog loopback feature inside the codec, but does everything on software.
Quoted 9 lines
Now looking at our driver, it appears we should be doing the same. I actually have a good example why. If I am running playback through IEC958 (SDPIF) and I do anything to the PCM mixer it has no effect on PCM audio coming from applications that are running through IEC958. Only when I go to the application (assuming the application has it's own mixer code .. we will say VLC is a good example), does the actual PCM for that application get effected. So if I mute the PCM mixer, PCM audio runs over IEC958 without being muted, it only mutes it for speaker and the headphones.
OK now I see the problem. IEC958 isn't assigned to the master volume/switch list indeed.
Quoted 3 lines
What I see here is what we label as PCM is actually just the Master volume for Speaker & Headphones. But does not actually manipulate the PCM audio.
Correct. It's because the SPDIF has an individual (a sort of) DAC. So, we need to adjust this as well.
Quoted 3 lines
So really PCM really should be made Master Playback as it really does not manipulate PCM audio but just the how it is played back through Speaker & Headphones.
A fix is easy, but this might cause another problem when a non-audio signal is sent.
Could you try the patch below with the latest HG tree? (Or, you can apply this after my previous patch to 1.0.16-rc1.)
If the SPDIF volume/switch are changed together with the master successfully, then please test AC3 or DTS output if possible. I'd like to know whether it breaks now.
If it still works, I'll happily apply the patch to the upstream tree.Thanks,
Takashi
---
diff -r
19029da61288pci/hda/patch_analog.cpci/hda/patch_analog.c Fri Jan 25 15:04:01 2008 +0100 renamed from pci/hda/patch_analog.c Fri Jan 25 11:56:57 2008 +0100 +3
-0@@ -139,6 +139,7 @@ static const char *ad_slave_vols[] = { "Headphone Playback Volume", "Mono Playback Volume", "Speaker Playback Volume", + "IEC958 Playback Volume", NULL };@@ -151,6 +152,7 @@ static const char *ad_slave_sws[] = { "Headphone Playback Switch", "Mono Playback Switch", "Speaker Playback Switch", + "IEC958 Playback Volume", NULL };@@ -3078,6 +3080,7 @@ static const char *ad1884_slave_vols[] = "Internal Mic Playback Volume", "Docking Mic Playback Volume" "Beep Playback Volume", + "IEC958 Playback Volume", NULL };
At Fri, 25 Jan 2008 08:37:35 -0600,
Quoted 9 lines · Jerone Young
I tested both patches. They work and master volume works for both Speakers & IEC958. It can controll up and down volume.
Speakers now mute.
One issue though when you mute the Master it does not mute IEC958. It will mute the speakers but not the IEC958 PCM stream. I am not sure if this desired behavior?
No, it should be also controlled by the master switch.
Could you check the below
% amixer cget name="IEC958 Playback Switch"
whether this element exists. Then,
% amixer cset name="IEC958 Playback Switch" off
to turn the SPDIF off.
Quoted 3 lines
Oh also AC3 passthrough still works fine (you really can't manipulate this audio). I streamed some Doubly 5.1 streams over and they worked fine.
That's great. Then the things become really eaiser :)
Quoted 1 line
Besides that one issue you should put those 2 patches upstream.
The first patch is already on HG tree. The second patch will be pushed soon.
thanks,
Takashi
Quoted 91 lines · Takashi Iwai
Quoted 89 lines
At Fri, 25 Jan 2008 07:41:48 -0600,
Quoted 3 lines · Jerone Young
Ok less explication this time ;-) .. it was a late night. I have found something interesting though.
Thanks ;)
Quoted 8 lines
I took some time and actually evaluated the behavior of the Windows Vista Driver by Analog Devices was done for the AD1984. They do not have a PCM mixer, instead each indivdual application has there own mixer (this is a windows feature), and when you manipulate the individual mixer it manipulates the audio of that application. But there is not a PCM mixer for all apps. Just a Master. Also they have IEC958 (SDPIF) seen as a second sound device. It appears that they made what we call PCM the Master.
Maybe Windows driver doesn't use the analog loopback feature inside the codec, but does everything on software.
Quoted 9 lines
Now looking at our driver, it appears we should be doing the same. I actually have a good example why. If I am running playback through IEC958 (SDPIF) and I do anything to the PCM mixer it has no effect on PCM audio coming from applications that are running through IEC958. Only when I go to the application (assuming the application has it's own mixer code .. we will say VLC is a good example), does the actual PCM for that application get effected. So if I mute the PCM mixer, PCM audio runs over IEC958 without being muted, it only mutes it for speaker and the headphones.
OK now I see the problem. IEC958 isn't assigned to the master volume/switch list indeed.
Quoted 3 lines
What I see here is what we label as PCM is actually just the Master volume for Speaker & Headphones. But does not actually manipulate the PCM audio.
Correct. It's because the SPDIF has an individual (a sort of) DAC. So, we need to adjust this as well.
Quoted 3 lines
So really PCM really should be made Master Playback as it really does not manipulate PCM audio but just the how it is played back through Speaker & Headphones.
A fix is easy, but this might cause another problem when a non-audio signal is sent.
Could you try the patch below with the latest HG tree? (Or, you can apply this after my previous patch to 1.0.16-rc1.)
If the SPDIF volume/switch are changed together with the master successfully, then please test AC3 or DTS output if possible. I'd like to know whether it breaks now.
If it still works, I'll happily apply the patch to the upstream tree.Thanks,
Takashi
---
diff -r
19029da61288pci/hda/patch_analog.cpci/hda/patch_analog.c Fri Jan 25 15:04:01 2008 +0100 renamed from pci/hda/patch_analog.c Fri Jan 25 11:56:57 2008 +0100 +3
-0@@ -139,6 +139,7 @@ static const char *ad_slave_vols[] = { "Headphone Playback Volume", "Mono Playback Volume", "Speaker Playback Volume", + "IEC958 Playback Volume", NULL };@@ -151,6 +152,7 @@ static const char *ad_slave_sws[] = { "Headphone Playback Switch", "Mono Playback Switch", "Speaker Playback Switch", + "IEC958 Playback Volume", NULL };@@ -3078,6 +3080,7 @@ static const char *ad1884_slave_vols[] = "Internal Mic Playback Volume", "Docking Mic Playback Volume" "Beep Playback Volume", + "IEC958 Playback Volume", NULL };
Quoted 12 lines · Takashi Iwai
At Fri, 25 Jan 2008 08:37:35 -0600,
Quoted 9 lines · Jerone Young
I tested both patches. They work and master volume works for both Speakers & IEC958. It can controll up and down volume.
Speakers now mute.
One issue though when you mute the Master it does not mute IEC958. It will mute the speakers but not the IEC958 PCM stream. I am not sure if this desired behavior?
Quoted 6 lines
No, it should be also controlled by the master switch.
Could you check the below
% amixer cget name="IEC958 Playback Switch"
It does exists
Quoted 5 lines
whether this element exists. Then,
% amixer cset name="IEC958 Playback Switch" off
to turn the SPDIF off.
Yeap that worked. Using the command muted the IEC958.
So we see the it can be muted. But it's not cutting the stream when the virtual master mutes.
Only the PCM stream gets cut, IEC958 stays unmuted.
Quoted 111 lines
Quoted 4 lines
Oh also AC3 passthrough still works fine (you really can't manipulate this audio). I streamed some Doubly 5.1 streams over and they worked fine.
That's great. Then the things become really eaiser :)
Quoted 1 line
Besides that one issue you should put those 2 patches upstream.
The first patch is already on HG tree. The second patch will be pushed soon.
thanks,
Takashi
Quoted 91 lines · Takashi Iwai
Quoted 89 lines
At Fri, 25 Jan 2008 07:41:48 -0600,
Quoted 3 lines · Jerone Young
Ok less explication this time ;-) .. it was a late night. I have found something interesting though.
Thanks ;)
Quoted 8 lines
I took some time and actually evaluated the behavior of the Windows Vista Driver by Analog Devices was done for the AD1984. They do not have a PCM mixer, instead each indivdual application has there own mixer (this is a windows feature), and when you manipulate the individual mixer it manipulates the audio of that application. But there is not a PCM mixer for all apps. Just a Master. Also they have IEC958 (SDPIF) seen as a second sound device. It appears that they made what we call PCM the Master.
Maybe Windows driver doesn't use the analog loopback feature inside the codec, but does everything on software.
Quoted 9 lines
Now looking at our driver, it appears we should be doing the same. I actually have a good example why. If I am running playback through IEC958 (SDPIF) and I do anything to the PCM mixer it has no effect on PCM audio coming from applications that are running through IEC958. Only when I go to the application (assuming the application has it's own mixer code .. we will say VLC is a good example), does the actual PCM for that application get effected. So if I mute the PCM mixer, PCM audio runs over IEC958 without being muted, it only mutes it for speaker and the headphones.
OK now I see the problem. IEC958 isn't assigned to the master volume/switch list indeed.
Quoted 3 lines
What I see here is what we label as PCM is actually just the Master volume for Speaker & Headphones. But does not actually manipulate the PCM audio.
Correct. It's because the SPDIF has an individual (a sort of) DAC. So, we need to adjust this as well.
Quoted 3 lines
So really PCM really should be made Master Playback as it really does not manipulate PCM audio but just the how it is played back through Speaker & Headphones.
A fix is easy, but this might cause another problem when a non-audio signal is sent.
Could you try the patch below with the latest HG tree? (Or, you can apply this after my previous patch to 1.0.16-rc1.)
If the SPDIF volume/switch are changed together with the master successfully, then please test AC3 or DTS output if possible. I'd like to know whether it breaks now.
If it still works, I'll happily apply the patch to the upstream tree.Thanks,
Takashi
---
diff -r
19029da61288pci/hda/patch_analog.cpci/hda/patch_analog.c Fri Jan 25 15:04:01 2008 +0100 renamed from pci/hda/patch_analog.c Fri Jan 25 11:56:57 2008 +0100 +3
-0@@ -139,6 +139,7 @@ static const char *ad_slave_vols[] = { "Headphone Playback Volume", "Mono Playback Volume", "Speaker Playback Volume", + "IEC958 Playback Volume", NULL };@@ -151,6 +152,7 @@ static const char *ad_slave_sws[] = { "Headphone Playback Switch", "Mono Playback Switch", "Speaker Playback Switch", + "IEC958 Playback Volume", NULL };@@ -3078,6 +3080,7 @@ static const char *ad1884_slave_vols[] = "Internal Mic Playback Volume", "Docking Mic Playback Volume" "Beep Playback Volume", + "IEC958 Playback Volume", NULL };
I figured out the problem! Your patch is using "IEC958 Playback Volume" in ad_slave_sws[] & NOT
"IEC958 Playback Switch". Simple cut & paste error (happens to me too). Testing with that fixed it works
Here a fix on top of the patch you posted:
alsa-kernel/pci/hda/patch_analog.c +1 -1
@@ -152,7 +152,7 @@ static const char *ad_slave_sws[] = {"Headphone Playback Switch" ,"Mono Playback Switch" ,"Speaker Playback Switch" , -"IEC958 Playback Volume" , +"IEC958 Playback Switch" , NULL };
Quoted 134 lines · Takashi Iwai
At Fri, 25 Jan 2008 08:37:35 -0600,
Quoted 9 lines · Jerone Young
I tested both patches. They work and master volume works for both Speakers & IEC958. It can controll up and down volume.
Speakers now mute.
One issue though when you mute the Master it does not mute IEC958. It will mute the speakers but not the IEC958 PCM stream. I am not sure if this desired behavior?
No, it should be also controlled by the master switch.
Could you check the below
% amixer cget name="IEC958 Playback Switch"
whether this element exists. Then,
% amixer cset name="IEC958 Playback Switch" off
to turn the SPDIF off.
Quoted 3 lines
Oh also AC3 passthrough still works fine (you really can't manipulate this audio). I streamed some Doubly 5.1 streams over and they worked fine.
That's great. Then the things become really eaiser :)
Quoted 1 line
Besides that one issue you should put those 2 patches upstream.
The first patch is already on HG tree. The second patch will be pushed soon.
thanks,
Takashi
Quoted 91 lines · Takashi Iwai
Quoted 89 lines
At Fri, 25 Jan 2008 07:41:48 -0600,
Quoted 3 lines · Jerone Young
Ok less explication this time ;-) .. it was a late night. I have found something interesting though.
Thanks ;)
Quoted 8 lines
I took some time and actually evaluated the behavior of the Windows Vista Driver by Analog Devices was done for the AD1984. They do not have a PCM mixer, instead each indivdual application has there own mixer (this is a windows feature), and when you manipulate the individual mixer it manipulates the audio of that application. But there is not a PCM mixer for all apps. Just a Master. Also they have IEC958 (SDPIF) seen as a second sound device. It appears that they made what we call PCM the Master.
Maybe Windows driver doesn't use the analog loopback feature inside the codec, but does everything on software.
Quoted 9 lines
Now looking at our driver, it appears we should be doing the same. I actually have a good example why. If I am running playback through IEC958 (SDPIF) and I do anything to the PCM mixer it has no effect on PCM audio coming from applications that are running through IEC958. Only when I go to the application (assuming the application has it's own mixer code .. we will say VLC is a good example), does the actual PCM for that application get effected. So if I mute the PCM mixer, PCM audio runs over IEC958 without being muted, it only mutes it for speaker and the headphones.
OK now I see the problem. IEC958 isn't assigned to the master volume/switch list indeed.
Quoted 3 lines
What I see here is what we label as PCM is actually just the Master volume for Speaker & Headphones. But does not actually manipulate the PCM audio.
Correct. It's because the SPDIF has an individual (a sort of) DAC. So, we need to adjust this as well.
Quoted 3 lines
So really PCM really should be made Master Playback as it really does not manipulate PCM audio but just the how it is played back through Speaker & Headphones.
A fix is easy, but this might cause another problem when a non-audio signal is sent.
Could you try the patch below with the latest HG tree? (Or, you can apply this after my previous patch to 1.0.16-rc1.)
If the SPDIF volume/switch are changed together with the master successfully, then please test AC3 or DTS output if possible. I'd like to know whether it breaks now.
If it still works, I'll happily apply the patch to the upstream tree.Thanks,
Takashi
---
diff -r
19029da61288pci/hda/patch_analog.cpci/hda/patch_analog.c Fri Jan 25 15:04:01 2008 +0100 renamed from pci/hda/patch_analog.c Fri Jan 25 11:56:57 2008 +0100 +3
-0@@ -139,6 +139,7 @@ static const char *ad_slave_vols[] = { "Headphone Playback Volume", "Mono Playback Volume", "Speaker Playback Volume", + "IEC958 Playback Volume", NULL };@@ -151,6 +152,7 @@ static const char *ad_slave_sws[] = { "Headphone Playback Switch", "Mono Playback Switch", "Speaker Playback Switch", + "IEC958 Playback Volume", NULL };@@ -3078,6 +3080,7 @@ static const char *ad1884_slave_vols[] = "Internal Mic Playback Volume", "Docking Mic Playback Volume" "Beep Playback Volume", + "IEC958 Playback Volume", NULL };
At Fri, 25 Jan 2008 20:32:14 -0600,
Quoted 8 lines · Jerone Young
I figured out the problem! Your patch is using "IEC958 Playback Volume" in ad_slave_sws[] & NOT
"IEC958 Playback Switch". Simple cut & paste error (happens to me too). Testing with that fixed it works
Here a fix on top of the patch you posted:Signed-off-by Jerone Young <[email protected]>
Doh! Thanks for spotting out. The fixed patch is now on HG tree.
Takashi