• Disclaimer: This Vendor's Forum is a paid-for commercial area. Unlike the rest of diyAudio, the Vendor has complete control of what may or may not be posted in this forum. If you wish to discuss technical matters outside the bounds of what is permitted by the Vendor, please use the non-commercial areas of diyAudio to do so.

Support for Botic Linux driver

"Unable to set hw params for playback: Invalid argument
Setting of hwparams failed: Invalid argument"

This should not happen.

Did you set or updated helper? I'm not sure if I have retested it without helper installed after the last change.

In any case please try following:

# create dummy helper
echo -e '#!/bin/bash\nexit 0' > /sbin/botic_helper
chmod +x /sbin/botic_helper
# enable helper (you can add this to /etc/rc.local)
echo "/sbin/botic_helper" > /sys/module/snd_soc_botic/parameters/helper_cmd

I hope this will help.
 
No. No sound.
I tried "dummy helper": "Unable to set hw params for playback: Invalid argument
Setting of hwparams failed: Invalid argument"
After that dummy helper was removed and I have already installed "real" helper.
Same results.
"master trim" volume control in alsamixer do not set volume (reset to -120db).
 
Last edited:
Thanks for Botic Update:)
Strange thing: when I run new version of Botic (5) with Squeezelite I can see about 1% CPU Load whilst old (3.2) version need 40% of CPU to play 16/44.1 files with upsampling to 192kHz. Unfortunately I cannot hear whether a new version 'produce' any sound since I still waiting for second batch of Hermes+Cronus.
Old version enable automatically switching output between hw: and plughw:
Old:
Code:
[15:57:19.403385] output_thread:638 open output device: hw:CARD=BOTICAudio,DEV=0
[15:57:19.403602] alsa_open:355 opening device at: 44100
[15:57:19.404495] alsa_open:385 reopening device hw:CARD=BOTICAudio,DEV=0 in plug mode as plughw:CARD=BOTICAudio,DEV=0 for resampling
[15:57:19.407007] alsa_open:406 opened device plughw:CARD=BOTICAudio,DEV=0 using format: S32_LE sample rate: 44100 mmap: 1
New:
Code:
[06:09:32.935163] output_thread:638 open output device: hw:CARD=Botic,DEV=0
[06:09:32.935372] alsa_open:355 opening device at: 44100
[06:09:32.936121] alsa_open:406 opened device hw:CARD=Botic,DEV=0 using format: S32_LE sample rate: 44100 mmap: 1
See full squeezelite logs below from old and new versions of Botic for playing two flac files (16/44,1 and 24/96):
OLD 3.2 Botic
NEW 5.0 Botic
 
Herznn: here it works well even without helper, but I'm using different config...

let's try to check & compare settings and operations:
Code:
# print all botic settings
root@botic:~# for i in /sys/module/snd_soc_botic/parameters/*; do echo "* $i"; cat $i; done
* /sys/module/snd_soc_botic/parameters/blr_ratio
64
* /sys/module/snd_soc_botic/parameters/clk_44k1
22579200
* /sys/module/snd_soc_botic/parameters/clk_48k
24576000
* /sys/module/snd_soc_botic/parameters/dai_format
16385
* /sys/module/snd_soc_botic/parameters/dsd_format_switch
1
* /sys/module/snd_soc_botic/parameters/ext_masterclk
3
* /sys/module/snd_soc_botic/parameters/helper_cmd
* /sys/module/snd_soc_botic/parameters/pinconfig
default
* /sys/module/snd_soc_botic/parameters/serconfig
MDMD
# use custom helper to dump hw settings
root@botic:~# echo -e '#!/bin/bash\nlogger -p 0 "$@"' > /sbin/botic_helper_log
root@botic:~# chmod +x /sbin/botic_helper_log
root@botic:~# echo /sbin/botic_helper_log > /sys/module/snd_soc_botic/parameters/helper_cmd
root@botic:~# speaker-test -c 2

speaker-test 1.0.27.2

Playback device is default
Stream parameters are 48000Hz, S16_LE, 2 channels
Using 16 octaves of pink noise
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 64 to 16384
Period size range from 3 to 1025
Using max buffer size 16384
Periods = 4
was set period_size = 1024
was set buffer_size = 16384

Message from syslogd@botic at Apr 29 20:47:28 ...
 logger: hw_params,P,2,16385,96000,24576000,6144000,0,2,0,2,0,0
 0 - Front Left
 1 - Front Right
<Ctrl+C>

Please post your "logger: hw_params," line...

meaning:
- hw_params (operation name)
- P (playback)
- 2 (channels)
- 16385 (dai format)
- 96000 (freq)
- 24576000 (mclk freq)
- 6144000 (bclk freq)
- 0 (this is not DSD stream)
- 2 (number of data outputs ~ serconfig)
- 0 (# of the 1st output)
- 2 (# of the 2nd output)
- 0 (# of the 3rd output - not used here)
- 0 (# of the 4th output - not used here)
 
Thanks for the update miero.

Installed V4 cos I hadn't gotten round to it earlier then the V5 upgrade. All good using Squeezelite with SOX upsampling.

Odd thing with my initial V4 install tho. I changed snd_soc_botic.ext_masterclk to 2 for external 48k clock only which is what I had done on V3 ( I have a single external 48k oscillator as I only output 96000). Squeezelite player came up but no sound and behaving strangely. Change back to default (3) and played fine. Has anything changed in this area between V3 and V4?
 
Hi, miero! The problem is with s/pdif serializer.
This string works:
optargs=coherent_pool=1M snd_soc_botic.ext_masterclk=7 snd_soc_botic.dsd_format_switch=3 snd_soc_botic.serconfig=--MM snd_soc_botic.pinconfig=compat
But... I've not I2s connected (I must finish reclock). Log is OK.

After changing snd_soc_botic.serconfig=-S-- (or S---) I get the usual:
"Unable to set hw params for playback: Invalid argument
Setting of hwparams failed: Invalid argument"
 
Miero,
With Cronus+Hermes I want to use NOS DAC which has only one (stereo) I2S input (without DSD).
What is optimal Botic settings for single stereo I2S output?
From manual/webpage one can see several options. For example:

  • Serconfig=MMMM and DSD switch=0, or
  • Serconfig=IIII, or
  • using one of the 4 data pins e.g: --I-
Which option could give the best sound?
 
Member
Joined 2004
Paid Member
No USB audio output

Hi, got Botic loaded to eMMC, was using original IP Address from before booting with SD-Botic, for some reason the IP Address is different after loading Botic.
Now, while I'm waiting for parts to build up the Cronus etc. I'd like to output audio to my XMOS device. I've been searching for an answer, no luck yet. So, I'm being a pest again.
MPD shows a file is playing from a remote source but no usb output.

Perhaps Botic isn't setup for usb output and that's fine, I can wait until the Cronus/Hermes is built. :)
 
.....

Enjoy and report if it does not work. Thanks.
Miero I've made a little tests of Botic v 5.0 and squeezelite.
My BBB settings:
Code:
root@botic:~# for i in /sys/module/snd_soc_botic/parameters/*; do echo "* $i"; cat $i; done
* /sys/module/snd_soc_botic/parameters/blr_ratio
64
* /sys/module/snd_soc_botic/parameters/clk_44k1
0
* /sys/module/snd_soc_botic/parameters/clk_48k
24576000
* /sys/module/snd_soc_botic/parameters/dai_format
16385
* /sys/module/snd_soc_botic/parameters/dsd_format_switch
1
* /sys/module/snd_soc_botic/parameters/ext_masterclk
0
* /sys/module/snd_soc_botic/parameters/helper_cmd
* /sys/module/snd_soc_botic/parameters/pinconfig
default
* /sys/module/snd_soc_botic/parameters/serconfig
I---

root@botic:~# speaker-test -c 2 -F S32_LE -r 48000
speaker-test 1.0.27.2
Playback device is default
Stream parameters are 48000Hz, S32_LE, 2 channels
Using 16 octaves of pink noise
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 32 to 8192
Period size range from 1 to 513
Using max buffer size 8192
Periods = 4
was set period_size = 512
was set buffer_size = 8192
 0 - Front Left
 1 - Front Right
Time per period = 5.828077
I'm trying to run squeezelite with following minimum parameters:
Code:
squeezelite -o hw:CARD=Botic,DEV=0 -n BBB -s 192.168.0.1 -a 8192:512:: -R -u vIX:::28 -r 48000
Unfortunately I can't.
In the log I see following errors:
Code:
[08:53:09.186537] alsa_open:485 buffer: 8192 period: 512 -> buffer size: 8192 period size: 512
[08:53:09.196584] ALSA snd_pcm_hw_hw_params:327 SNDRV_PCM_IOCTL_HW_PARAMS failed (-22)
[08:53:09.196743] alsa_open:502 unable to set hw params: Invalid argument
I am just reporting.
 
Hi, got Botic loaded to eMMC, was using original IP Address from before booting with SD-Botic, for some reason the IP Address is different after loading Botic.
Now, while I'm waiting for parts to build up the Cronus etc. I'd like to output audio to my XMOS device. I've been searching for an answer, no luck yet. So, I'm being a pest again.
MPD shows a file is playing from a remote source but no usb output.

Perhaps Botic isn't setup for usb output and that's fine, I can wait until the Cronus/Hermes is built. :)
Does your XMOS based DAC show up with:
Code:
lsusb
?

or
Code:
lsusb -d 20b1:

Of so, is the needed kernel module loaded?
Code:
lsmod|grep snd_usb_audio
btw It could also be a USB power issue.
 
Member
Joined 2004
Paid Member
Does your XMOS based DAC show up with:
Code:
lsusb
?

or
Code:
lsusb -d 20b1:
Of so, is the needed kernel module loaded?
Code:
lsmod|grep snd_usb_audio
btw It could also be a USB power issue.

Thank you for the help, attached results of lsusb, lsusb -d 20b1 and 20a0 ,
lsmod grep shows kernel module missing.
 

Attachments

  • Botic_Wavio_1.txt
    21.3 KB · Views: 71