Skip to contentSkip to conversation

1.0.15: volume levels drift on HDA with STAC92XX codec

RFC In review Chuck Ebbert 6 participants 26 messages Nov 1, 2007 – Nov 26, 2007

lore
Share & tools
lore
#1 lore raw
Quoted 5 lines · On Thursday 01 November 2007 19:47:39 Chuck Ebbert wrote:

We have two reports now of unstable volume levels:

https://bugzilla.redhat.com/show_bug.cgi?id=361051
https://bugzilla.redhat.com/show_bug.cgi?id=354981

Quoted 7 lines

This is with kernel 2.6.23 plus the two ALSA merge patches from 2.6.23-rc1.
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

Probably this isn't a software bug.
Probably this chip country to datasheet doesn't have usable "Master Volume" (volume knob) control.

The master volume control wasn't present before, I added support for it, using data-sheets. I need to know what exactly sigmatel codec was used in both cases.

Best regards,
Maxim Levitsky

#2 lore raw

At Thu, 1 Nov 2007 20:17:30 +0200,

Quoted 14 lines · Maxim Levitsky
Quoted 5 lines · On Thursday 01 November 2007 19:47:39 Chuck Ebbert wrote:

We have two reports now of unstable volume levels:

https://bugzilla.redhat.com/show_bug.cgi?id=361051
https://bugzilla.redhat.com/show_bug.cgi?id=354981

Quoted 7 lines

This is with kernel 2.6.23 plus the two ALSA merge patches from 2.6.23-rc1.
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

Quoted 8 lines

Probably this isn't a software bug.
Probably this chip country to datasheet doesn't have usable "Master Volume" (volume knob) control.

The master volume control wasn't present before, I added support for it, using data-sheets.
I need to know what exactly sigmatel codec was used in both cases.

Yes, the latter case seems with STAC9205 but the former one (361051) isn't clear. Please check /proc/asound/card0/codec#* entries.

thanks,

Takashi

#3 lore raw
Quoted 25 lines · On Monday 05 November 2007 13:40:48 Takashi Iwai wrote:

At Thu, 1 Nov 2007 20:17:30 +0200,

Quoted 14 lines · Maxim Levitsky
Quoted 5 lines · On Thursday 01 November 2007 19:47:39 Chuck Ebbert wrote:

We have two reports now of unstable volume levels:

https://bugzilla.redhat.com/show_bug.cgi?id=361051
https://bugzilla.redhat.com/show_bug.cgi?id=354981

Quoted 7 lines

This is with kernel 2.6.23 plus the two ALSA merge patches from 2.6.23-rc1.
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

Quoted 8 lines

Probably this isn't a software bug.
Probably this chip country to datasheet doesn't have usable "Master Volume" (volume knob) control.

The master volume control wasn't present before, I added support for it, using data-sheets.
I need to know what exactly sigmatel codec was used in both cases.

Quoted 8 lines

Yes, the latter case seems with STAC9205 but the former one (361051) isn't clear. Please check /proc/asound/card0/codec#* entries.

thanks,

Takashi

The former is also STAC9205/04/ since it is the only one with analog loopback and two ADCs

I have question, I talked with the reporter of 354981, and I don't know why but his amixer gives very strange results:

[root@itse68482 ~]# cat amixer-contents-kernel-2.6.23.2-36 numid=0,iface=MIXER,name='Master Playback Switch'
; type=BOOLEAN,access=rw------,values=1
: values=on
numid=0,iface=MIXER,name='Master Playback Volume'
; type=INTEGER,access=rw------,values=2,min=0,max=65536,step=1 : values=65536,65536
numid=0,iface=MIXER,name='Capture Switch'
; type=BOOLEAN,access=rw------,values=1
: values=on
numid=0,iface=MIXER,name='Capture Volume'
; type=INTEGER,access=rw------,values=2,min=0,max=65536,step=1 : values=34953,34953

How can that be?

According to his lspci, he doesn't have a second sound card.

Any ideas?

Besides that it seems that VolumeKnob is physically broken on STAC9205s, Can anybody here with STAC9205/STAC9204/STAC9254/STAC9255 test it?

And last question, about STAC9254/STAC9255
There is no datasheet for that chip on the web, is this just STAC9205 + modem?

Best regards,
Maxim Levitsky

#4 lore raw

At Mon, 5 Nov 2007 16:53:23 +0200,

Quoted 55 lines · Maxim Levitsky
Quoted 25 lines · On Monday 05 November 2007 13:40:48 Takashi Iwai wrote:

At Thu, 1 Nov 2007 20:17:30 +0200,

Quoted 14 lines · Maxim Levitsky
Quoted 5 lines · On Thursday 01 November 2007 19:47:39 Chuck Ebbert wrote:

We have two reports now of unstable volume levels:

https://bugzilla.redhat.com/show_bug.cgi?id=361051
https://bugzilla.redhat.com/show_bug.cgi?id=354981

Quoted 7 lines

This is with kernel 2.6.23 plus the two ALSA merge patches from 2.6.23-rc1.
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

Quoted 8 lines

Probably this isn't a software bug.
Probably this chip country to datasheet doesn't have usable "Master Volume" (volume knob) control.

The master volume control wasn't present before, I added support for it, using data-sheets.
I need to know what exactly sigmatel codec was used in both cases.

Quoted 8 lines

Yes, the latter case seems with STAC9205 but the former one (361051) isn't clear. Please check /proc/asound/card0/codec#* entries.

thanks,

Takashi

The former is also STAC9205/04/ since it is the only one with analog loopback and two ADCs

I have question, I talked with the reporter of 354981, and I don't know why but his amixer gives very strange results:

[root@itse68482 ~]# cat amixer-contents-kernel-2.6.23.2-36 numid=0,iface=MIXER,name='Master Playback Switch'
; type=BOOLEAN,access=rw------,values=1
: values=on
numid=0,iface=MIXER,name='Master Playback Volume'
; type=INTEGER,access=rw------,values=2,min=0,max=65536,step=1 : values=65536,65536
numid=0,iface=MIXER,name='Capture Switch'
; type=BOOLEAN,access=rw------,values=1
: values=on
numid=0,iface=MIXER,name='Capture Volume'
; type=INTEGER,access=rw------,values=2,min=0,max=65536,step=1 : values=34953,34953

Quoted 1 line

How can that be?

Is the codec accessed properly? This looks like the error at reading amp capability of these NIDS and returned -1. The volume attributes are extracted from the amp caps. But if so, usually relevant kernel messages appear...

Takashi

#5 lore raw
Quoted 59 lines · On Monday 05 November 2007 14:09:30 Takashi Iwai wrote:

At Mon, 5 Nov 2007 16:53:23 +0200,

Quoted 55 lines · Maxim Levitsky
Quoted 25 lines · On Monday 05 November 2007 13:40:48 Takashi Iwai wrote:

At Thu, 1 Nov 2007 20:17:30 +0200,

Quoted 14 lines · Maxim Levitsky
Quoted 5 lines · On Thursday 01 November 2007 19:47:39 Chuck Ebbert wrote:

We have two reports now of unstable volume levels:

https://bugzilla.redhat.com/show_bug.cgi?id=361051
https://bugzilla.redhat.com/show_bug.cgi?id=354981

Quoted 7 lines

This is with kernel 2.6.23 plus the two ALSA merge patches from 2.6.23-rc1.
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

Quoted 8 lines

Probably this isn't a software bug.
Probably this chip country to datasheet doesn't have usable "Master Volume" (volume knob) control.

The master volume control wasn't present before, I added support for it, using data-sheets.
I need to know what exactly sigmatel codec was used in both cases.

Quoted 8 lines

Yes, the latter case seems with STAC9205 but the former one (361051) isn't clear. Please check /proc/asound/card0/codec#* entries.

thanks,

Takashi

The former is also STAC9205/04/ since it is the only one with analog loopback and two ADCs

I have question, I talked with the reporter of 354981, and I don't know why but his amixer gives very strange results:

[root@itse68482 ~]# cat amixer-contents-kernel-2.6.23.2-36 numid=0,iface=MIXER,name='Master Playback Switch'
; type=BOOLEAN,access=rw------,values=1
: values=on
numid=0,iface=MIXER,name='Master Playback Volume'
; type=INTEGER,access=rw------,values=2,min=0,max=65536,step=1 : values=65536,65536
numid=0,iface=MIXER,name='Capture Switch'
; type=BOOLEAN,access=rw------,values=1
: values=on
numid=0,iface=MIXER,name='Capture Volume'
; type=INTEGER,access=rw------,values=2,min=0,max=65536,step=1 : values=34953,34953

Quoted 1 line

How can that be?

Quoted 8 lines

Is the codec accessed properly? This looks like the error at reading amp capability of these NIDS and returned -1. The volume attributes are extracted from the amp caps. But if so, usually relevant kernel messages appear...

Takashi

Probably,

only this one:
hda_intel: azx_get_response timeout, switching to polling mode: last cmd=0x00bf1c00

But he told me that he has both 'Master' and 'Front' in gnome-volume-control but there are no signs of 'Front' in amixer.

Espen Stefansen, can you send the dmesg after you run the amixer.
Do you have by chance a second sound card plugged when you have the amixer run?
Can you run alsamixer, and tell me what controls you see there on both 'Playback' and 'Capture' tabs:
(Press 'Tab' to switch between 'Playback' and 'Capture' controls.

Best regards,
Maxim Levitsky

#6 lore raw

At Mon, 5 Nov 2007 17:32:32 +0200,

Quoted 70 lines · Maxim Levitsky
Quoted 59 lines · On Monday 05 November 2007 14:09:30 Takashi Iwai wrote:

At Mon, 5 Nov 2007 16:53:23 +0200,

Quoted 55 lines · Maxim Levitsky
Quoted 25 lines · On Monday 05 November 2007 13:40:48 Takashi Iwai wrote:

At Thu, 1 Nov 2007 20:17:30 +0200,

Quoted 14 lines · Maxim Levitsky
Quoted 5 lines · On Thursday 01 November 2007 19:47:39 Chuck Ebbert wrote:

We have two reports now of unstable volume levels:

https://bugzilla.redhat.com/show_bug.cgi?id=361051
https://bugzilla.redhat.com/show_bug.cgi?id=354981

Quoted 7 lines

This is with kernel 2.6.23 plus the two ALSA merge patches from 2.6.23-rc1.
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

Quoted 8 lines

Probably this isn't a software bug.
Probably this chip country to datasheet doesn't have usable "Master Volume" (volume knob) control.

The master volume control wasn't present before, I added support for it, using data-sheets.
I need to know what exactly sigmatel codec was used in both cases.

Quoted 8 lines

Yes, the latter case seems with STAC9205 but the former one (361051) isn't clear. Please check /proc/asound/card0/codec#* entries.

thanks,

Takashi

The former is also STAC9205/04/ since it is the only one with analog loopback and two ADCs

I have question, I talked with the reporter of 354981, and I don't know why but his amixer gives very strange results:

[root@itse68482 ~]# cat amixer-contents-kernel-2.6.23.2-36 numid=0,iface=MIXER,name='Master Playback Switch'
; type=BOOLEAN,access=rw------,values=1
: values=on
numid=0,iface=MIXER,name='Master Playback Volume'
; type=INTEGER,access=rw------,values=2,min=0,max=65536,step=1 : values=65536,65536
numid=0,iface=MIXER,name='Capture Switch'
; type=BOOLEAN,access=rw------,values=1
: values=on
numid=0,iface=MIXER,name='Capture Volume'
; type=INTEGER,access=rw------,values=2,min=0,max=65536,step=1 : values=34953,34953

Quoted 1 line

How can that be?

Quoted 8 lines

Is the codec accessed properly? This looks like the error at reading amp capability of these NIDS and returned -1. The volume attributes are extracted from the amp caps. But if so, usually relevant kernel messages appear...

Takashi

Quoted 7 lines

Probably,

only this one:
hda_intel: azx_get_response timeout, switching to polling mode: last cmd=0x00bf1c00

But he told me that he has both 'Master' and 'Front' in gnome-volume-control but there are no signs of 'Front' in amixer.

You'd have better (raw) representation via "alsactl -f somefile store" than amixer. amixer does some abstraction and confuses sometimes :)

Takashi

#7 lore raw

Re: 1.0.15: volume levels drift on HDA with STAC92XXcodec

In reply to Maxim Levitsky
Quoted 17 lines · On Monday 05 November 2007 13:40:48 Takashi Iwai wrote:
Quoted 16 lines

At Thu, 1 Nov 2007 20:17:30 +0200,

Quoted 14 lines · Maxim Levitsky
Quoted 12 lines · On Thursday 01 November 2007 19:47:39 Chuck Ebbert wrote:

We have two reports now of unstable volume levels:

https://bugzilla.redhat.com/show_bug.cgi?id=361051
https://bugzilla.redhat.com/show_bug.cgi?id=354981

This is with kernel 2.6.23 plus the two ALSA merge patches from 2.6.23-rc1.
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

Probably this isn't a software bug.
Probably this chip country to datasheet doesn't have usable

"Master

Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

Volume" (volume knob) control.

The master volume control wasn't present before, I added support

for

Quoted 9 lines
Quoted 9 lines
Quoted 2 lines

it, using data-sheets.
I need to know what exactly sigmatel codec was used in both cases.

Yes, the latter case seems with STAC9205 but the former one (361051) isn't clear. Please check /proc/asound/card0/codec#* entries.

thanks,

Quoted 7 lines
Quoted 2 lines

Takashi

The former is also STAC9205/04/ since it is the only one with analog loopback and two ADCs

I have question, I talked with the reporter of 354981, and I don't

know

Quoted 17 lines

why but his amixer
gives very strange results:

[root@itse68482 ~]# cat amixer-contents-kernel-2.6.23.2-36 numid=0,iface=MIXER,name='Master Playback Switch'
; type=BOOLEAN,access=rw------,values=1
: values=on
numid=0,iface=MIXER,name='Master Playback Volume'
; type=INTEGER,access=rw------,values=2,min=0,max=65536,step=1 : values=65536,65536
numid=0,iface=MIXER,name='Capture Switch'
; type=BOOLEAN,access=rw------,values=1
: values=on
numid=0,iface=MIXER,name='Capture Volume'
; type=INTEGER,access=rw------,values=2,min=0,max=65536,step=1 : values=34953,34953

Quoted 7 lines

How can that be?

According to his lspci, he doesn't have a second sound card.

Any ideas?

Besides that it seems that VolumeKnob is physically broken on

STAC9205s,

Quoted 4 lines

Can anybody here with STAC9205/STAC9204/STAC9254/STAC9255 test it?

And last question, about STAC9254/STAC9255
There is no datasheet for that chip on the web, is this just STAC9205

+

Quoted 8 lines

modem?

Best regards,
Maxim Levitsky
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

[Tellman, Steven]

The STAC9254/55 lines are not available anymore. Yes, they were basically 9204/5 + Modem.

- Steven

#8 lore raw

Re: 1.0.15: volume levels drift on HDA with STAC92XXcodec

Quoted 81 lines · Steven
Quoted 17 lines · On Monday 05 November 2007 13:40:48 Takashi Iwai wrote:
Quoted 16 lines

At Thu, 1 Nov 2007 20:17:30 +0200,

Quoted 14 lines · Maxim Levitsky
Quoted 12 lines · On Thursday 01 November 2007 19:47:39 Chuck Ebbert wrote:

We have two reports now of unstable volume levels:

https://bugzilla.redhat.com/show_bug.cgi?id=361051
https://bugzilla.redhat.com/show_bug.cgi?id=354981

This is with kernel 2.6.23 plus the two ALSA merge patches from 2.6.23-rc1.
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

Probably this isn't a software bug.
Probably this chip country to datasheet doesn't have usable

"Master

Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

Volume" (volume knob) control.

The master volume control wasn't present before, I added support

for

Quoted 9 lines
Quoted 9 lines
Quoted 2 lines

it, using data-sheets.
I need to know what exactly sigmatel codec was used in both cases.

Yes, the latter case seems with STAC9205 but the former one (361051) isn't clear. Please check /proc/asound/card0/codec#* entries.

thanks,

Quoted 7 lines
Quoted 2 lines

Takashi

The former is also STAC9205/04/ since it is the only one with analog loopback and two ADCs

I have question, I talked with the reporter of 354981, and I don't

know

Quoted 17 lines

why but his amixer
gives very strange results:

[root@itse68482 ~]# cat amixer-contents-kernel-2.6.23.2-36 numid=0,iface=MIXER,name='Master Playback Switch'
; type=BOOLEAN,access=rw------,values=1
: values=on
numid=0,iface=MIXER,name='Master Playback Volume'
; type=INTEGER,access=rw------,values=2,min=0,max=65536,step=1 : values=65536,65536
numid=0,iface=MIXER,name='Capture Switch'
; type=BOOLEAN,access=rw------,values=1
: values=on
numid=0,iface=MIXER,name='Capture Volume'
; type=INTEGER,access=rw------,values=2,min=0,max=65536,step=1 : values=34953,34953

Quoted 7 lines

How can that be?

According to his lspci, he doesn't have a second sound card.

Any ideas?

Besides that it seems that VolumeKnob is physically broken on

STAC9205s,

Quoted 4 lines

Can anybody here with STAC9205/STAC9204/STAC9254/STAC9255 test it?

And last question, about STAC9254/STAC9255
There is no datasheet for that chip on the web, is this just STAC9205

+

Quoted 8 lines

modem?

Best regards,
Maxim Levitsky
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

Quoted 8 lines

[Tellman, Steven]

The STAC9254/55 lines are not available anymore. Yes, they were basically 9204/5 + Modem.

- Steven

Hi,

Thanks a lot,

Just one more question,
are data-sheets for STAC9872 aviable?
I don't even see a page describing those chips on IDT website. Furthermore, recently IDT sent a patch for STAC92HD71BXX, thus I want to ask whenever datasheets for it will be available.

Best regards,
Maxim Levitsky

#9 lore raw

Re: 1.0.15: volume levels drift on HDA with STAC92XXcodec

Quoted 9 lines

-----Original Message-----
From: Maxim Levitsky [mailto:[email protected]]
Sent: Monday, November 05, 2007 11:09 AM
To: Tellman, Steven
Cc: Takashi Iwai; [email protected]; Chuck Ebbert; [email protected]
Subject: Re: [alsa-devel] 1.0.15: volume levels drift on HDA with STAC92XXcodec

Quoted 12 lines
Quoted 11 lines · Steven
Quoted 11 lines · On Monday 05 November 2007 13:40:48 Takashi Iwai wrote:
Quoted 10 lines

At Thu, 1 Nov 2007 20:17:30 +0200,

Quoted 8 lines · Maxim Levitsky
Quoted 6 lines · On Thursday 01 November 2007 19:47:39 Chuck Ebbert wrote:

We have two reports now of unstable volume levels:

https://bugzilla.redhat.com/show_bug.cgi?id=361051
https://bugzilla.redhat.com/show_bug.cgi?id=354981

This is with kernel 2.6.23 plus the two ALSA merge patches

from

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

2.6.23-rc1.
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

Quoted 7 lines
Quoted 7 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

Probably this isn't a software bug.
Probably this chip country to datasheet doesn't have usable

"Master

Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

Volume" (volume knob) control.

The master volume control wasn't present before, I added

support

Quoted 3 lines
Quoted 3 lines

for

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

it, using data-sheets.
I need to know what exactly sigmatel codec was used in both

cases.

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

Yes, the latter case seems with STAC9205 but the former one

(361051)

Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 7 lines

isn't clear. Please check /proc/asound/card0/codec#* entries.

thanks,

Takashi

The former is also STAC9205/04/ since it is the only one with

analog

Quoted 25 lines
Quoted 25 lines
Quoted 3 lines

loopback and two ADCs

I have question, I talked with the reporter of 354981, and I don't

know

Quoted 21 lines

why but his amixer
gives very strange results:

[root@itse68482 ~]# cat amixer-contents-kernel-2.6.23.2-36 numid=0,iface=MIXER,name='Master Playback Switch'
; type=BOOLEAN,access=rw------,values=1
: values=on
numid=0,iface=MIXER,name='Master Playback Volume'
; type=INTEGER,access=rw------,values=2,min=0,max=65536,step=1 : values=65536,65536
numid=0,iface=MIXER,name='Capture Switch'
; type=BOOLEAN,access=rw------,values=1
: values=on
numid=0,iface=MIXER,name='Capture Volume'
; type=INTEGER,access=rw------,values=2,min=0,max=65536,step=1 : values=34953,34953

How can that be?

According to his lspci, he doesn't have a second sound card.

Quoted 8 lines
Quoted 8 lines
Quoted 3 lines

Any ideas?

Besides that it seems that VolumeKnob is physically broken on

STAC9205s,

Quoted 4 lines

Can anybody here with STAC9205/STAC9204/STAC9254/STAC9255 test it?

And last question, about STAC9254/STAC9255
There is no datasheet for that chip on the web, is this just

STAC9205

Quoted 18 lines
Quoted 10 lines

+

Quoted 8 lines

modem?

Best regards,
Maxim Levitsky
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

Quoted 8 lines

[Tellman, Steven]

The STAC9254/55 lines are not available anymore. Yes, they were basically 9204/5 + Modem.

- Steven

Quoted 7 lines

Hi,

Thanks a lot,

Just one more question,
are data-sheets for STAC9872 aviable?
I don't even see a page describing those chips on IDT website.

No, datasheets are not available.

Quoted 2 lines

Furthermore, recently IDT sent a patch for STAC92HD71BXX, thus I want to ask whenever datasheets for it will be available.

Datasheets are available on IDT.com

http://www.idt.com/?catID=18442398

Quoted 3 lines

Best regards,
Maxim Levitsky

#10 lore raw

Re: 1.0.15: volume levels drift on HDA with STAC92XXcodec

Quoted 1 line · Steven
Quoted 1 line

-----Original Message-----

...

Quoted 8 lines
Quoted 7 lines

Hi,

Thanks a lot,

Just one more question,
are data-sheets for STAC9872 aviable?
I don't even see a page describing those chips on IDT website.

Quoted 8 lines

No, datasheets are not available.

Quoted 2 lines

Furthermore, recently IDT sent a patch for STAC92HD71BXX, thus I want to ask whenever datasheets for it will be available.

Datasheets are available on IDT.com

http://www.idt.com/?catID=18442398

I assumed that IDT will no longer publish the datasheets, But now it looks like this isn't true.
Big thanks!

I assume that STAC9872 is some sort of OEM version for Sony Vaio laptops, is this true? Are those simular to other STACs? (like in 9254/55 case)

Best regards,
Maxim Levitsky

#11 lore raw

Re: 1.0.15: volume levels drift on HDA with STAC92XXcodec

Quoted 27 lines

-----Original Message-----
From: Maxim Levitsky [mailto:[email protected]]
Sent: Monday, November 05, 2007 12:59 PM
To: Tellman, Steven
Cc: Takashi Iwai; [email protected]; Chuck Ebbert; [email protected]
Subject: Re: [alsa-devel] 1.0.15: volume levels drift on HDA with STAC92XXcodec

Quoted 1 line · Steven
Quoted 1 line

-----Original Message-----

....

Quoted 15 lines
Quoted 7 lines

Hi,

Thanks a lot,

Just one more question,
are data-sheets for STAC9872 aviable?
I don't even see a page describing those chips on IDT website.

No, datasheets are not available.

Quoted 2 lines

Furthermore, recently IDT sent a patch for STAC92HD71BXX, thus I want to ask whenever datasheets for it will be available.

Datasheets are available on IDT.com

Quoted 7 lines
Quoted 1 line

http://www.idt.com/?catID=18442398

I assumed that IDT will no longer publish the datasheets, But now it looks like this isn't true.
Big thanks!

I assume that STAC9872 is some sort of OEM version for Sony Vaio

laptops,

Quoted 2 lines

is this true?
Are those simular to other STACs? (like in 9254/55 case)

Sorry, I cannot comment on that part.

Quoted 4 lines

Best regards,
Maxim Levitsky

#12 lore raw
In reply to Maxim Levitsky

At Thu, 1 Nov 2007 20:17:30 +0200,

Quoted 14 lines · Maxim Levitsky
Quoted 5 lines · On Thursday 01 November 2007 19:47:39 Chuck Ebbert wrote:

We have two reports now of unstable volume levels:

https://bugzilla.redhat.com/show_bug.cgi?id=361051
https://bugzilla.redhat.com/show_bug.cgi?id=354981

Quoted 7 lines

This is with kernel 2.6.23 plus the two ALSA merge patches from 2.6.23-rc1.
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

Quoted 2 lines

Probably this isn't a software bug.
Probably this chip country to datasheet doesn't have usable "Master Volume" (volume knob) control.

I got a bug report that the same symptom appears also with STAC9221.

	http://bugzilla.kernel.org/show_bug.cgi?id=9374

Maybe we need add whitelist / blacklist for this feature?

On which codec/machine is this feature confirmed to work?

thanks,

Takashi

#13 lore raw
Quoted 24 lines · Takashi Iwai

At Thu, 1 Nov 2007 20:17:30 +0200,

Quoted 13 lines · Maxim Levitsky
Quoted 11 lines · On Thursday 01 November 2007 19:47:39 Chuck Ebbert wrote:

We have two reports now of unstable volume levels:

https://bugzilla.redhat.com/show_bug.cgi?id=361051
https://bugzilla.redhat.com/show_bug.cgi?id=354981

This is with kernel 2.6.23 plus the two ALSA merge patches from 2.6.23-rc1.
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

Quoted 3 lines

Probably this isn't a software bug.
Probably this chip country to datasheet doesn't have usable "Master Volume" (volume knob) control.

I got a bug report that the same symptom appears also with STAC9221.

	http://bugzilla.kernel.org/show_bug.cgi?id=9374
Quoted 8 lines

Maybe we need add whitelist / blacklist for this feature?

On which codec/machine is this feature confirmed to work?

thanks,

Takashi

Hi,

Yes, it seems that volume knob has troubles.

I have it with STAC9227. Obivosly it works

I know a user that first complained about some problems,
but then he found that everything works ok, probably including the volknob.

He has STAC9274, and we had a long disscussion about new features I intruduced,
He said that everything is OK.
I ask him explictly about that.

Now remember the report about conflict between my
'Master Volume' and already existing one?

This was a STAC922x, and the autor said that now his mulimedia keys can again control the volume (Probably this indicates that volumekknob is working)

Thus we have 4 groups of STACS:

1 - STAC9250 - lot of troubles - (I would be very happpy to hear from anybody here that has it)

2- STAC9221/2 - I thought that it works, but not anymore
3- STAC9227/8/9 - I have it, so I hope that it works
4- STAC927x - very simular to above, and one user that tells that it works.

I suggest to wait a bit more to see the scale of this bug
(After all it isn't that big bug, it is just a feature :-) that isn't working)

The datasheets mention briefly that an external volume control can be connected to the chip. Maybe it affects the volumeknob.
If this is the case, then probably we ether need to detect it, or drop the whole thing.
(Those external pins probably are just connected to the groung or somethibg like that so no real external volumeknob is present, but they still mess the internal VolumeKnob)

Blacklist can help, but it is probably too much for that feature, since the VolumeKnob doesn't add anything very special, and can be emulated with SoftVol plugin, like it is done now.

There are several solutions:

1) Rename it to say 'VolumeKnob", so the users that have it broken won't notice , but still driver will expose all controls of hardware.
2) Make a module param that will enable/disable it
3) Remove it completly, OK, but probably the #1 is better

All depends on whenever this is a specific stac model bug Like I thought STAC9205, or this is the 'external volume' problem.

If this is just STAC9205 and STAC9221 then we can make a module param, and make it enabled by default for STAC9227/8/9 STAC927x, but make it disabled for STAC9205 and STAC9221

If not, then it is better to remove it/remame to VolumeKnob

Best regards,
Maxim Levitsky

#14 lore raw
Quoted 87 lines · Maxim Levitsky
Quoted 22 lines · Takashi Iwai

At Thu, 1 Nov 2007 20:17:30 +0200,

Quoted 12 lines · Maxim Levitsky
Quoted 11 lines · On Thursday 01 November 2007 19:47:39 Chuck Ebbert wrote:

We have two reports now of unstable volume levels:

https://bugzilla.redhat.com/show_bug.cgi?id=361051
https://bugzilla.redhat.com/show_bug.cgi?id=354981

This is with kernel 2.6.23 plus the two ALSA merge patches from 2.6.23-rc1.
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

Quoted 3 lines

Probably this isn't a software bug.
Probably this chip country to datasheet doesn't have usable "Master Volume" (volume knob) control.

I got a bug report that the same symptom appears also with STAC9221.

	http://bugzilla.kernel.org/show_bug.cgi?id=9374
Quoted 8 lines

Maybe we need add whitelist / blacklist for this feature?

On which codec/machine is this feature confirmed to work?

thanks,

Takashi

Hi,

Yes, it seems that volume knob has troubles.

I have it with STAC9227. Obivosly it works

I know a user that first complained about some problems,
but then he found that everything works ok, probably including the volknob.

He has STAC9274, and we had a long disscussion about new features I intruduced,
He said that everything is OK.
I ask him explictly about that.

Now remember the report about conflict between my
'Master Volume' and already existing one?

This was a STAC922x, and the autor said that now his mulimedia keys can again control the volume (Probably this indicates that volumekknob is working)

Thus we have 4 groups of STACS:

1 - STAC9250 - lot of troubles - (I would be very happpy to hear from anybody here that has it)

2- STAC9221/2 - I thought that it works, but not anymore
3- STAC9227/8/9 - I have it, so I hope that it works
4- STAC927x - very simular to above, and one user that tells that it works.

I suggest to wait a bit more to see the scale of this bug
(After all it isn't that big bug, it is just a feature :-) that isn't working)

The datasheets mention briefly that an external volume control can be connected to the chip. Maybe it affects the volumeknob.
If this is the case, then probably we ether need to detect it, or drop the whole thing.
(Those external pins probably are just connected to the groung or somethibg like that so no real external volumeknob is present, but they still mess the internal VolumeKnob)

Blacklist can help, but it is probably too much for that feature, since the VolumeKnob doesn't add anything very special, and can be emulated with SoftVol plugin, like it is done now.

There are several solutions:

1) Rename it to say 'VolumeKnob", so the users that have it broken won't notice , but still driver will expose all controls of hardware.
2) Make a module param that will enable/disable it
3) Remove it completly, OK, but probably the #1 is better

Quoted 9 lines

All depends on whenever this is a specific stac model bug Like I thought STAC9205, or this is the 'external volume' problem.

If this is just STAC9205 and STAC9221 then we can make a module param, and make it enabled by default for STAC9227/8/9 STAC927x, but make it disabled for STAC9205 and STAC9221

If not, then it is better to remove it/remame to VolumeKnob

I reverted the change in Fedora 8 and it fixed things:

http://cvs.fedora.redhat.com/viewcvs/*checkout*/rpms/kernel/F-8/linux-2.6-alsa-revert-hda-stac-volume.patch?root=extras

#15 lore raw
In reply to Maxim Levitsky

At Fri, 16 Nov 2007 17:50:09 +0200,

Quoted 79 lines · Maxim Levitsky
Quoted 24 lines · Takashi Iwai

At Thu, 1 Nov 2007 20:17:30 +0200,

Quoted 13 lines · Maxim Levitsky
Quoted 11 lines · On Thursday 01 November 2007 19:47:39 Chuck Ebbert wrote:

We have two reports now of unstable volume levels:

https://bugzilla.redhat.com/show_bug.cgi?id=361051
https://bugzilla.redhat.com/show_bug.cgi?id=354981

This is with kernel 2.6.23 plus the two ALSA merge patches from 2.6.23-rc1.
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

Quoted 3 lines

Probably this isn't a software bug.
Probably this chip country to datasheet doesn't have usable "Master Volume" (volume knob) control.

I got a bug report that the same symptom appears also with STAC9221.

	http://bugzilla.kernel.org/show_bug.cgi?id=9374
Quoted 8 lines

Maybe we need add whitelist / blacklist for this feature?

On which codec/machine is this feature confirmed to work?

thanks,

Takashi

Hi,

Yes, it seems that volume knob has troubles.

I have it with STAC9227. Obivosly it works

I know a user that first complained about some problems,
but then he found that everything works ok, probably including the volknob.

He has STAC9274, and we had a long disscussion about new features I intruduced,
He said that everything is OK.
I ask him explictly about that.

Now remember the report about conflict between my
'Master Volume' and already existing one?

This was a STAC922x, and the autor said that now his mulimedia keys can again control the volume (Probably this indicates that volumekknob is working)

Thus we have 4 groups of STACS:

1 - STAC9250 - lot of troubles - (I would be very happpy to hear from anybody here that has it)

2- STAC9221/2 - I thought that it works, but not anymore
3- STAC9227/8/9 - I have it, so I hope that it works
4- STAC927x - very simular to above, and one user that tells that it works.

I suggest to wait a bit more to see the scale of this bug
(After all it isn't that big bug, it is just a feature :-) that isn't working)

The datasheets mention briefly that an external volume control can be connected to the chip. Maybe it affects the volumeknob.
If this is the case, then probably we ether need to detect it, or drop the whole thing.
(Those external pins probably are just connected to the groung or somethibg like that so no real external volumeknob is present, but they still mess the internal VolumeKnob)

Quoted 8 lines

Blacklist can help, but it is probably too much for that feature, since the VolumeKnob doesn't add anything very special, and can be emulated with SoftVol plugin, like it is done now.

There are several solutions:

1) Rename it to say 'VolumeKnob", so the users that have it broken won't notice , but still driver will expose all controls of hardware.

But even a different name control may have a similar effect. After all, it's exposed as a mixer element, and the mixer app may choose it as well.

Quoted 1 line

2) Make a module param that will enable/disable it

I don't like to add a codec-specific module option, so far.

Quoted 1 line

3) Remove it completly, OK, but probably the #1 is better

I think the safest way at this moment is to revert that once. Then we'll have a stable state as on 2.6.23.

On my local tree, there is a patch to add a virtual "Master" control to bind all volume controls. It's a driver-side implementation (no softvol plugin). So, when this patch is merged, we'll have a master control for STAC, anyway.

Quoted 2 lines

All depends on whenever this is a specific stac model bug Like I thought STAC9205, or this is the 'external volume' problem.

Or, it might be the conflict (a kind of race) between the software vol knob change and the hardware vol knob change. If so, it can explain why one STAC9221 works and another STAC9221 doesn't.

Quoted 3 lines

If this is just STAC9205 and STAC9221 then we can make a module param, and make it enabled by default for STAC9227/8/9 STAC927x, but make it disabled for STAC9205 and STAC9221

I got a bug report (from Linus himself) that once the driver with 9227 didn't work during 2.6.24-rc1 update. And magically started again working during bisecting. I couldn't spot the culprit (the volknob value looked OK), but my suspect is the volknob, judging from the situation.

Quoted 2 lines

If not, then it is better to remove it/remame to VolumeKnob

Agreed. I'd like to take a safer way if you don't insist...

Takashi

#16 lore raw
Quoted 111 lines · Takashi Iwai

At Fri, 16 Nov 2007 17:50:09 +0200,

Quoted 81 lines · Maxim Levitsky
Quoted 24 lines · Takashi Iwai

At Thu, 1 Nov 2007 20:17:30 +0200,

Quoted 13 lines · Maxim Levitsky
Quoted 11 lines · On Thursday 01 November 2007 19:47:39 Chuck Ebbert wrote:

We have two reports now of unstable volume levels:

https://bugzilla.redhat.com/show_bug.cgi?id=361051
https://bugzilla.redhat.com/show_bug.cgi?id=354981

This is with kernel 2.6.23 plus the two ALSA merge patches from 2.6.23-rc1.
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

Quoted 3 lines

Probably this isn't a software bug.
Probably this chip country to datasheet doesn't have usable "Master Volume" (volume knob) control.

I got a bug report that the same symptom appears also with STAC9221.

	http://bugzilla.kernel.org/show_bug.cgi?id=9374
Quoted 8 lines

Maybe we need add whitelist / blacklist for this feature?

On which codec/machine is this feature confirmed to work?

thanks,

Takashi

Hi,

Yes, it seems that volume knob has troubles.

I have it with STAC9227. Obivosly it works

I know a user that first complained about some problems, but then he found that everything works ok, probably including the volknob.

He has STAC9274, and we had a long disscussion about new features I intruduced,
He said that everything is OK.
I ask him explictly about that.

Now remember the report about conflict between my
'Master Volume' and already existing one?

This was a STAC922x, and the autor said that now his mulimedia keys can again control the volume (Probably this indicates that volumekknob is working)

Thus we have 4 groups of STACS:

1 - STAC9250 - lot of troubles - (I would be very happpy to hear from anybody here that has it)

2- STAC9221/2 - I thought that it works, but not anymore 3- STAC9227/8/9 - I have it, so I hope that it works
4- STAC927x - very simular to above, and one user that tells that it works.

I suggest to wait a bit more to see the scale of this bug (After all it isn't that big bug, it is just a feature :-) that isn't working)

The datasheets mention briefly that an external volume control can be connected to the chip. Maybe it affects the volumeknob.
If this is the case, then probably we ether need to detect it, or drop the whole thing.
(Those external pins probably are just connected to the groung or somethibg like that so no real external volumeknob is present, but they still mess the internal VolumeKnob)

Quoted 8 lines

Blacklist can help, but it is probably too much for that feature, since the VolumeKnob doesn't add anything very special, and can be emulated with SoftVol plugin, like it is done now.

There are several solutions:

1) Rename it to say 'VolumeKnob", so the users that have it broken won't notice , but still driver will expose all controls of hardware.

But even a different name control may have a similar effect. After all, it's exposed as a mixer element, and the mixer app may choose it as well.

Quoted 1 line

2) Make a module param that will enable/disable it

I don't like to add a codec-specific module option, so far.

Quoted 1 line

3) Remove it completly, OK, but probably the #1 is better

I think the safest way at this moment is to revert that once. Then we'll have a stable state as on 2.6.23.

On my local tree, there is a patch to add a virtual "Master" control to bind all volume controls. It's a driver-side implementation (no softvol plugin). So, when this patch is merged, we'll have a master control for STAC, anyway.

Quoted 6 lines
Quoted 2 lines

All depends on whenever this is a specific stac model bug Like I thought STAC9205, or this is the 'external volume' problem.

Or, it might be the conflict (a kind of race) between the software vol knob change and the hardware vol knob change. If so, it can explain why one STAC9221 works and another STAC9221 doesn't.

Thats exactly what I have said, but this is only a guess, I didn't see a statetment about that in datasheet.

Quoted 10 lines
Quoted 4 lines

If this is just STAC9205 and STAC9221 then we can make a module param, and make it enabled by default for STAC9227/8/9 STAC927x, but make it disabled for STAC9205 and STAC9221

I got a bug report (from Linus himself) that once the driver with 9227 didn't work during 2.6.24-rc1 update. And magically started again working during bisecting. I couldn't spot the culprit (the volknob value looked OK), but my suspect is the volknob, judging from the situation.

You mean it was connected to instable volume too? If that is true, and due to the fact that I have STAC9227, probably it is a conflict with hardware volume.

Quoted 4 lines
Quoted 2 lines

If not, then it is better to remove it/remame to VolumeKnob

Agreed. I'd like to take a safer way if you don't insist...

Great, it is probably the best to have a virtual master volume. Just one question, it will be probably enabled for devices that don't have a master volume (or have it broken like the STAC), right?,
And when you expect it to be merged?

So I agree completly, revert it, and lets forget about that VolumeKnob. Sorry for the trouble :-)

Best regards,
Maxim Levitsky

Quoted 3 lines

Takashi

#17 lore raw

At Sat, 17 Nov 2007 12:36:32 +0200,

Quoted 128 lines · Maxim Levitsky
Quoted 111 lines · Takashi Iwai

At Fri, 16 Nov 2007 17:50:09 +0200,

Quoted 81 lines · Maxim Levitsky
Quoted 24 lines · Takashi Iwai

At Thu, 1 Nov 2007 20:17:30 +0200,

Quoted 13 lines · Maxim Levitsky
Quoted 11 lines · On Thursday 01 November 2007 19:47:39 Chuck Ebbert wrote:

We have two reports now of unstable volume levels:

https://bugzilla.redhat.com/show_bug.cgi?id=361051
https://bugzilla.redhat.com/show_bug.cgi?id=354981

This is with kernel 2.6.23 plus the two ALSA merge patches from 2.6.23-rc1.
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

Quoted 3 lines

Probably this isn't a software bug.
Probably this chip country to datasheet doesn't have usable "Master Volume" (volume knob) control.

I got a bug report that the same symptom appears also with STAC9221.

	http://bugzilla.kernel.org/show_bug.cgi?id=9374
Quoted 8 lines

Maybe we need add whitelist / blacklist for this feature?

On which codec/machine is this feature confirmed to work?

thanks,

Takashi

Hi,

Yes, it seems that volume knob has troubles.

I have it with STAC9227. Obivosly it works

I know a user that first complained about some problems, but then he found that everything works ok, probably including the volknob.

He has STAC9274, and we had a long disscussion about new features I intruduced,
He said that everything is OK.
I ask him explictly about that.

Now remember the report about conflict between my
'Master Volume' and already existing one?

This was a STAC922x, and the autor said that now his mulimedia keys can again control the volume (Probably this indicates that volumekknob is working)

Thus we have 4 groups of STACS:

1 - STAC9250 - lot of troubles - (I would be very happpy to hear from anybody here that has it)

2- STAC9221/2 - I thought that it works, but not anymore 3- STAC9227/8/9 - I have it, so I hope that it works
4- STAC927x - very simular to above, and one user that tells that it works.

I suggest to wait a bit more to see the scale of this bug (After all it isn't that big bug, it is just a feature :-) that isn't working)

The datasheets mention briefly that an external volume control can be connected to the chip. Maybe it affects the volumeknob.
If this is the case, then probably we ether need to detect it, or drop the whole thing.
(Those external pins probably are just connected to the groung or somethibg like that so no real external volumeknob is present, but they still mess the internal VolumeKnob)

Quoted 8 lines

Blacklist can help, but it is probably too much for that feature, since the VolumeKnob doesn't add anything very special, and can be emulated with SoftVol plugin, like it is done now.

There are several solutions:

1) Rename it to say 'VolumeKnob", so the users that have it broken won't notice , but still driver will expose all controls of hardware.

But even a different name control may have a similar effect. After all, it's exposed as a mixer element, and the mixer app may choose it as well.

Quoted 1 line

2) Make a module param that will enable/disable it

I don't like to add a codec-specific module option, so far.

Quoted 1 line

3) Remove it completly, OK, but probably the #1 is better

I think the safest way at this moment is to revert that once. Then we'll have a stable state as on 2.6.23.

On my local tree, there is a patch to add a virtual "Master" control to bind all volume controls. It's a driver-side implementation (no softvol plugin). So, when this patch is merged, we'll have a master control for STAC, anyway.

Quoted 6 lines
Quoted 2 lines

All depends on whenever this is a specific stac model bug Like I thought STAC9205, or this is the 'external volume' problem.

Or, it might be the conflict (a kind of race) between the software vol knob change and the hardware vol knob change. If so, it can explain why one STAC9221 works and another STAC9221 doesn't.

Thats exactly what I have said, but this is only a guess, I didn't see a statetment about that in datasheet.

Quoted 5 lines
Quoted 4 lines

If this is just STAC9205 and STAC9221 then we can make a module param, and make it enabled by default for STAC9227/8/9 STAC927x, but make it disabled for STAC9205 and STAC9221

Quoted 8 lines
Quoted 5 lines

I got a bug report (from Linus himself) that once the driver with 9227 didn't work during 2.6.24-rc1 update. And magically started again working during bisecting. I couldn't spot the culprit (the volknob value looked OK), but my suspect is the volknob, judging from the situation.

You mean it was connected to instable volume too? If that is true, and due to the fact that I have STAC9227, probably it is a conflict with hardware volume.

I'm not 100% sure about it but just a wild guess. The volume knob and the analog loopback were only changes that may affect, and from the nature of the problem, the volknob looks more suspicious.

Quoted 7 lines
Quoted 3 lines
Quoted 1 line

If not, then it is better to remove it/remame to VolumeKnob

Agreed. I'd like to take a safer way if you don't insist...

Great, it is probably the best to have a virtual master volume. Just one question, it will be probably enabled for devices that don't have a master volume (or have it broken like the STAC), right?,
And when you expect it to be merged?

Hopefully will be posted in this week after a small brush up.

Quoted 2 lines

So I agree completly, revert it, and lets forget about that VolumeKnob. Sorry for the trouble :-)

OK, now reverted on HG tree.
This should be really go to 2.6.24... Jaroslav, could you take any action please?

thanks,

Takashi

#18 lore raw

RFC 1/1 virtual master control (1/3)

At Mon, 19 Nov 2007 12:13:28 +0100,

Quoted 10 lines · I wrote:
Quoted 8 lines
Quoted 4 lines
Quoted 2 lines

If not, then it is better to remove it/remame to VolumeKnob

Agreed. I'd like to take a safer way if you don't insist...

Great, it is probably the best to have a virtual master volume. Just one question, it will be probably enabled for devices that don't have a master volume (or have it broken like the STAC), right?,
And when you expect it to be merged?

Hopefully will be posted in this week after a small brush up.

OK, here is a series of the patch I promised.

The first one is the patch to add virtual master controls.

===

[PATCH] Add virtual master control

This patch adds the routines to create virtual master controls. A virtual master control can have multiple slave controls that are supposed to be identical type. The master volume will add the master attenuation and the master switch will add the master mute switch.

---

core/Kconfig +3 -0
diff -r 56fbe685f99d core/Kconfig
@@ -15,6 +15,9 @@ config SND_RAWMIDI
 config SND_RAWMIDI
 	tristate
 	depends on SND
+
+config SND_VMASTER
+	bool
 
 config SND_SEQUENCER
 	tristate "Sequencer support"
core/Makefile +1 -0
diff -r 56fbe685f99d core/Makefile
@@ -6,6 +6,7 @@ snd-y     := sound.o init.o memory.o inf
 snd-y     := sound.o init.o memory.o info.o control.o misc.o device.o
 snd-$(CONFIG_ISA_DMA_API) += isadma.o
 snd-$(CONFIG_SND_OSSEMUL) += sound_oss.o info_oss.o
+snd-$(CONFIG_SND_VMASTER) += vmaster.o
 
 snd-pcm-objs := pcm.o pcm_native.o pcm_lib.o pcm_timer.o pcm_misc.o \
 		pcm_memory.o
core/vmaster.c new file +323 -0

323 lines not on this page · raw message

include/control.h +8 -0
diff -r 56fbe685f99d include/control.h
@@ -169,4 +169,12 @@ int snd_ctl_boolean_stereo_info(struct s
 int snd_ctl_boolean_stereo_info(struct snd_kcontrol *kcontrol,
 				struct snd_ctl_elem_info *uinfo);
 
+/*
+ * virtual master control
+ */
+struct snd_kcontrol *snd_ctl_make_virtual_master(char *name,
+						 const unsigned int *tlv);
+int snd_ctl_add_slave(struct snd_kcontrol *master, struct snd_kcontrol *slave);
+		      
+
 #endif	/* __SOUND_CONTROL_H */
#19 lore raw

RFC 1/1 virtual master control (2/3)

[PATCH] Add virtual master controls HD-audio

Create virtual "Master" controls automatically when not exists on some known codecs.

---

pci/Kconfig +3 -0
diff -r 861c951ac951 pci/Kconfig
@@ -512,6 +512,7 @@ config SND_HDA_CODEC_REALTEK
 config SND_HDA_CODEC_REALTEK
 	bool "Build Realtek HD-audio codec support"
 	depends on SND_HDA_INTEL
+	select SND_VMASTER
 	default y
 	help
 	  Say Y here to include Realtek HD-audio codec support in
@@ -520,6 +521,7 @@ config SND_HDA_CODEC_ANALOG
 config SND_HDA_CODEC_ANALOG
 	bool "Build Analog Device HD-audio codec support"
 	depends on SND_HDA_INTEL
+	select SND_VMASTER
 	default y
 	help
 	  Say Y here to include Analog Device HD-audio codec support in
@@ -528,6 +530,7 @@ config SND_HDA_CODEC_SIGMATEL
 config SND_HDA_CODEC_SIGMATEL
 	bool "Build IDT/Sigmatel HD-audio codec support"
 	depends on SND_HDA_INTEL
+	select SND_VMASTER
 	default y
 	help
 	  Say Y here to include IDT (Sigmatel) HD-audio codec support in
pci/hda/hda_codec.c +62 -0

68 lines not on this page · raw message

pci/hda/hda_local.h +7 -0
diff -r 861c951ac951 pci/hda/hda_local.h
@@ -90,6 +90,13 @@ void snd_hda_codec_resume_amp(struct hda
 void snd_hda_codec_resume_amp(struct hda_codec *codec);
 #endif
 
+void snd_hda_set_vmaster_tlv(struct hda_codec *codec, hda_nid_t nid, int dir,
+			     unsigned int *tlv);
+struct snd_kcontrol *snd_hda_find_mixer_ctl(struct hda_codec *codec,
+					    const char *name);
+int snd_hda_add_vmaster(struct hda_codec *codec, char *name,
+			unsigned int *tlv, const char **slaves);
+
 /* amp value bits */
 #define HDA_AMP_MUTE	0x80
 #define HDA_AMP_UNMUTE	0x00
pci/hda/patch_analog.c +69 -0

129 lines not on this page · raw message

pci/hda/patch_realtek.c +92 -19

212 lines not on this page · raw message

pci/hda/patch_sigmatel.c +48 -0

65 lines not on this page · raw message

#20 lore raw

Re: [RFC] virtual master control (3/3)

[PATCH] AC97 virtual master control

This patch adds the virtual master control to AC97-related drivers. It's needed for surround outputs.
At this moment, it's added when vmaster=1 option is given to either snd-intel8x0, snd-atiixp or snd-via82xx driver.

For automatic addition of vmaster control, we'll need to resolve the following

- whether the vmaster is really needed (most machines have only front output)
- disable AD-mode on AD codecs (to back to the normal AC97 volume control mode)

---

include/ac97_codec.h +1 -0
diff -r 5c48888d1307 include/ac97_codec.h
@@ -595,6 +595,7 @@ struct ac97_quirk {
 
 int snd_ac97_tune_hardware(struct snd_ac97 *ac97, struct ac97_quirk *quirk, const char *override);
 int snd_ac97_set_rate(struct snd_ac97 *ac97, int reg, unsigned int rate);
+int snd_ac97_add_vmaster(struct snd_ac97 *ac97);
 
 /*
  * PCM allocation
pci/Kconfig +3 -0
diff -r 5c48888d1307 pci/Kconfig
@@ -59,6 +59,7 @@ config SND_ATIIXP
 	tristate "ATI IXP AC97 Controller"
 	depends on SND
 	select SND_AC97_CODEC
+	select SND_VMASTER
 	help
 	  Say Y here to include support for the integrated AC97 sound
 	  device on motherboards with ATI chipsets (ATI IXP 150/200/250/
@@ -664,6 +665,7 @@ config SND_INTEL8X0
 	tristate "Intel/SiS/nVidia/AMD/ALi AC97 Controller"
 	depends on SND
 	select SND_AC97_CODEC
+	select SND_VMASTER
 	help
 	  Say Y here to include support for the integrated AC97 sound
 	  device on motherboards with Intel/SiS/nVidia/AMD chipsets, or
@@ -835,6 +837,7 @@ config SND_VIA82XX
 	depends on SND
 	select SND_MPU401_UART
 	select SND_AC97_CODEC
+	select SND_VMASTER
 	help
 	  Say Y here to include support for the integrated AC97 sound
 	  device on motherboards with VIA chipsets.
pci/ac97/ac97_codec.c +59 -0

65 lines not on this page · raw message

pci/atiixp.c +5 -0
diff -r 5c48888d1307 pci/atiixp.c
@@ -46,6 +46,7 @@ static char *ac97_quirk;
 static char *ac97_quirk;
 static int spdif_aclink = 1;
 static int ac97_codec = -1;
+static int vmaster;
 
 module_param(index, int, 0444);
 MODULE_PARM_DESC(index, "Index value for ATI IXP controller.");
@@ -59,6 +60,8 @@ MODULE_PARM_DESC(ac97_codec, "Specify co
 MODULE_PARM_DESC(ac97_codec, "Specify codec instead of probing.");
 module_param(spdif_aclink, bool, 0444);
 MODULE_PARM_DESC(spdif_aclink, "S/PDIF over AC-link.");
+module_param(vmaster, bool, 0444);
+MODULE_PARM_DESC(vmaster, "Add a virtual master volume if needed.");
 
 /* just for backward compatibility */
 static int enable;
@@ -1442,6 +1445,8 @@ static int __devinit snd_atiixp_mixer_ne
 	}
 
 	snd_ac97_tune_hardware(chip->ac97[0], ac97_quirks, quirk_override);
+	if (vmaster)
+		snd_ac97_add_vmaster(chip->ac97[0]);
 
 	return 0;
 }
pci/intel8x0.c +5 -0
diff -r 5c48888d1307 pci/intel8x0.c
@@ -72,6 +72,7 @@ static int buggy_irq = -1; /* auto-check
 static int buggy_irq = -1; /* auto-check */
 static int xbox;
 static int spdif_aclink = -1;
+static int vmaster;
 
 module_param(index, int, 0444);
 MODULE_PARM_DESC(index, "Index value for Intel i8x0 soundcard.");
@@ -89,6 +90,8 @@ MODULE_PARM_DESC(xbox, "Set to 1 for Xbo
 MODULE_PARM_DESC(xbox, "Set to 1 for Xbox, if you have problems with the AC'97 codec detection.");
 module_param(spdif_aclink, int, 0444);
 MODULE_PARM_DESC(spdif_aclink, "S/PDIF over AC-link.");
+module_param(vmaster, bool, 0444);
+MODULE_PARM_DESC(vmaster, "Add a virtual master volume if needed.");
 
 /* just for backward compatibility */
 static int enable;
@@ -2149,6 +2152,8 @@ static int __devinit snd_intel8x0_mixer(
 	}
 	/* tune up the primary codec */
 	snd_ac97_tune_hardware(chip->ac97[0], ac97_quirks, quirk_override);
+	if (vmaster)
+		snd_ac97_add_vmaster(chip->ac97[0]);
 	/* enable separate SDINs for ICH4 */
 	if (chip->device_type == DEVICE_INTEL_ICH4)
 		pbus->isdin = 1;
pci/via82xx.c +5 -0
diff -r 5c48888d1307 pci/via82xx.c
@@ -86,6 +86,7 @@ static int ac97_clock = 48000;
 static int ac97_clock = 48000;
 static char *ac97_quirk;
 static int dxs_support;
+static int vmaster;
 
 module_param(index, int, 0444);
 MODULE_PARM_DESC(index, "Index value for VIA 82xx bridge.");
@@ -103,6 +104,8 @@ MODULE_PARM_DESC(ac97_quirk, "AC'97 work
 MODULE_PARM_DESC(ac97_quirk, "AC'97 workaround for strange hardware.");
 module_param(dxs_support, int, 0444);
 MODULE_PARM_DESC(dxs_support, "Support for DXS channels (0 = auto, 1 = enable, 2 = disable, 3 = 48k only, 4 = no VRA, 5 = enable any sample rate)");
+module_param(vmaster, bool, 0444);
+MODULE_PARM_DESC(vmaster, "Add a virtual master volume if needed.");
 
 /* just for backward compatibility */
 static int enable;
@@ -1820,6 +1823,8 @@ static int __devinit snd_via82xx_mixer_n
 		return err;
 
 	snd_ac97_tune_hardware(chip->ac97, ac97_quirks, quirk_override);
+	if (vmaster)
+		snd_ac97_add_vmaster(chip->ac97);
 
 	if (chip->chip_type != TYPE_VIA686) {
 		/* use slot 10/11 */
#21 lore raw

RFC 1/1 virtual master control - alsa-driver stub

And this patch is to alsa-driver to build vmaster feature.

Takashi

acore/vmaster.c new file +2 -0
diff -r 06162eef8936 acore/vmaster.c
@@ -0,0 +1,2 @@
+#define __NO_VERSION__
+#include "../alsa-kernel/core/vmaster.c"
#22 lore raw

Re: [RFC] virtual master control (1/3)

In reply to Takashi Iwai
Quoted 21 lines · Takashi Iwai

At Mon, 19 Nov 2007 12:13:28 +0100,

Quoted 10 lines · I wrote:
Quoted 8 lines
Quoted 4 lines
Quoted 2 lines

If not, then it is better to remove it/remame to VolumeKnob

Agreed. I'd like to take a safer way if you don't insist...

Great, it is probably the best to have a virtual master volume. Just one question, it will be probably enabled for devices that don't have a master volume (or have it broken like the STAC), right?,
And when you expect it to be merged?

Hopefully will be posted in this week after a small brush up.

OK, here is a series of the patch I promised.

The first one is the patch to add virtual master controls.

===

[PATCH] Add virtual master control

Quoted 7 lines

This patch adds the routines to create virtual master controls. A virtual master control can have multiple slave controls that are supposed to be identical type. The master volume will add the master attenuation and the master switch will add the master mute switch.

---

I'm really not sure if I like to see such extensions in kernel. We have now user control elements and a small daemon written in C or python will do exactly same job and will be more flexible.

Jaroslav

-----
Jaroslav Kysela <[email protected]>
Linux Kernel Sound Maintainer
ALSA Project

#23 lore raw

Re: [RFC] virtual master control (1/3)

Quoted 29 lines · On Friday 23 November 2007 20:36:32 Jaroslav Kysela wrote:
Quoted 27 lines · Takashi Iwai

At Mon, 19 Nov 2007 12:13:28 +0100,

Quoted 10 lines · I wrote:
Quoted 8 lines
Quoted 4 lines
Quoted 2 lines

If not, then it is better to remove it/remame to VolumeKnob

Agreed. I'd like to take a safer way if you don't insist...

Great, it is probably the best to have a virtual master volume. Just one question, it will be probably enabled for devices that don't have a master volume (or have it broken like the STAC), right?,
And when you expect it to be merged?

Hopefully will be posted in this week after a small brush up.

OK, here is a series of the patch I promised.

The first one is the patch to add virtual master controls.

===

[PATCH] Add virtual master control

This patch adds the routines to create virtual master controls. A virtual master control can have multiple slave controls that are supposed to be identical type. The master volume will add the master attenuation and the master switch will add the master mute switch.

Quoted 7 lines
Quoted 1 line

---

I'm really not sure if I like to see such extensions in kernel. We have now user control elements and a small daemon written in C or python will do exactly same job and will be more flexible.

Jaroslav

Hi,

Well, first big thanks for those patches.

Secondary I strongly disagree that the above can be implemented in userspace easily. Sure you can have a program that adjusts the volume of all outputs, and creates a virtual userspace control, but the change in volume of outputs will be visible to userspace. For example moving the master volume will move the front/surround/LFE/.... sliders, and it is no good.

What this patch does, it actually modifies the code for those 'slave' amps, so the master volume is taken in account.

I will test it now on my system.

I hope this gets merged,
Best regards,
Maxim Levitsky

#24 lore raw

Re: [RFC] virtual master control (1/3)

In reply to Jaroslav Kysela

At Fri, 23 Nov 2007 19:36:32 +0100 (CET),

Quoted 30 lines · Jaroslav Kysela
Quoted 27 lines · Takashi Iwai

At Mon, 19 Nov 2007 12:13:28 +0100,

Quoted 10 lines · I wrote:
Quoted 8 lines
Quoted 4 lines
Quoted 2 lines

If not, then it is better to remove it/remame to VolumeKnob

Agreed. I'd like to take a safer way if you don't insist...

Great, it is probably the best to have a virtual master volume. Just one question, it will be probably enabled for devices that don't have a master volume (or have it broken like the STAC), right?,
And when you expect it to be merged?

Hopefully will be posted in this week after a small brush up.

OK, here is a series of the patch I promised.

The first one is the patch to add virtual master controls.

===

[PATCH] Add virtual master control

This patch adds the routines to create virtual master controls. A virtual master control can have multiple slave controls that are supposed to be identical type. The master volume will add the master attenuation and the master switch will add the master mute switch.

Quoted 5 lines
Quoted 1 line

---

I'm really not sure if I like to see such extensions in kernel. We have now user control elements and a small daemon written in C or python will do exactly same job and will be more flexible.

I've thought that a user-space solution would be appropriate, too. But, a requirement of a daemon is a very big disadvantage (I believe many people would dislike). A plugin-based solution is another idea, but it's also complex and hard to implement consistently (because many mixer apps open "hw" device as default).

What I suggested is the implementation of a quite trivial master control. Of course, it's not so flexible but it covers most of
hardwares. So much flexibility isn't needed in reality. The
convenience (for user and developer) is more important.

Takashi

#25 lore raw

Re: [RFC] virtual master control (1/3)

Quoted 28 lines · On Sat, 24 Nov 2007 11:12:07 +0100 "Takashi Iwai" <[email protected]> wrote:

At Fri, 23 Nov 2007 19:36:32 +0100 (CET),

Quoted 26 lines · Jaroslav Kysela
Quoted 12 lines · Takashi Iwai

At Mon, 19 Nov 2007 12:13:28 +0100,

Quoted 1 line · I wrote:

OK, here is a series of the patch I promised.

The first one is the patch to add virtual master controls.

===

[PATCH] Add virtual master control

Quoted 7 lines

This patch adds the routines to create virtual master controls. A virtual master control can have multiple slave controls that are supposed to be identical type. The master volume will add the master attenuation and the master switch will add the master mute switch.

---

I'm really not sure if I like to see such extensions in kernel. We have now user control elements and a small daemon written in C or python will do exactly same job and will be more flexible.

could you flesh this out a teeny bit more? I am interested in this alternative, but my experiences of the last year with also dont make me feel super optimistic about it.

Quoted 10 lines

I've thought that a user-space solution would be appropriate, too. But, a requirement of a daemon is a very big disadvantage (I believe many people would dislike). A plugin-based solution is another idea, but it's also complex and hard to implement consistently (because many mixer apps open "hw" device as default).

What I suggested is the implementation of a quite trivial master control. Of course, it's not so flexible but it covers most of
hardwares. So much flexibility isn't needed in reality. The
convenience (for user and developer) is more important.

I strongly favor this approach. I am interested in learning more about Jaroslav's daemon idea, but at this time it would need to really pleasantly surprise me for me to feel like it would be a better idea.

FWIW, i would be strongly opposed to making it a plugin. While i am very impressed with the technology of the plugin architecture, it's need to have all sound apps linked with alsalib for it to work poses significant complexity for both developers and users.

just my $us 0.02;

johnu

Quoted 7 lines

Takashi
_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel