All of lore.kernel.org
 help / color / mirror / Atom feed
* Oxygen Possible Bug in FCM
@ 2016-09-20 16:11 xerofoify
  2016-09-21  6:47 ` Clemens Ladisch
  0 siblings, 1 reply; 3+ messages in thread
From: xerofoify @ 2016-09-20 16:11 UTC (permalink / raw)
  To: alsa-devel

Greetings All,
Do anyone known of the best way to test this function,
ac97_fp_rec_volume_put. Seems there may be a bug in
it. I do have the hardware so that's not a issue just wondering what
the different between fp_rec and the standard
get functions are in terms of testing. Further more I am assuming this
has to do with the fp headphones switch
but I don't have headphones that are fp so is there another way to
test this particular function without checking
sound levels.
Cheers,
Nick

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Oxygen Possible Bug in FCM
  2016-09-20 16:11 Oxygen Possible Bug in FCM xerofoify
@ 2016-09-21  6:47 ` Clemens Ladisch
  2016-09-22  4:17   ` nick
  0 siblings, 1 reply; 3+ messages in thread
From: Clemens Ladisch @ 2016-09-21  6:47 UTC (permalink / raw)
  To: xerofoify, alsa-devel

xerofoify wrote:
> Do anyone known of the best way to test this function,
> ac97_fp_rec_volume_put. Seems there may be a bug in
> it.

What bug?

> I do have the hardware so that's not a issue just wondering what
> the different between fp_rec and the standard
> get functions are in terms of testing.

The other functions use five bits, this one uses three bits.

(The AC'97 spec says the REC_GAIN register has four bits for the volume;
I don't know where the difference comes from.)

And the REC_GAIN register should affect all recorded signals going
through the AC'97 mixer (all except line in).

> Further more I am assuming this
> has to do with the fp headphones switch
> but I don't have headphones that are fp so is there another way to
> test this particular function without checking
> sound levels.

You could connect any microphone to the front panel connector.

Or check the AC'97 registers in /proc/asound/cardX/oxygen.


Regards,
Clemens

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Oxygen Possible Bug in FCM
  2016-09-21  6:47 ` Clemens Ladisch
@ 2016-09-22  4:17   ` nick
  0 siblings, 0 replies; 3+ messages in thread
From: nick @ 2016-09-22  4:17 UTC (permalink / raw)
  To: Clemens Ladisch, alsa-devel



On 2016-09-21 02:47 AM, Clemens Ladisch wrote:
> xerofoify wrote:
>> Do anyone known of the best way to test this function,
>> ac97_fp_rec_volume_put. Seems there may be a bug in
>> it.
> 
> What bug?
> 
>> I do have the hardware so that's not a issue just wondering what
>> the different between fp_rec and the standard
>> get functions are in terms of testing.
> 
> The other functions use five bits, this one uses three bits.
> 
That's not what I am getting at seems ac97_fp_rec_volume_get is similar in
logic to ac97_fp_rec_volume_put and therefore in ac97_fp_rec_volume_get:

value->value.integer.value[1] = (reg >> 8) & 7;

is different then  ac97_fp_rec_volume_put:

newreg = newreg | ((value->value.integer.value[0] & 7) << 8);

which is is probably accessing an incorrect value in the sound card register
array, at least from my understanding of reading this driver. It seems it 
should be accessing the value in index 1 of this particular array of sound card
registers. 
> (The AC'97 spec says the REC_GAIN register has four bits for the volume;
> I don't know where the difference comes from.)
> 
> And the REC_GAIN register should affect all recorded signals going
> through the AC'97 mixer (all except line in).
> 
>> Further more I am assuming this
>> has to do with the fp headphones switch
>> but I don't have headphones that are fp so is there another way to
>> test this particular function without checking
>> sound levels.
> 
> You could connect any microphone to the front panel connector.
> 
> Or check the AC'97 registers in /proc/asound/cardX/oxygen.
> 
OK that seems the easy way to test that the incorrect access I stated above is 
actually a issue. Probably best to test it as dealing with registers on hardware
as this can easily lead to regressions and that's why I am asking.
Thanks,
Nick
> 
> Regards,
> Clemens
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-09-22  4:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-20 16:11 Oxygen Possible Bug in FCM xerofoify
2016-09-21  6:47 ` Clemens Ladisch
2016-09-22  4:17   ` nick

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.