CVS: BEFORE REVERT [SUCCESS] C-Media CMI9761 -A- type, WORKING MASTER, PCM ON 1. DXS SLIDER!
mom.. guys, its working yet!
just build this cvs revision (first -A- type changes):
schorpp@tom1:/usr/src/alsa/alsa-kernel/pci/ac97$ cvs status |grep revision cvs status: Examining . Working revision: 1.15 Repository revision: 1.15 /cvsroot/alsa/alsa-kernel/pci/ac97/Makefile,v Working revision: 1.171 Repository revision: 1.171 /cvsroot/alsa/alsa-kernel/pci/ac97/ac97_codec.c,v Working revision: 1.10 Repository revision: 1.10 /cvsroot/alsa/alsa-kernel/pci/ac97/ac97_id.h,v Working revision: 1.12 Repository revision: 1.12 /cvsroot/alsa/alsa-kernel/pci/ac97/ac97_local.h,v Working revision: 1.73 Repository revision: 1.73 /cvsroot/alsa/alsa-kernel/pci/ac97/ac97_patch.c,v Working revision: 1.18 Repository revision: 1.18 /cvsroot/alsa/alsa-kernel/pci/ac97/ac97_patch.h,v Working revision: 1.20 Repository revision: 1.20 /cvsroot/alsa/alsa-kernel/pci/ac97/ac97_pcm.c,v Working revision: 1.13 Repository revision: 1.13 /cvsroot/alsa/alsa-kernel/pci/ac97/ac97_proc.c,v Working revision: 1.15 Repository revision: 1.15 /cvsroot/alsa/alsa-kernel/pci/ac97/ak4531_codec.c,v schorpp@tom1:/usr/src/alsa/alsa-kernel/pci/ac97$
after modprobe
- arts works with pcm fine
- working master vol slider(!) (kmix)
- working pcm vol regulation on 1. dxs slider (rest 3 no sound reaction)
... further tesing...
great work so far! thank you :))
...
Quoted 10 lines · Takashi Iwai
Update of /cvsroot/alsa/alsa-kernel/pci/ac97
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2615Modified Files:
ac97_codec.c ac97_patch.c ac97_patch.hLog Message:
Summary: Fix CM9761 againRevert the last addition for CM9761A support. The codec doesn't support the real control of Master
yes, it does fine for my chip , sorry.
/PCM volumes, too.
with 1. dxs slider at this rev.
Quoted 2 lines
Instead, fixed the default multi-channel register setting now.
why?
not verified. source of info? are you sure thats the -A- type, you got for testing? who verified?
oops! sound gone after doing this:
tom1:~# cat /proc/asound/card0/codec97#0/* 0-0/0: C-Media Electronics CMI9761A
Revision : 0x01
Compat. Class : 0x03
Subsys. Vendor ID: 0xffff
Subsys. ID : 0xffff
Capabilities : DAC resolution : 16-bit ADC resolution : 16-bit 3D enhancement : No 3D Stereo Enhancement
Current setup
Mic gain : +0dB [+0dB]
POP path : pre 3D
Sim. stereo : off
3D enhancement : off Loudness : off Mono output : MIX Mic select : Mic1
ADC/DAC loopback : off
Double rate slots: 10/11
Extended ID : codec=0 rev=2 AMAP LDAC SDAC CDAC DSA=0 DRA
Extended status : SPCV LDAC SDAC CDAC
0:00 = 0000
0:02 = 0000
0:04 = 0000
0:06 = 0000
0:08 = 0000
0:0a = 801e
0:0c = 0000
0:0e = 9f1f
0:10 = 9f1f
0:12 = 0505
0:14 = 0000
0:16 = 9a1a
0:18 = 0808
0:1a = 0000
0:1c = 0303
0:1e = 0000
0:20 = 0000
0:22 = 0000
0:24 = 0000
0:26 = 000f
0:28 = 0bc2
0:2a = 05f0
0:2c = 0000
0:2e = 0000
0:30 = 0000
0:32 = 0000
0:34 = 0000
0:36 = 8080
0:38 = 8080
0:3a = 2000
0:3c = 0000
0:3e = 0000
0:40 = 0000
0:42 = 0000
0:44 = 0000
0:46 = 0000
0:48 = 0000
0:4a = 0000
0:4c = 0000
0:4e = 0000
0:50 = 0000
0:52 = 0000
0:54 = 0000
0:56 = 0000
0:58 = 0000
0:5a = 0000
0:5c = 0004
0:5e = 0000
0:60 = 0000
0:62 = 0000
0:64 = 3038
0:66 = 0012
0:68 = 0000
0:6a = 0000
0:6c = 0000
0:6e = 0000
0:70 = 0100
0:72 = 0000
0:74 = c000
0:76 = 4f56
0:78 = 0000
0:7a = 0000
0:7c = 434d
0:7e = 4983
tom1:~#
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
Re: Re: [alsa-cvslog] CVS: BEFORE REVERT [SUCCESS] C-Media CMI9761 -A- type, TESTING 01
Quoted 8 lines · thomas schorpp
after modprobe
- arts works with pcm fine
- working master vol slider(!) (kmix)
- working pcm vol regulation on 1. dxs slider (rest 3 no sound reaction)... further tesing...
a) oss-apps sound on DXS slider nr 2 (xmms , /dev/mixer , dsp)
only discrete access to /dev/mixer (on/off), see if i can fix that (add pcm slider again, reading diff to 2.6.0)
suggest no fixed status without reaching that.
y
tom
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
Re: Re: [alsa-cvslog] CVS: BEFORE REVERT [SUCCESS] C-Media CMI9761 -A- type, TESTING 01
Quoted 6 lines · thomas schorpp
a) oss-apps sound on DXS slider nr 2 (xmms ,
/dev/mixer, dsp)only discrete access to
/dev/mixer(on/off), see if i can fix that (add pcm slider again, reading diff to 2.6.0)suggest no fixed status without reaching that.
This can't be fixed. The softvol plugin won't work with the in-kernel OSS emulation.
Lee
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
Re: Re: [alsa-cvslog] CVS: AFTER REVERT [FAILURE] C-Media CMI9761 -A- type, TESTING 01
In reply to thomas schorppb) now tried head revisions:
results:
-pcm failure. only lines are looped through and regulateable. -no more master vol slider and no pcm vol slider in kmix.
suggest rollback -1.
i'll give it a try tonight, rollback and adding missing pcm vol slider.
pls verify (more info needed?)(MB asrock K7VT4A+ REV.1.01(?)):
schorpp@tom1:/usr/src/alsa/alsa-kernel/pci/ac97$ cvs status | grep revision cvs status: Examining . Working revision: 1.15 Repository revision: 1.15 /cvsroot/alsa/alsa-kernel/pci/ac97/Makefile,v Working revision: 1.172 Repository revision: 1.172 /cvsroot/alsa/alsa-kernel/pci/ac97/ac97_codec.c,v Working revision: 1.10 Repository revision: 1.10 /cvsroot/alsa/alsa-kernel/pci/ac97/ac97_id.h,v Working revision: 1.12 Repository revision: 1.12 /cvsroot/alsa/alsa-kernel/pci/ac97/ac97_local.h,v Working revision: 1.74 Repository revision: 1.74 /cvsroot/alsa/alsa-kernel/pci/ac97/ac97_patch.c,v Working revision: 1.19 Repository revision: 1.19 /cvsroot/alsa/alsa-kernel/pci/ac97/ac97_patch.h,v Working revision: 1.20 Repository revision: 1.20 /cvsroot/alsa/alsa-kernel/pci/ac97/ac97_pcm.c,v Working revision: 1.13 Repository revision: 1.13 /cvsroot/alsa/alsa-kernel/pci/ac97/ac97_proc.c,v Working revision: 1.15 Repository revision: 1.15 /cvsroot/alsa/alsa-kernel/pci/ac97/ak4531_codec.c,v schorpp@tom1:/usr/src/alsa/alsa-kernel/pci/ac97$
tom1:~# cat /proc/asound/card0/codec97#0/* 0-0/0: C-Media Electronics CMI9761
Revision : 0x01
Compat. Class : 0x03
Subsys. Vendor ID: 0xffff
Subsys. ID : 0xffff
Capabilities : DAC resolution : 16-bit ADC resolution : 16-bit 3D enhancement : No 3D Stereo Enhancement
Current setup
Mic gain : +0dB [+0dB]
POP path : pre 3D
Sim. stereo : off
3D enhancement : off Loudness : off Mono output : MIX Mic select : Mic1
ADC/DAC loopback : off
Double rate slots: 10/11
Extended ID : codec=0 rev=2 AMAP LDAC SDAC CDAC DSA=0 DRA
Extended status : SPCV LDAC SDAC CDAC SPDIF
0:00 = 0000
0:02 = 0000
0:04 = 0000
0:06 = 0000
0:08 = 0000
0:0a = 801e
0:0c = 0000
0:0e = 9f1f
0:10 = 9f1f
0:12 = 1717
0:14 = 0000
0:16 = 1b1b
0:18 = 0808
0:1a = 0000
0:1c = 0000
0:1e = 0000
0:20 = 0000
0:22 = 0000
0:24 = 0000
0:26 = 000f
0:28 = 0bc2
0:2a = 05f4
0:2c = 0000
0:2e = 0000
0:30 = 0000
0:32 = 0000
0:34 = 0000
0:36 = 8080
0:38 = 8080
0:3a = 2a20
0:3c = 0000
0:3e = 0000
0:40 = 0000
0:42 = 0000
0:44 = 0000
0:46 = 0000
0:48 = 0000
0:4a = 0000
0:4c = 0000
0:4e = 0000
0:50 = 0000
0:52 = 0000
0:54 = 0000
0:56 = 0000
0:58 = 0000
0:5a = 0000
0:5c = 0004
0:5e = 0000
0:60 = 0000
0:62 = 0000
0:64 = 3038
0:66 = 0012
0:68 = 0000
0:6a = 0000
0:6c = 0209
0:6e = 0000
0:70 = 0100
0:72 = 0000
0:74 = c000
0:76 = 4e56
0:78 = 0000
0:7a = 0000
0:7c = 434d
0:7e = 4983
tom1:~#
tom1:~#
0000:00:11.5 Multimedia audio controller: VIA Technologies, Inc. VT8233/A/8235/8237 AC97 Audio Controller (rev 50)
Subsystem: Unknown device 1849:9761
Flags: medium devsel, IRQ 185
I/O ports at cc00 [size=256]
Capabilities: [c0] Power Management version 2
0000:00:11.5 0401: 1106:3059 (rev 50)
Subsystem: 1849:9761
Flags: medium devsel, IRQ 185
I/O ports at cc00 [size=256]
Capabilities: [c0] Power Management version 2
pci bus 0x0000 cardnum 0x11 function 0x05: vendor 0x1106 device 0x3059
VIA Technologies, Inc. VT8233/A/8235 AC97 Audio Controller CardVendor 0x1849 card 0x9761 (Card unknown)
STATUS 0x0210 COMMAND 0x0001 CLASS 0x04 0x01 0x00 REVISION 0x50 BIST 0x00 HEADER 0x00 LATENCY 0x00 CACHE 0x00 BASE0 0x0000cc01 addr 0x0000cc00 I/O MAX_LAT 0x00 MIN_GNT 0x00 INT_PIN 0x03 INT_LINE 0x09 BYTE_0 0x01 BYTE_1 0xcd BYTE_2 0x00 BYTE_3 0x00
tom
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
At Wed, 16 Feb 2005 22:29:40 +0100,
Quoted 4 lines · thomas schorpp
- arts works with pcm fine
- working master vol slider(!) (kmix)
- working pcm vol regulation on 1. dxs slider (rest 3 no sound reaction)
(snip)
Quoted 6 lines
Quoted 2 lines
Revert the last addition for CM9761A support. The codec doesn't support the real control of Master
yes, it does fine for my chip , sorry.
/PCM volumes, too.
Hmm, I'm really confused. Both the comments above look contradictionary.
Let me ask again: In the older version, does PCM volume work, that is, it really changes the output volume (not only mute/unmute)? Does Master volume work as well on your chip?
Note that the Master and PCM volumes are _removed_ because they don't work and are only confusing. It's intentional. They _must_ disappear in the latest version.
If CM9761-A- provides the real PCM/Master volume control, we should get them back again. But, this essential information has been
missing. Please let me know _this_ clearly above all subtle things!
Quoted 6 lines
Quoted 2 lines
Instead, fixed the default multi-channel register setting now.
why?
not verified. source of info? are you sure thats the -A- type, you got for testing? who verified?
Very much confision of debug information...
Quoted 1 line
oops! sound gone after doing this:
How about the attached patch?
Takashi
Index: alsa-kernel/pci/ac97/ac97_patch.c
===================================================================
RCS file: /suse/tiwai/cvs/alsa/alsa-kernel/pci/ac97/ac97_patch.c,v retrieving revision 1.76
pci/ac97/ac97_patch.c +2 -2
@@ -2038,8 +2038,8 @@/* CM9761 has no Master and PCM volume although the register reacts */ ac97->flags |=AC97_HAS_NO_MASTER_VOL |AC97_HAS_NO_PCM_VOL ; -snd_ac97_write_cache (ac97,AC97_MASTER ,0x8000 ); -snd_ac97_write_cache (ac97,AC97_PCM ,0x8000 ); +snd_ac97_write_cache (ac97,AC97_MASTER ,0x8808 ); +snd_ac97_write_cache (ac97,AC97_PCM ,0x8808 ); ac97->spec.dev_flags =0 ;/* 1 = model 82 revision B */ if (ac97->id ==AC97_ID_CM9761_82 ) {
Quoted 14 lines · Takashi Iwai
At Wed, 16 Feb 2005 22:29:40 +0100,
Quoted 3 lines · thomas schorpp
- arts works with pcm fine
- working master vol slider(!) (kmix)
- working pcm vol regulation on 1. dxs slider (rest 3 no sound reaction)(snip)
Quoted 3 lines
Quoted 2 lines
Revert the last addition for CM9761A support. The codec doesn't support the real control of Master
Quoted 7 lines
Quoted 3 lines
yes, it does fine for my chip , sorry.
/PCM volumes, too.
Hmm, I'm really confused. Both the comments above look contradictionary.
me too ;). so let me first excuse for that "thing" i called patch v0.1 tonight. im sorry i cant afford a prebuild-kernel distributors requirements and better read your comprehensive docs on the homepage before coding again. i thank you again for getting my chip to work based on 1.73 cvs. i can live with custom patched kernels for my own needs.
although i would gladly help you out by providing verified infos on this newer chip 1000s of users may have got, so you can work out a common solution.
so much for priorities and requirements.
Quoted 4 lines
Let me ask again: In the older version, does PCM volume work, that is, it really changes the output volume (not only mute/unmute)? Does Master volume work as well on your chip?
which version? i repeat my notices from tonight:
2.6.10 kernel.org kernel:
- master vol slider drives real volume at least for looped through lines. (dont know if a real hardware gain driver exists, i cant find the list mentioned sw volume code.)
- master pcm slider exists but seems no affect, but typical hardware switching noise on enable/disable knob
- no output on pcm dac audio (tried workarounds for hours)
patch.c cvs rev 1.73 et al:
- master vol slider drives real volume for looped through lines. no affect on pcm. -alsa pcm volume working on dxs 1 slider.
-oss pcm volume working on dxs 2 slider.
- master pcm slider missing. (which code determines this?)
rev 1.74:
- master / pcm sliders missing, cant affect any volumes, lines looped through, input regulateable with cd and aux input sliders.
- pcm not working.
Quoted 10 lines
Note that the Master and PCM volumes are _removed_ because they don't work and are only confusing. It's intentional. They _must_ disappear in the latest version.
If CM9761-A- provides the real PCM/Master volume control, we should get them back again. But, this essential information has been
missing. Please let me know _this_ clearly above all subtle things!
see above. "real" means hardware, yes?
btw: you got my 2 mails from tonight? windos driver reports rev 8D for this chip.
pls answer this question: what are those 32bit xxxxxxxx_rev ids? have you defined it?
where do you get it from the chip?
cant find the function asking the chip. ac97->id reads only defines doesnt it?
Quoted 10 lines
Quoted 7 lines
Quoted 4 lines
Instead, fixed the default multi-channel register setting now.
why?
not verified. source of info? are you sure thats the -A- type, you got for testing? who verified?Very much confision of debug information...
ok. you stated you got rev 83 mine should be 8d.
that would be clearer then.
Quoted 7 lines
Quoted 4 lines
oops! sound gone after doing this:
How about the attached patch?
would try it, but pls comment those reg bit setting(?) in short. you stated you got no register specs, is this guessed?
tom
Quoted 15 lines
Takashi
------------------------------------------------------------------------
Index:
alsa-kernel/pci/ac97/ac97_patch.c
===================================================================
RCS file: /suse/tiwai/cvs/alsa/alsa-kernel/pci/ac97/ac97_patch.c,v retrieving revision 1.76
diff -u -r1.76ac97_patch.c
pci/ac97/ac97_patch.c line 2045
Quoted 10 lines
pci/ac97/ac97_patch.c +2
-2@@ -2038,8 +2038,8 @@/* CM9761 has no Master and PCM volume although the register reacts */ ac97->flags |=AC97_HAS_NO_MASTER_VOL |AC97_HAS_NO_PCM_VOL ; - snd_ac97_write_cache(ac97, AC97_MASTER, XXXXXXX 0x8000 XXXXXXXXXX); <----(?) - snd_ac97_write_cache(ac97, AC97_PCM, 0x8000); +snd_ac97_write_cache (ac97,AC97_MASTER ,0x8808 ); +snd_ac97_write_cache (ac97,AC97_PCM ,0x8808 ); ac97->spec.dev_flags =0 ;/* 1 = model 82 revision B */ if (ac97->id ==AC97_ID_CM9761_82 ) {
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
At Thu, 17 Feb 2005 19:06:56 +0100,
Quoted 34 lines · thomas schorpp
Quoted 14 lines · Takashi Iwai
At Wed, 16 Feb 2005 22:29:40 +0100,
Quoted 3 lines · thomas schorpp
- arts works with pcm fine
- working master vol slider(!) (kmix)
- working pcm vol regulation on 1. dxs slider (rest 3 no sound reaction)(snip)
Quoted 3 lines
Quoted 2 lines
Revert the last addition for CM9761A support. The codec doesn't support the real control of Master
Quoted 7 lines
Quoted 3 lines
yes, it does fine for my chip , sorry.
/PCM volumes, too.
Hmm, I'm really confused. Both the comments above look contradictionary.
me too ;). so let me first excuse for that "thing" i called patch v0.1 tonight. im sorry i cant afford a prebuild-kernel distributors requirements and better read your comprehensive docs on the homepage before coding again. i thank you again for getting my chip to work based on 1.73 cvs. i can live with custom patched kernels for my own needs.
although i would gladly help you out by providing verified infos on this newer chip 1000s of users may have got, so you can work out a common solution.
Quoted 8 lines
so much for priorities and requirements.
Quoted 4 lines
Let me ask again: In the older version, does PCM volume work, that is, it really changes the output volume (not only mute/unmute)? Does Master volume work as well on your chip?
which version?
I meant the last working version you tried before (now I assume 2.6.10 kernel?)
Quoted 6 lines
i repeat my notices from tonight:
2.6.10 kernel.org kernel:
- master vol slider drives real volume at least for looped through lines. (dont know if a real hardware gain driver exists, i cant find the list mentioned sw volume code.)
The looped-through lines = analog inputs like Line, Mic, CD? And the Master volume does NOT affect the PCM playback volume?
Quoted 2 lines
- master pcm slider exists but seems no affect, but typical hardware switching noise on enable/disable knob
OK.
Quoted 1 line
- no output on pcm dac audio (tried workarounds for hours)
Err, with 2.6.10, you got no PCM playback output?
Quoted 3 lines
patch.ccvs rev 1.73 et al:
- master vol slider drives real volume for looped through lines. no affect on pcm.
So, it has no influence on PCM... Interesting.
Possibly there is a mysterious register bit switch to turn this on/off :) (For example, STAC9750/51 controls the PCM-bypass mode by misusing GENERAL_PURPOSE register bit 15.)
Review
Quoted 2 lines
(quoted diff) +0
-2-alsa pcm volume working on dxs 1 slider. -oss pcm volume working on dxs 2 slider.
The assignment of DXS channels are quite casual.
Quoted 1 line
- master pcm slider missing. (which code determines this?)
In ac97_codec.c:check_volume_resolution().
This means that AC97_PCM register returns only a certain value (0xX808). So, the expected behavior.
Quoted 3 lines
rev 1.74:
- master / pcm sliders missing, cant affect any volumes, lines looped through, input regulateable with cd and aux input sliders.
This is intentional.
Quoted 1 line
- pcm not working.
This is not :)
Quoted 10 lines
Quoted 8 lines
Note that the Master and PCM volumes are _removed_ because they don't work and are only confusing. It's intentional. They _must_ disappear in the latest version.
If CM9761-A- provides the real PCM/Master volume control, we should get them back again. But, this essential information has been
missing. Please let me know _this_ clearly above all subtle things!see above. "real" means hardware, yes?
Yes.
Quoted 2 lines
btw: you got my 2 mails from tonight? windos driver reports rev 8D for this chip.
Hmm? I see a string "REV_50" in the screenshot.
Quoted 1 line
pls answer this question: what are those 32bit
xxxxxxxx_revids?
Which value do you mean?
If it's ac97->id, this is just the combination of vendor_id1 (7c) and vondor_id2 (7e) registers as (vendor_id1<<16) | (device_id2). AFAIK, CM9761 has three different models and each of
them has different vendor ID2 value: 0x4978, 0x4982 and 0x4983. Yours looks like the last one.
Quoted 4 lines
have you defined it?
where do you get it from the chip?
cant find the function asking the chip.ac97->idreads only defines doesnt it?
I don't understand your question here.
Quoted 9 lines
Quoted 9 lines
Quoted 7 lines
Quoted 3 lines
Instead, fixed the default multi-channel register setting now.
why?
not verified. source of info? are you sure thats the -A- type, you got for testing? who verified?
Quoted 4 lines
Quoted 1 line
Very much confision of debug information...
ok. you stated you got rev 83 mine should be 8d.
that would be clearer then.
The value is just taken from the vendor_id2 register value (the lower byte).
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
oops! sound gone after doing this:
How about the attached patch?
would try it, but pls comment those reg bit setting(?) in short. you stated you got no register specs, is this guessed?
Yes, just a guess from cmedia's driver code and trial-and-error.
Takashi
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
Quoted 40 lines · Takashi Iwai
At Thu, 17 Feb 2005 19:06:56 +0100,
Quoted 37 lines · thomas schorpp
Quoted 16 lines · Takashi Iwai
At Wed, 16 Feb 2005 22:29:40 +0100,
Quoted 3 lines · thomas schorpp
- arts works with pcm fine
- working master vol slider(!) (kmix)
- working pcm vol regulation on 1. dxs slider (rest 3 no sound reaction)(snip)
Quoted 3 lines
Quoted 2 lines
Revert the last addition for CM9761A support. The codec doesn't support the real control of Master
Quoted 7 lines
Quoted 3 lines
yes, it does fine for my chip , sorry.
/PCM volumes, too.
Hmm, I'm really confused. Both the comments above look contradictionary.
me too ;). so let me first excuse for that "thing" i called patch v0.1 tonight. im sorry i cant afford a prebuild-kernel distributors requirements and better read your comprehensive docs on the homepage before coding again. i thank you again for getting my chip to work based on 1.73 cvs. i can live with custom patched kernels for my own needs.
although i would gladly help you out by providing verified infos on this newer chip 1000s of users may have got, so you can work out a common solution.
so much for priorities and requirements.
Quoted 3 lines
Let me ask again: In the older version, does PCM volume work, that is, it really changes the output volume (not only mute/unmute)? Does Master volume work as well on your chip?
Quoted 6 lines
Quoted 1 line
which version?
I meant the last working version you tried before (now I assume 2.6.10 kernel?)
changed motherboard, running 2.6.10.
Quoted 9 lines
Quoted 6 lines
i repeat my notices from tonight:
2.6.10 kernel.org kernel:
- master vol slider drives real volume at least for looped through
lines. (dont know if a real hardware gain driver exists, i cant find the list mentioned sw volume code.)The looped-through lines = analog inputs like Line, Mic, CD?
yes.
Quoted 1 line
And the Master volume does NOT affect the PCM playback volume?
does not on any version. just playing a clip with xmms (oss-iface) volume regulation only with dxs 2 slider. verified.
Quoted 4 lines
Quoted 4 lines
- master pcm slider exists but seems no affect, but typical hardware switching noise on enable/disable knob
on 2.6.10.
Quoted 9 lines
OK.
Quoted 1 line
- no output on pcm dac audio (tried workarounds for hours)
Err, with 2.6.10, you got no PCM playback output?
no output, verified with arts and xmms and xine, aplay warns about rate setting, ecasound with no complain messages.
Quoted 8 lines
Quoted 6 lines
patch.ccvs rev 1.73 et al:
- master vol slider drives real volume for looped through lines. no affect on pcm.
Quoted 4 lines
So, it has no influence on PCM... Interesting.
Possibly there is a mysterious register bit switch to turn this on/off :) (For example, STAC9750/51 controls the PCM-bypass mode by misusingGENERAL_PURPOSEregister bit 15.)
agree. due to hardware like clicking sound on enable/disable the slider, there should be hardware, good.
but how to find register and affecting bitsetting?
Quoted 7 lines
Review
Quoted 4 lines
(quoted diff) +0
-2-alsa pcm volume working on dxs 1 slider. -oss pcm volume working on dxs 2 slider.The assignment of DXS channels are quite casual.
not understood, got too few background on that.
Quoted 8 lines
Quoted 3 lines
- master pcm slider missing. (which code determines this?)
In ac97_codec.c:check_volume_resolution().
This means thatAC97_PCMregister returns only a certain value (0xX808). So, the expected behavior.
understood, thx.
Quoted 29 lines
Quoted 5 lines
rev 1.74:
- master / pcm sliders missing, cant affect any volumes, lines looped through, input regulateable with cd and aux input sliders.This is intentional.
Quoted 1 line
- pcm not working.
This is not :)
Quoted 10 lines
Quoted 8 lines
Note that the Master and PCM volumes are _removed_ because they don't work and are only confusing. It's intentional. They _must_ disappear in the latest version.
If CM9761-A- provides the real PCM/Master volume control, we should get them back again. But, this essential information has been
missing. Please let me know _this_ clearly above all subtle things!see above. "real" means hardware, yes?
Quoted 7 lines
Yes.
Quoted 1 line
btw: you got my 2 mails from tonight? windos driver reports rev 8D for this chip.
Hmm? I see a string "
REV_50" in the screenshot.
no. thats the vias rev:
0000:00:11.5 Multimedia audio controller: VIA Technologies, Inc. VT8233/A/8235/8237 AC97 Audio Controller (rev 50)
Subsystem: Unknown device 1849:9761
Quoted 6 lines
Quoted 3 lines
pls answer this question: what are those 32bit
xxxxxxxx_revids?Which value do you mean?
that:
#define AC97_ID_AK4540 0x414b4d00 <--- source? chip asked?
Quoted 6 lines
If it's
ac97->id, this is just the combination ofvendor_id1(7c) andvondor_id2(7e) registers as (vendor_id1<<16) | (device_id2). AFAIK, CM9761 has three different models and each of
them has different vendor ID2 value:0x4978,0x4982and0x4983. Yours looks like the last one.
i assume it should be 0x498d for mine then (windos driver screenshot).
Quoted 8 lines
Quoted 5 lines
have you defined it?
where do you get it from the chip?
cant find the function asking the chip.ac97->idreads only defines doesnt it?I don't understand your question here.
thx answered.
Quoted 10 lines
Quoted 10 lines
Quoted 10 lines
Quoted 8 lines
Quoted 5 lines
Instead, fixed the default multi-channel register setting now.
why?
not verified. source of info? are you sure thats the -A- type, you got for testing? who verified?
Quoted 8 lines
Quoted 4 lines
Quoted 1 line
Very much confision of debug information...
ok. you stated you got rev 83 mine should be 8d.
that would be clearer then.The value is just taken from the
vendor_id2register value (the lower byte).
ok.
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 3 lines
oops! sound gone after doing this:
Quoted 7 lines
Quoted 4 lines
Quoted 1 line
How about the attached patch?
would try it, but pls comment those reg bit setting(?) in short. you stated you got no register specs, is this guessed?
Yes, just a guess from cmedia's driver code and trial-and-error.
ok.
Quoted 5 lines
Takashi
thx
tom
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
At Thu, 17 Feb 2005 20:12:44 +0100,
Quoted 5 lines · thomas schorpp
Quoted 2 lines
And the Master volume does NOT affect the PCM playback volume?
does not on any version. just playing a clip with xmms (oss-iface) volume regulation only with dxs 2 slider. verified.
OK, that's good to know.
Quoted 7 lines
Quoted 4 lines
Quoted 1 line
- no output on pcm dac audio (tried workarounds for hours)
Err, with 2.6.10, you got no PCM playback output?
no output, verified with arts and xmms and xine, aplay warns about rate setting, ecasound with no complain messages.
Then which version was the "working" version you mentioned in the original post at all?
Quoted 10 lines
Quoted 9 lines
Quoted 3 lines
patch.ccvs rev 1.73 et al:
- master vol slider drives real volume for looped through lines. no affect on pcm.So, it has no influence on PCM... Interesting.
Possibly there is a mysterious register bit switch to turn this on/off :) (For example, STAC9750/51 controls the PCM-bypass mode by misusingGENERAL_PURPOSEregister bit 15.)
Quoted 4 lines
agree. due to hardware like clicking sound on enable/disable the slider, there should be hardware, good.
but how to find register and affecting bitsetting?
At best from the datasheet. Otherwise, trial-and-error.
Quoted 7 lines
Quoted 5 lines
Review
Quoted 2 lines
(quoted diff) +0
-2-alsa pcm volume working on dxs 1 slider. -oss pcm volume working on dxs 2 slider.The assignment of DXS channels are quite casual.
not understood, got too few background on that.
VIA823x has 4 DXS channels for multi-playback (aka hardware mixing). ALSA assigns each channel at each open of PCM stream. Thus, which DXS channel is assigned is simply depending on the order of concurrent opens.
That is, DXS = 2 means that another stream still occupies the first PCM stream.
Quoted 11 lines
Quoted 5 lines
Quoted 2 lines
btw: you got my 2 mails from tonight? windos driver reports rev 8D for this chip.
Hmm? I see a string "
REV_50" in the screenshot.no. thats the vias rev:
0000:00:11.5 Multimedia audio controller: VIA Technologies, Inc. VT8233/A/8235/8237 AC97 Audio Controller (rev 50)
Subsystem: Unknown device 1849:9761
Yes, that's my expectation, too. Where can I find the string with 8d?
Quoted 8 lines
Quoted 4 lines
Quoted 1 line
pls answer this question: what are those 32bit
xxxxxxxx_revids?Which value do you mean?
that:
#define
AC97_ID_AK45400x414b4d00<--- source? chip asked?
It's ac97->id, VENDOR_ID1<<16 | VENDOR_ID2 regs as below.
Quoted 8 lines
Quoted 6 lines
If it's
ac97->id, this is just the combination ofvendor_id1(7c) andvondor_id2(7e) registers as (vendor_id1<<16) | (device_id2). AFAIK, CM9761 has three different models and each of
them has different vendor ID2 value:0x4978,0x4982and0x4983. Yours looks like the last one.i assume it should be
0x498dfor mine then (windos driver screenshot).
No. IIRC, the register reads 0x4983. You should check /proc/asound/card0/codec97#0/ac97#0-0+regs.
That's why I wonder the value 0x8d. No idea from where it comes in Windows.
Well, it's fine to take Master volume back for this model (0x83), if the volume does really something as you described. The PCM volume won't appear anyway because it doesn't work.
But, before changing this, please check whether my last patch works. If this is OK, I can fix the above together.
Meanwhile, having separated DXS volumes seems inconvenient. The patch below replaces 4 DXS controls to a single bound one. Please give a try.
Maybe it would be not bad to rename this control to "PCM" automatically when no PCM volume control exists...
Takashi
Index: alsa-kernel/pci/via82xx.c
===================================================================
RCS file: /suse/tiwai/cvs/alsa/alsa-kernel/pci/via82xx.c,v retrieving revision 1.147
pci/via82xx.c +18 -15
@@ -367,7 +367,7 @@unsigned int mpu_port_saved;#endif -unsigned char playback_volume[4 ][2 ];/* for VIA8233/C/8235; default = 0 */ +unsigned char playback_volume[2 ];/* for VIA8233/C/8235; default = 0 */ unsigned int intr_mask;/* SGD_SHADOW mask to check interrupts */
@@ -942,8 +942,8 @@snd_assert ((rbits & ~0xfffff ) ==0 , return -EINVAL );snd_via82xx_channel_reset (chip, viadev);snd_via82xx_set_table_ptr (chip, viadev); -outb (chip->playback_volume[viadev->reg_offset /0x10 ][0 ],VIADEV_REG (viadev,OFS_PLAYBACK_VOLUME_L )); -outb (chip->playback_volume[viadev->reg_offset /0x10 ][1 ],VIADEV_REG (viadev,OFS_PLAYBACK_VOLUME_R )); +outb (chip->playback_volume[0 ],VIADEV_REG (viadev,OFS_PLAYBACK_VOLUME_L )); +outb (chip->playback_volume[1 ],VIADEV_REG (viadev,OFS_PLAYBACK_VOLUME_R )); outl((runtime->format == SNDRV_PCM_FORMAT_S16_LE ? VIA8233_REG_TYPE_16BIT : 0) | /* format */ (runtime->channels > 1 ? VIA8233_REG_TYPE_STEREO : 0) | /* stereo */ rbits | /* rate */
@@ -1497,29 +1497,33 @@static int snd_via8233_dxs_volume_get (snd_kcontrol_t *kcontrol,snd_ctl_elem_value_t *ucontrol) {via82xx_t *chip =snd_kcontrol_chip (kcontrol); -unsigned int idx =snd_ctl_get_ioff (kcontrol, &ucontrol->id); - ucontrol->value.integer.value[0 ] =VIA_DXS_MAX_VOLUME - chip->playback_volume[idx][0 ]; - ucontrol->value.integer.value[1 ] =VIA_DXS_MAX_VOLUME - chip->playback_volume[idx][1 ]; + ucontrol->value.integer.value[0 ] =VIA_DXS_MAX_VOLUME - chip->playback_volume[0 ]; + ucontrol->value.integer.value[1 ] =VIA_DXS_MAX_VOLUME - chip->playback_volume[1 ];return 0 ; }static int snd_via8233_dxs_volume_put (snd_kcontrol_t *kcontrol,snd_ctl_elem_value_t *ucontrol) {via82xx_t *chip =snd_kcontrol_chip (kcontrol); -unsigned int idx =snd_ctl_get_ioff (kcontrol, &ucontrol->id); -unsigned long port = chip->port +0x10 * idx; +unsigned long port;unsigned char val; -int i, change =0 ; +int i, idx, change =0 ;for (i =0 ; i <2 ; i++) { val = ucontrol->value.integer.value[i];if (val >VIA_DXS_MAX_VOLUME ) val =VIA_DXS_MAX_VOLUME ; val =VIA_DXS_MAX_VOLUME - val; - change |= val != chip->playback_volume[idx][i]; -if (change) { - chip->playback_volume[idx][i] = val; -outb (val, port +VIA_REG_OFS_PLAYBACK_VOLUME_L + i); + change |= val != chip->playback_volume[i]; + chip->playback_volume[i] = val; + } +if (change) { +for (idx =0 ; idx < idx; idx++) { +for (i =0 ; i <2 ; i++) { + port = chip->port +0x10 * idx + +VIA_REG_OFS_PLAYBACK_VOLUME_L + i; +outb (chip->playback_volume[i], port); + } } }return change;
@@ -1528,7 +1532,6 @@static snd_kcontrol_new_t snd_via8233_dxs_volume_control__devinitdata = { .name ="VIA DXS Playback Volume" , .iface =SNDRV_CTL_ELEM_IFACE_MIXER , - .count =4 , .info = snd_via8233_dxs_volume_info, .get = snd_via8233_dxs_volume_get, .put = snd_via8233_dxs_volume_put,
@@ -1942,7 +1945,7 @@for (idx =0 ; idx <4 ; idx++) {unsigned long port = chip->port +0x10 * idx;for (i =0 ; i <2 ; i++) -outb (chip->playback_volume[idx][i], port +VIA_REG_OFS_PLAYBACK_VOLUME_L + i); +outb (chip->playback_volume[i], port +VIA_REG_OFS_PLAYBACK_VOLUME_L + i); } }