Failure with NWDR20 Re: #draws


Brian Badger
 

Right.  That's what I did.  When the first step "aplay -l" showed no audio devices at all, I started to debug using the documentation on host, which says to use those two scripts.  If you are going to remove those scripts you should also remove the documentation that says to run them.

Regarding the early version of NWDR, here is the output of aplay -l again (same hardware, different SD card)
pi@compass:~ $ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA]
  Subdevices: 7/7
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
  Subdevice #4: subdevice #4
  Subdevice #5: subdevice #5
  Subdevice #6: subdevice #6
card 0: ALSA [bcm2835 ALSA], device 1: bcm2835 ALSA [bcm2835 IEC958/HDMI]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: udrc [udrc], device 0: Universal Digital Radio Controller tlv320aic32x4-hifi-0 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
 


Brian Badger
 

Here is the procedure I followed to open a problem report according to your documentation:

cat ~/n7nix/PROBLEM_REPORT.md
## Steps to take if you have problems
 
#### Before you run any scripts from a fresh image verify the image written to SD card
 
##### Verify SD card was written to
* Checks to see if there is an old config on the SD card
```
cd
cd n7nix/config
./cfgcheck.sh
 
# You should see something like this:
-- app_config.sh core script has NOT been run: hostname: 1, passwd: 1, logfile: 1
```
 
##### Verify the driver was loaded properly
* There are a couple of things that cause the driver to not load
  * On-board BCM2835 audio driver loaded before udrc driver
  * AudioSense-Pi sound card driver prevents udrc driver from loading
 
###### Verify driver running properly by running aplay -l
```
aplay -l
 
# You should see something like this
**** List of PLAYBACK Hardware Devices ****
card 0: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA]
  Subdevices: 7/7
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
  Subdevice #4: subdevice #4
  Subdevice #5: subdevice #5
  Subdevice #6: subdevice #6
card 0: ALSA [bcm2835 ALSA], device 1: bcm2835 ALSA [bcm2835 IEC958/HDMI]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: udrc [udrc], device 0: Universal Digital Radio Controller tlv320aic32x4-hifi-0 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
```
 
* If you do **not** see __udrc__ in the _aplay -l_ output
  * For **BETA12** images or later run these scripts and reboot
```
chk_conflict.sh
chk_bootcfg.sh
 


Brian Badger
 

But, to return to the topic at hand, I followed the instructions on your wiki exactly:

Start Initial Configuration

  • Boot the newly provisioned microSD card

    login: pi
    passwd: digiberry
  • Immediately verify that the DRAWS hat and its driver are operating.

    • Open a console and type:

      aplay -l
  • You should see a line in the output that looks something like this:

    card 0: udrc [udrc], device 0: bcm2835-i2s-tlv320aic32x4-hifi tlv320aic32x4-hifi-0 []
  • If you do NOT see udrc enumerated do NOT continue

    • Until the UDRC/DRAWS drivers are loaded the configuration scripts will NOT succeed.

What I see after a fresh install:
pi@raspberrypi:~ $ aplay -l
aplay: device_list:272: no soundcards found...

So, logically, I followed your documentation.  I did NOT continue, instead I created a problem report using the documentation provided for opening a problem report -- ~/n7nix/docs/PROBLEM_REPORT.md



Basil Gunn
 

Ok. Thanks. Will Update documentation and remove chk_conflict.sh from
image.

I am confused as you are seeing udrc enumerated when you run 'aplay -l'

card 1: udrc [udrc], device 0: Universal Digital Radio Controller tlv320aic32x4-hifi-0 []
Subdevices: 1/1
Also could you please tell me if my previous instructions for recovering
from running chk_conflict.sh script worked.

https://nw-digital-radio.groups.io/g/udrc/topic/draws/86501384?p=,,,20,0,0,0::recentpostdate/sticky,,,20,2,0,86501384,previd=9223372036854775807,nextid=1628851982099023943&previd=9223372036854775807&nextid=1628851982099023943

Also confused why you started a new thread.


Brian Badger <brian@badgerfamily.com> writes:

Here is the procedure I followed to open a problem report according to your documentation:

cat ~/n7nix/PROBLEM_REPORT.md
## Steps to take if you have problems

#### Before you run any scripts from a fresh image verify the image written to SD card

##### Verify SD card was written to
* Checks to see if there is an old config on the SD card
```
cd
cd n7nix/config
./cfgcheck.sh

# You should see something like this:
-- app_config.sh core script has NOT been run: hostname: 1, passwd: 1, logfile: 1
```

##### Verify the driver was loaded properly
* There are a couple of things that cause the driver to not load
* On-board BCM2835 audio driver loaded before udrc driver
* AudioSense-Pi sound card driver prevents udrc driver from loading

###### Verify driver running properly by running aplay -l
```
aplay -l

# You should see something like this
**** List of PLAYBACK Hardware Devices ****
card 0: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA]
Subdevices: 7/7
Subdevice #0: subdevice #0
Subdevice #1: subdevice #1
Subdevice #2: subdevice #2
Subdevice #3: subdevice #3
Subdevice #4: subdevice #4
Subdevice #5: subdevice #5
Subdevice #6: subdevice #6
card 0: ALSA [bcm2835 ALSA], device 1: bcm2835 ALSA [bcm2835 IEC958/HDMI]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: udrc [udrc], device 0: Universal Digital Radio Controller tlv320aic32x4-hifi-0 []
Subdevices: 1/1
Subdevice #0: subdevice #0
```

* If you do **not** see __udrc__ in the _aplay -l_ output
* For **BETA12** images or later run these scripts and reboot
```
chk_conflict.sh
chk_bootcfg.sh



Brian Badger
 

I did not "recover" from any script.  I flashed the image again, so that you would be satisfied that I am not running the wrong script.  The only thing I ran on the fresh image was aplay -l

I posted the result of aplay -l already:

pi@raspberrypi:~ $ aplay -l
aplay: device_list:272: no soundcards found...
 
I started a new thread to have the title updated to "Failure with NWDR20" so that other people would be able to find it.


Brian Badger
 

This is what my old install says in kern.log during boot up:

Oct 11 19:17:32 compass kernel: [   31.723832] snd_bcm2835: module is from the staging directory, the quality is unknown, you have been warned.
Oct 11 19:17:32 compass kernel: [   31.725656] bcm2835_alsa bcm2835_alsa: card created with 8 channels
Oct 11 19:17:32 compass kernel: [   31.760378] udrc: loading out-of-tree module taints kernel.
Oct 11 19:17:32 compass kernel: [   31.761149] snd-udrc soc:sound: ASoC: CODEC DAI tlv320aic32x4-hifi not registered - will retry
Oct 11 19:17:32 compass kernel: [   31.761164] snd-udrc soc:sound: snd_soc_register_card() failed: -517
Oct 11 19:17:32 compass kernel: [   31.824631] snd-udrc soc:sound: ASoC: CODEC DAI tlv320aic32x4-hifi not registered - will retry
Oct 11 19:17:32 compass kernel: [   31.824643] snd-udrc soc:sound: snd_soc_register_card() failed: -517
Oct 11 19:17:32 compass kernel: [   31.826057] brcmfmac: F1 signature read @0x18000000=0x15264345
Oct 11 19:17:32 compass kernel: [   31.831073] brcmfmac: brcmf_fw_map_chip_to_name: using brcm/brcmfmac43455-sdio.bin for chip 0x004345(17221) rev 0x000006
Oct 11 19:17:32 compass kernel: [   31.831385] usbcore: registered new interface driver brcmfmac
Oct 11 19:17:32 compass kernel: [   31.832238] snd-udrc soc:sound: ASoC: CODEC DAI tlv320aic32x4-hifi not registered - will retry
Oct 11 19:17:32 compass kernel: [   31.832248] snd-udrc soc:sound: snd_soc_register_card() failed: -517
Oct 11 19:17:32 compass kernel: [   32.074072] ads1015 1-0048: hwmon_device_register() is deprecated. Please convert the driver to use hwmon_device_register_with_info().
Oct 11 19:17:32 compass kernel: [   32.095607] brcmfmac: brcmf_c_preinit_dcmds: Firmware version = wl0: Feb 27 2018 03:15:32 version 7.45.154 (r684107 CY) FWID 01-4fbe0b04
Oct 11 19:17:32 compass kernel: [   32.097683] brcmfmac: brcmf_c_preinit_dcmds: CLM version = API: 12.2 Data: 9.10.105 Compiler: 1.29.4 ClmImport: 1.36.3 Creation: 2018-03-09 18:56:28
Oct 11 19:17:32 compass kernel: [   32.131098] snd-udrc soc:sound: tlv320aic32x4-hifi <-> 3f203000.i2s mapping ok

This old version works correctly.  This is what I mean by old version:

-rw-r--r-- 1 pi pi  2596 Nov 29  2018 udrc.dtbo
-rw-r--r-- 1 pi pi  5094 Nov 29  2018 draws.dtbo

You asked me to provide console output to prove this, and I did.  I provided the output of aplay -l on the old version and proved that the same DRAWS hat was working on that version.

The new version, NWDR20, does not detect the DRAWS hat at all during boot and aplay -l (the first command your instructions require after bootup) does not show any soundcards at all, and no udrc or draws devices are discovered during bootup in kern.log.

pi@raspberrypi:~ $ aplay -l
aplay: device_list:272: no soundcards found...
 



Basil Gunn
 

I did not "recover" from any script. I flashed the image again, so
that you would be satisfied that I am not running the wrong script.
The only thing I ran on the fresh image was aplay -l
OK. I will try to replicate your problem with a Pi 3 Model B+
and a 0x0204 DRAWS hat later today.

I posted the result of aplay -l already:
pi@raspberrypi:~ $ aplay -l
aplay: device_list:272: no soundcards found...
You've posted 3 outputs of aplay -l and 2 had udrc enumerated. It wasn't
clear to me which image version you were using.

Could you try a couple of power cycles and warm
reboots to see if 'aplay -l' is consistently not enumerating the udrc
codec.

Also please post the output of bug_info.sh

cd
cd n7nix/bin
./bug_info.sh

I started a new thread to have the title updated to "Failure with
NWDR20" so that other people would be able to find it.
Ok, thanks.


Brian Badger
 

I fixed the problem by deleting everything from /boot/config.txt except this:

dtoverlay=
# enable udrc/draws if no eeprom
dtoverlay=draws,alsaname=udrc
force_turbo=1
# Enable audio (loads snd_bcm2835)
dtparam=audio=on

If you want to debug this problem, start by looking at everything in /boot/config.txt before that.


Basil Gunn
 

Brian,

Thanks! Nice work!
I have a hunch it's because the /boot/config.txt file is biased towards
an RPi 4.

/Basil

Brian Badger <brian@badgerfamily.com> writes:

I fixed the problem by deleting everything from /boot/config.txt except this:

dtoverlay=
# enable udrc/draws if no eeprom
dtoverlay=draws,alsaname=udrc
force_turbo=1
# Enable audio (loads snd_bcm2835)
dtparam=audio=on

If you want to debug this problem, start by looking at everything in /boot/config.txt before that.


Basil Gunn
 

I tried to verify your problem on an RPi 3B+ and a DRAWS 0x0204 and
could not.

Removed both the dtparam=i2c* statements from /boot/config.txt file and
didn't find a problem on either RPi 4B or RPi 3B+.

I think the problem you where seeing is due to the order in which some
modules run which is not consistent with Linux kernels that run systemd
like Debian/Raspbian.

I will update the NWDR20 image with a /boot/config.txt file without the
dtparams.

Thanks for your help.

/Basil

Basil Gunn <basil@pacabunga.com> writes:

Brian,

Thanks! Nice work!
I have a hunch it's because the /boot/config.txt file is biased towards
an RPi 4.

/Basil

Brian Badger <brian@badgerfamily.com> writes:

I fixed the problem by deleting everything from /boot/config.txt except this:

dtoverlay=
# enable udrc/draws if no eeprom
dtoverlay=draws,alsaname=udrc
force_turbo=1
# Enable audio (loads snd_bcm2835)
dtparam=audio=on

If you want to debug this problem, start by looking at everything in /boot/config.txt before that.