[alsa-devel] [bug] Volume at maximum when track with different frequency is played with my RME sound card

Maeda maeda1 at free.fr
Wed Dec 2 21:43:48 CET 2015


/So the patch prevents the wrong max value reset but it's still 
incomplete for the left channel volume?/

    -> Yes, worst : it plays nothing on left channel -no loud at all ;)

OK.
Just tried with the line 'usleep(range)' uncommented. It's better, no 
loud bug (just a big POP sound on speakers on first time, nothing 
after), but I have errors in output. I manage to get them with `dmesg`. 
See attachment.
No error nor bug when playing two times the same sample frequency, as 
expected... Playing alternatively r48000 and r96000 will output errors 
each time, despite of no bug, no loud sound, just expected play. Better 
then.

That seems not very 'clean'. What do you think about it ?

Le 02/12/2015 12:36, Takashi Iwai a écrit :
> On Wed, 02 Dec 2015 11:11:27 +0100,
> Maeda wrote:
>> Hi Takashi !
>>
>> Sorry for the late answer. I do compile the 'test' kernel after editing
>> the file with the three lines as you said on your previous mail.
>>
>> The result is that the bug isn't occurring anymore, tested with 96KHz
>> sample :
>>
>> `aplay -fcd -d3 /dev/zero ; aplay -fS32_LE -r96000 -c2 -d3 /dev/zero ;
>> speaker-test -c2 -twav`
>>
>> _BUT_, I only have the right speaker that works, I need to change the
>> volume to restore sound on the left channel.
> So the patch prevents the wrong max value reset but it's still
> incomplete for the left channel volume?
>
> Did you try to enable the usleep_range() that was commented out in the
> patch?
>
>
> Takashi
>
>> Maeda.
>>
>> Le 21/11/2015 20:45, Takashi Iwai a écrit :
>>> On Sat, 21 Nov 2015 18:42:06 +0100,
>>> Maeda wrote:
>>>> Hi !
>>>>
>>>> Thanks for answering me.
>>>> Yes, turning the output volume up or down as soon as it's playing at
>>>> full output : it plays at the % it should play.
>>>>
>>>> I'm OK to try the patch, but I don't find the /rme96.c/ file. Where is
>>>> it located ? I think a recompilation's needed then ? Never done that.
>>> Well, you need to learn how to compile the kernel.  It's possible to
>>> compile only a module from the current running tree, too.
>>>
>>> Which distro are you using?  You can ask distro guys for assistance.
>>>
>>>
>>> Takashi
>>>
>>>> Thanks for help.
>>>>
>>>> Kind regards.
>>>>
>>>> Le 20/11/2015 17:34, Takashi Iwai a écrit :
>>>>> On Tue, 10 Nov 2015 13:41:44 +0100,
>>>>> Maeda wrote:
>>>>>> Hi !
>>>>>>
>>>>>> Someone's here ?
>>>>>>
>>>>>> Thanks.
>>>>>>
>>>>>> Le 23/10/2015 18:30, Maeda a écrit :
>>>>>>> Hi all !
>>>>>>>
>>>>>>> I don't know if the bug is known from your team, but some people
>>>>>>> advice me to send an email to the Alsa devel list if nobody answer in
>>>>>>> the kernel's bugtracking.
>>>>>>>
>>>>>>> Here is the bug I have :
>>>>>>> https://bugzilla.kernel.org/show_bug.cgi?id=105771
>>>>>>>
>>>>>>> What do you think about it ?
>>>>> Does the volume go down when you adjust DAC volume by mixer
>>>>> application when this happens?
>>>>>
>>>>> Through a quick glance at the driver code, the only smelling part is
>>>>> that it's calling snd_rme96_reset_dac() from
>>>>> snd_rme96_playback_setrate().  If the DAC volume adjustment really
>>>>> works, the patch below might work.  Please give it a try.
>>>>>
>>>>> The patch has a code to give some delay that is commented out for
>>>>> now.  The delay is found in the resume path, but I'm not sure whether
>>>>> it's mandatory.  So let's try at first without the delay.  If it's
>>>>> unstable, you can uncomment the line and retry.
>>>>>
>>>>>
>>>>> thanks,
>>>>>
>>>>> Takashi
>>>>>
>>>>> ---
>>>>> diff --git a/sound/pci/rme96.c b/sound/pci/rme96.c
>>>>> index 714df906249e..a9d8a66fc3da 100644
>>>>> --- a/sound/pci/rme96.c
>>>>> +++ b/sound/pci/rme96.c
>>>>> @@ -741,6 +741,9 @@ snd_rme96_playback_setrate(struct rme96 *rme96,
>>>>>     	{
>>>>>     		/* change to/from double-speed: reset the DAC (if available) */
>>>>>     		snd_rme96_reset_dac(rme96);
>>>>> +		/* usleep_range(3000, 10000); */
>>>>> +		if (RME96_HAS_ANALOG_OUT(rme96))
>>>>> +			snd_rme96_apply_dac_volume(rme96);
>>>>>     	} else {
>>>>>     		writel(rme96->wcreg, rme96->iobase + RME96_IO_CONTROL_REGISTER);
>>>>>     	}
>>>>>
>>>>>
>>>>>
>>>>>
>> [2  <text/html; utf-8 (8bit)>]
>>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: errors.log
Type: text/x-log
Size: 3075 bytes
Desc: not available
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20151202/7d41016f/attachment.bin>


More information about the Alsa-devel mailing list