[PATCH] drm/radeon/audio: fix missing multichannel PCM SAD in some cases

Anssi Hannula anssi.hannula at iki.fi
Fri Nov 1 18:08:10 PDT 2013


02.11.2013 03:01, Rafał Miłecki kirjoitti:
> 2013/10/29 Anssi Hannula <anssi.hannula at iki.fi>:
>> Fix the code to pick the PCM SAD with the highest number of channels,
>> while merging the rate masks of PCM SADs with lower amount of channels
>> into the additional stereo rate mask byte.
> 
> Don't you think that we should use SUPPORTED_FREQUENCIES_STEREO for
> stereo frequencies only?
> 
> 
>>                                 if (sad->format == HDMI_AUDIO_CODING_TYPE_PCM)
>> +                                       stereo_freqs |= sad->freq;
> 
> I mean making that (... && sad->channels == 1)
> 

SAD with channels=6,freqs=32..96kHz,bits=16..24 implies that those freqs
and bps are supported for all channel counts up to 6 (since it is "Max
Number of channels"). Therefore the specified rates are supported in
stereo mode as well and I believe should be included in the stereo bitmask.

As per AMD HDA Verbs documentation the 4th byte is "Rates supported for
stereo". And since those rates _are_ supported by stereo, IMO they
should be there.

-- 
Anssi Hannula


More information about the dri-devel mailing list