Skip to contentSkip to conversation

PROC_COEF/PROC_INDEX question

DISCUSSION Wu Fengguang 2 participants 5 messages Aug 7, 2009

lore
Share & tools
lore
#0 lore raw

Hello,

I'm not sure of the usage for GET_PROC_COEF/GET_COEF_INDEX, and found that their return value is unstable (changing all the time) for codec:

        Codec: Realtek ALC888
        Address: 2
        Function Id: 0x1
        Vendor Id: 0x10ec0888
        Subsystem Id: 0x80860023
        Revision Id: 0x100202

For example:

# hda-verb /dev/snd/hwC0D2 0x20 GET_PROC_COEF 0 
nid = 0x20, verb = 0xc00, param = 0x0
value = 0x80
# hda-verb /dev/snd/hwC0D2 0x20 GET_COEF_INDEX 0
nid = 0x20, verb = 0xd00, param = 0x0
value = 0xe
# hda-verb /dev/snd/hwC0D2 0x20 GET_PROC_COEF 0 
nid = 0x20, verb = 0xc00, param = 0x0
value = 0x9c00
# hda-verb /dev/snd/hwC0D2 0x20 GET_COEF_INDEX 0
nid = 0x20, verb = 0xd00, param = 0x0
value = 0xf

I wonder if this is the normal case?

Thanks,
Fengguang

#1 lore raw

At Fri, 7 Aug 2009 17:38:59 +0800,

Quoted 28 lines · Wu Fengguang

Hello,

I'm not sure of the usage for GET_PROC_COEF/GET_COEF_INDEX, and found that their return value is unstable (changing all the time) for codec:

        Codec: Realtek ALC888
        Address: 2
        Function Id: 0x1
        Vendor Id: 0x10ec0888
        Subsystem Id: 0x80860023
        Revision Id: 0x100202

For example:

# hda-verb /dev/snd/hwC0D2 0x20 GET_PROC_COEF 0 
nid = 0x20, verb = 0xc00, param = 0x0
value = 0x80
# hda-verb /dev/snd/hwC0D2 0x20 GET_COEF_INDEX 0
nid = 0x20, verb = 0xd00, param = 0x0
value = 0xe
# hda-verb /dev/snd/hwC0D2 0x20 GET_PROC_COEF 0 
nid = 0x20, verb = 0xc00, param = 0x0
value = 0x9c00
# hda-verb /dev/snd/hwC0D2 0x20 GET_COEF_INDEX 0
nid = 0x20, verb = 0xd00, param = 0x0
value = 0xf
Quoted 1 line

I wonder if this is the normal case?

AFAIK, depending on the mode, the index is incremented automatically.

Takashi

#2 lore raw
Quoted 30 lines · Takashi Iwai

At Fri, 7 Aug 2009 17:38:59 +0800,

Quoted 28 lines · Wu Fengguang

Hello,

I'm not sure of the usage for GET_PROC_COEF/GET_COEF_INDEX, and found that their return value is unstable (changing all the time) for codec:

        Codec: Realtek ALC888
        Address: 2
        Function Id: 0x1
        Vendor Id: 0x10ec0888
        Subsystem Id: 0x80860023
        Revision Id: 0x100202

For example:

# hda-verb /dev/snd/hwC0D2 0x20 GET_PROC_COEF 0 
nid = 0x20, verb = 0xc00, param = 0x0
value = 0x80
# hda-verb /dev/snd/hwC0D2 0x20 GET_COEF_INDEX 0
nid = 0x20, verb = 0xd00, param = 0x0
value = 0xe
# hda-verb /dev/snd/hwC0D2 0x20 GET_PROC_COEF 0 
nid = 0x20, verb = 0xc00, param = 0x0
value = 0x9c00
# hda-verb /dev/snd/hwC0D2 0x20 GET_COEF_INDEX 0
nid = 0x20, verb = 0xd00, param = 0x0
value = 0xf
Quoted 3 lines
Quoted 1 line

I wonder if this is the normal case?

AFAIK, depending on the mode, the index is incremented automatically.

Ah, yes. That's in line with the above data.

When repeatingly call GET_PROC_COEF, it returns some 'random' values:

        # hda-verb /dev/snd/hwC0D2 0x20 GET_PROC_COEF 0
        nid = 0x20, verb = 0xc00, param = 0x0
        value = 0x4f
        # hda-verb /dev/snd/hwC0D2 0x20 GET_PROC_COEF 0
        nid = 0x20, verb = 0xc00, param = 0x0
        value = 0x8000
        # hda-verb /dev/snd/hwC0D2 0x20 GET_PROC_COEF 0
        nid = 0x20, verb = 0xc00, param = 0x0
        value = 0x2520
        # hda-verb /dev/snd/hwC0D2 0x20 GET_PROC_COEF 0
        nid = 0x20, verb = 0xc00, param = 0x0
        value = 0x3e00

But when repeatingly call GET_COEF_INDEX, it returns the same value:

        # hda-verb /dev/snd/hwC0D2 0x20 GET_COEF_INDEX 0
        nid = 0x20, verb = 0xd00, param = 0x0
        value = 0xd
        # hda-verb /dev/snd/hwC0D2 0x20 GET_COEF_INDEX 0
        nid = 0x20, verb = 0xd00, param = 0x0
        value = 0xd

Thanks,
Fengguang

#3 lore raw

At Fri, 7 Aug 2009 18:01:21 +0800,

Quoted 40 lines · Wu Fengguang
Quoted 30 lines · Takashi Iwai

At Fri, 7 Aug 2009 17:38:59 +0800,

Quoted 28 lines · Wu Fengguang

Hello,

I'm not sure of the usage for GET_PROC_COEF/GET_COEF_INDEX, and found that their return value is unstable (changing all the time) for codec:

        Codec: Realtek ALC888
        Address: 2
        Function Id: 0x1
        Vendor Id: 0x10ec0888
        Subsystem Id: 0x80860023
        Revision Id: 0x100202

For example:

# hda-verb /dev/snd/hwC0D2 0x20 GET_PROC_COEF 0 
nid = 0x20, verb = 0xc00, param = 0x0
value = 0x80
# hda-verb /dev/snd/hwC0D2 0x20 GET_COEF_INDEX 0
nid = 0x20, verb = 0xd00, param = 0x0
value = 0xe
# hda-verb /dev/snd/hwC0D2 0x20 GET_PROC_COEF 0 
nid = 0x20, verb = 0xc00, param = 0x0
value = 0x9c00
# hda-verb /dev/snd/hwC0D2 0x20 GET_COEF_INDEX 0
nid = 0x20, verb = 0xd00, param = 0x0
value = 0xf
Quoted 3 lines
Quoted 1 line

I wonder if this is the normal case?

AFAIK, depending on the mode, the index is incremented automatically.

Ah, yes. That's in line with the above data.

When repeatingly call GET_PROC_COEF, it returns some 'random' values:

Quoted 12 lines
        # hda-verb /dev/snd/hwC0D2 0x20 GET_PROC_COEF 0
        nid = 0x20, verb = 0xc00, param = 0x0
        value = 0x4f
        # hda-verb /dev/snd/hwC0D2 0x20 GET_PROC_COEF 0
        nid = 0x20, verb = 0xc00, param = 0x0
        value = 0x8000
        # hda-verb /dev/snd/hwC0D2 0x20 GET_PROC_COEF 0
        nid = 0x20, verb = 0xc00, param = 0x0
        value = 0x2520
        # hda-verb /dev/snd/hwC0D2 0x20 GET_PROC_COEF 0
        nid = 0x20, verb = 0xc00, param = 0x0
        value = 0x3e00

I guess it's not random but just the value of the next index.

Quoted 8 lines

But when repeatingly call GET_COEF_INDEX, it returns the same value:

        # hda-verb /dev/snd/hwC0D2 0x20 GET_COEF_INDEX 0
        nid = 0x20, verb = 0xd00, param = 0x0
        value = 0xd
        # hda-verb /dev/snd/hwC0D2 0x20 GET_COEF_INDEX 0
        nid = 0x20, verb = 0xd00, param = 0x0
        value = 0xd

Reading the index itself doesn't increment the index. Reading the coef value increases the index. So is my understanding.

Takashi

#4 lore raw
Quoted 66 lines · Takashi Iwai

At Fri, 7 Aug 2009 18:01:21 +0800,

Quoted 40 lines · Wu Fengguang
Quoted 30 lines · Takashi Iwai

At Fri, 7 Aug 2009 17:38:59 +0800,

Quoted 28 lines · Wu Fengguang

Hello,

I'm not sure of the usage for GET_PROC_COEF/GET_COEF_INDEX, and found that their return value is unstable (changing all the time) for codec:

        Codec: Realtek ALC888
        Address: 2
        Function Id: 0x1
        Vendor Id: 0x10ec0888
        Subsystem Id: 0x80860023
        Revision Id: 0x100202

For example:

# hda-verb /dev/snd/hwC0D2 0x20 GET_PROC_COEF 0 
nid = 0x20, verb = 0xc00, param = 0x0
value = 0x80
# hda-verb /dev/snd/hwC0D2 0x20 GET_COEF_INDEX 0
nid = 0x20, verb = 0xd00, param = 0x0
value = 0xe
# hda-verb /dev/snd/hwC0D2 0x20 GET_PROC_COEF 0 
nid = 0x20, verb = 0xc00, param = 0x0
value = 0x9c00
# hda-verb /dev/snd/hwC0D2 0x20 GET_COEF_INDEX 0
nid = 0x20, verb = 0xd00, param = 0x0
value = 0xf
Quoted 3 lines
Quoted 1 line

I wonder if this is the normal case?

AFAIK, depending on the mode, the index is incremented automatically.

Ah, yes. That's in line with the above data.

When repeatingly call GET_PROC_COEF, it returns some 'random' values:

Quoted 12 lines
        # hda-verb /dev/snd/hwC0D2 0x20 GET_PROC_COEF 0
        nid = 0x20, verb = 0xc00, param = 0x0
        value = 0x4f
        # hda-verb /dev/snd/hwC0D2 0x20 GET_PROC_COEF 0
        nid = 0x20, verb = 0xc00, param = 0x0
        value = 0x8000
        # hda-verb /dev/snd/hwC0D2 0x20 GET_PROC_COEF 0
        nid = 0x20, verb = 0xc00, param = 0x0
        value = 0x2520
        # hda-verb /dev/snd/hwC0D2 0x20 GET_PROC_COEF 0
        nid = 0x20, verb = 0xc00, param = 0x0
        value = 0x3e00

I guess it's not random but just the value of the next index.

Quoted 8 lines

But when repeatingly call GET_COEF_INDEX, it returns the same value:

        # hda-verb /dev/snd/hwC0D2 0x20 GET_COEF_INDEX 0
        nid = 0x20, verb = 0xd00, param = 0x0
        value = 0xd
        # hda-verb /dev/snd/hwC0D2 0x20 GET_COEF_INDEX 0
        nid = 0x20, verb = 0xd00, param = 0x0
        value = 0xd
Quoted 2 lines

Reading the index itself doesn't increment the index. Reading the coef value increases the index. So is my understanding.

OK, so the coef read has some 'side effects', hehe.