Re: mcasp: stream has more channels (2) than are enabled in mcasp (0)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 04/19/16 12:04, Rick Mann wrote:
> 
>> On Apr 19, 2016, at 01:37 , Peter Ujfalusi <peter.ujfalusi@xxxxxx> wrote:
>>
>> On 04/19/16 11:05, Rick Mann wrote:
>>>>> Yup, seems like it's 0:
>>>>>
>>>>> [   67.876673] davinci-mcasp 48038000.mcasp: Slots: 2,
>>>>> max_active_serializers: 1, active_serializers: 0, channels: 2,
>>>>> mcasp->num_serializer: 0 [   67.889362] davinci-mcasp 48038000.mcasp: ASoC:
>>>>> can't set 48038000.mcasp hw params: -22
>>>>
>>>> How can it be?
>>>> can you take a look of the davinci_mcasp_set_pdata_from_of() function where
>>>> the serial-dir is set up? Do we get the of_serial_dir32? What is the size of
>>>> the array we got (val)?
>>>
>>> It seems to be 0:
>>>
>>> [    8.411990] davinci-mcasp 48038000.mcasp: davinci_mcasp_probe: enter
>>> [    8.453167] davinci-mcasp 48038000.mcasp: serial-dir: 0
>>> [    8.501317] davinci-mcasp 48038000.mcasp: invalid tdm slots: 0
>>> [    8.554405] davinci-mcasp 4803c000.mcasp: davinci_mcasp_probe: enter
>>> [    8.562924] davinci-mcasp 4803c000.mcasp: serial-dir: 0
>>> [    8.635250] davinci-mcasp 4803c000.mcasp: invalid tdm slots: 0
>>
>> Hrm, it seems that we can not read any of the parameters set by the DT
>> fragment for mcasp0, my guess is that the tx-num-evt and rx-num-evt is not
>> there either.
>>
>> from the full log: the mcasp is loaded earlier than you have patched the DT
>> with the audio overlay.
>>
>> [    8.220175] davinci-mcasp 48038000.mcasp: davinci_mcasp_probe: enter
>> [    8.268496] davinci-mcasp 48038000.mcasp: invalid tdm slots: 0
>> [    8.323405] davinci-mcasp 4803c000.mcasp: davinci_mcasp_probe: enter
>> [    8.339936] davinci-mcasp 4803c000.mcasp: invalid tdm slots: 0
>> ...
>> [   33.432680] bone_capemgr bone_capemgr: part_number 'BB-BONE-AUDI-02',
>> version 'N/A'
>> [   33.432719] bone_capemgr bone_capemgr: slot #4: override
>> [   33.432736] bone_capemgr bone_capemgr: Using override eeprom data at slot 4
>> [   33.432752] bone_capemgr bone_capemgr: slot #4: 'Override Board
>> Name,00A0,Override Manuf,BB-BONE-AUDI-02'
>> [   33.451729] bone_capemgr bone_capemgr: slot #4: dtbo
>> 'BB-BONE-AUDI-02-00A0.dtbo' loaded; overlay id #0
>> [   33.462646] 2-0018 supply IOVDD not found, using dummy regulator
>> [   33.462722] 2-0018 supply DVDD not found, using dummy regulator
>> [   33.462779] 2-0018 supply AVDD not found, using dummy regulator
>> [   33.462822] 2-0018 supply DRVDD not found, using dummy regulator
>> [   33.484174] asoc-simple-card sound: tlv320aic3x-hifi <-> 48038000.mcasp
>> mapping ok
>> [   50.062097] davinci-mcasp 48038000.mcasp: Slots: 2, max_active_serializers:
>> 1, active_serializers: 0, channels: 2
>> [   50.072596] davinci-mcasp 48038000.mcasp: stream has more channels (2) than
>> are enabled in mcasp (0)
>> [   50.072613] davinci-mcasp 48038000.mcasp: ASoC: can't set 48038000.mcasp hw
>> params: -22
>>
>> You can try to remove the mcasp module, do the DT fragment magic, reload the
>> mcasp driver if it is not loaded automatically.
> 
> I don't quite understand how to do what you're suggesting here.

rmmod snd-soc-davinci-mcasp
...
DT patching
...
modprobe snd-soc-davinci-mcasp


>> But if you want to get it working properly you need to find the dts(i) file
>> which set the mcasp0 and mcasp1 nodes to status = "okay";
>> In upstream we do not do this, so it must come from the bone changes.
> 
> The DTB (prior to the BB-BONE-AUDI-02 overlay) starts with this file:
> 
> 	http://pastebin.com/5vVEdAKt
> 
> That file first includes the following files in this order, before adding
> its own entries (sorry about the line length):
> 
> https://github.com/RobertCNelson/dtb-rebuilder/blob/4.4.x/src/arm/am33xx.dtsi
> https://github.com/RobertCNelson/dtb-rebuilder/blob/4.4.x/src/arm/am33xx-es2.dtsi
> https://github.com/RobertCNelson/dtb-rebuilder/blob/4.4.x/src/arm/am335x-bone-common.dtsi
> https://github.com/RobertCNelson/dtb-rebuilder/blob/4.4.x/src/arm/am33xx-overlay-edma-fix.dtsi
> 
> The last of these files sets spi0, spi1, mcasp0, mcasp1 to "okay".

Interesting, why an include file called am33xx-overlay-edma-fix.dtsi would
enable spi and mcasp??? What it is fixing regarding to eDMA?

> If I understand what you're saying, this is causing the driver to load
> before other things have been set in the DT, and they should be moved
> to later, perhaps in the overlay? In fact, the overlay (which gets loaded
> after login) does also set the mcasp0 to "okay" (I think):

Yes, since the DT blob you are booting with have mcasp0/1 enabled, the driver
will load using the boot DTB. You later patch the DTB, but the driver is
already loaded so it will have no effect to the driver.

> https://github.com/RobertCNelson/bb.org-overlays/blob/master/src/arm/BB-BONE-AUDI-02-00A0.dts#L72
> 
> I rebuilt the .dtb by commenting out the enabling of the macasp0/1 in
> that .dtsi, and now it seems to work! davinci_mcasp_probe is entered
> when I apply the overlay, and I get this logged:
> 
> [   35.868324] davinci-mcasp 48038000.mcasp: davinci_mcasp_probe: enter
> [   35.874741] davinci-mcasp 48038000.mcasp: serial-dir: 64
> [   43.469254] davinci-mcasp 48038000.mcasp: Slots: 2,
> 	max_active_serializers: 1, active_serializers: 1,
> 	channels: 2, mcasp->num_serializer: 16
> [   78.846314] davinci-mcasp 48038000.mcasp: Slots: 2,
> 	max_active_serializers: 1, active_serializers: 1,
> 	channels: 2, mcasp->num_serializer: 16

Great!

> By default, speaker-test only outputs to the left channel, and I get
> noise out that channel. If I invoke speaker-test -c 2, it claims to
> cycle between Front Left and Front Right, but there is only silence
> out the Front Right. This is probably due to issues in asound.state,
> right (I'd sure love some help getting that straightened out)?

I'll try to take a look at the speaker-test, it should work fine AFAIK.

> In any case, thank you. This seems to have advanced things considerably.
> I really appreciate your help and your patience.

No problem, I'm glad that I we sorted out.

-- 
Péter
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel




[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux