Discussion:
[Alsa-user] Backporting advice
Marius Schrecker
2017-03-08 08:46:21 UTC
Permalink
Hi,

  I am running an arm64 soc device with an Allwinner chip that is (for my purposes) locked for the moment to kernel 3.10 .
From a hardware perspective, the device is ideal for my use as a touchscreen audio player, spitting out bit-perfect strams over USB (snd_usb module).
Having said that, one of the goals of the device is to be able to pass through streams natively, including DSD and DSD, especially native DSD to xmos chips has undergone a lot of development since 3.10.

I attach my alsa-info output.

  Can anyone say whether there is any way to backport the relevant bits of the alsa kernel tree to 3.10, to allow native DSD output over USB?

I understand that Native DSD currently only works to XMOS chips. I have ordered an XMOS-based dac for testing and also have a C-Media CM6632-A device, which I'd be interested to see if it were possible to get working with native DSD:
 idVendor           0x0d8c C-Media Electronics, Inc.
  idProduct          0x0062

 Many thanks in advance for any advice.


BR.
 --Marius--


P.S: I am not a coder by any stretch but would be happy to help compile and test.
Clemens Ladisch
2017-03-09 09:12:24 UTC
Permalink
Post by Marius Schrecker
Can anyone say whether there is any way to backport the relevant bits of the alsa kernel tree to 3.10, to allow native DSD output over USB?
That would be possible, if you can find someone to do it.
Post by Marius Schrecker
I am running an arm64 soc device with an Allwinner chip that is (for my purposes) locked for the moment to kernel 3.10 .
Are you paying someone to support that kernel?


Regards,
Clemens
Marius Schrecker
2017-03-10 10:34:47 UTC
Permalink
Hi,

  I have a problem on a system where my only sound device is a USB DAC. All other device driver modules are removed.

The only audio application that should be running is "squeezelite", which starts as a service. towards the end of the init process.

During init, when the DAC is initialised, I always get a few seconds of white noise through bot channels.  This persists until squeezelite starts, at which point it becomes silent.

I've been babnging my head trying to figure aout what's going on, without any success.  I can't see any alsa log, but have tried both disabling alsa-restore.service and manually editing /var/lib/alsa/asound.state to configure all controls to the minimum volume.  So far nothing makes any difference.

  As the noise is muted whenever squeezelite starts, I'm thinking that there must be something that is simply being initialised wrong on the DAC and that the fix must be simple.

  Can anyone suggest what to try?

 aplay -L
null
    Discard all samples (playback) or generate zero samples (capture)
pulse
    PulseAudio Sound Server
default:CARD=PRO
    Sanskrit PRO, USB Audio
    Default Audio Device
sysdefault:CARD=PRO
    Sanskrit PRO, USB Audio
    Default Audio Device
front:CARD=PRO,DEV=0
    Sanskrit PRO, USB Audio
    Front speakers
surround21:CARD=PRO,DEV=0
    Sanskrit PRO, USB Audio
    2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=PRO,DEV=0
    Sanskrit PRO, USB Audio
    4.0 Surround output to Front and Rear speakers
surround41:CARD=PRO,DEV=0
    Sanskrit PRO, USB Audio
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=PRO,DEV=0
    Sanskrit PRO, USB Audio
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=PRO,DEV=0
    Sanskrit PRO, USB Audio
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=PRO,DEV=0
    Sanskrit PRO, USB Audio
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=PRO,DEV=0
    Sanskrit PRO, USB Audio
    IEC958 (S/PDIF) Digital Audio Output
dmix:CARD=PRO,DEV=0
    Sanskrit PRO, USB Audio
    Direct sample mixing device
dsnoop:CARD=PRO,DEV=0
    Sanskrit PRO, USB Audio
    Direct sample snooping device
hw:CARD=PRO,DEV=0
    Sanskrit PRO, USB Audio
    Direct hardware device without any conversions
plughw:CARD=PRO,DEV=0
    Sanskrit PRO, USB Audio
    Hardware device with all software conversions

squeezelite-R2 -l
Output devices:
  null                           - Discard all samples (playback) or generate zero samples (capture)
  pulse                          - PulseAudio Sound Server
  default:CARD=PRO               - Sanskrit PRO, USB Audio - Default Audio Device
  sysdefault:CARD=PRO            - Sanskrit PRO, USB Audio - Default Audio Device
  front:CARD=PRO,DEV=0           - Sanskrit PRO, USB Audio - Front speakers
  surround21:CARD=PRO,DEV=0      - Sanskrit PRO, USB Audio - 2.1 Surround output to Front and Subwoofer speakers
  surround40:CARD=PRO,DEV=0      - Sanskrit PRO, USB Audio - 4.0 Surround output to Front and Rear speakers
  surround41:CARD=PRO,DEV=0      - Sanskrit PRO, USB Audio - 4.1 Surround output to Front, Rear and Subwoofer speakers
  surround50:CARD=PRO,DEV=0      - Sanskrit PRO, USB Audio - 5.0 Surround output to Front, Center and Rear speakers
  surround51:CARD=PRO,DEV=0      - Sanskrit PRO, USB Audio - 5.1 Surround output to Front, Center, Rear and Subwoofer speakers
  surround71:CARD=PRO,DEV=0      - Sanskrit PRO, USB Audio - 7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
  iec958:CARD=PRO,DEV=0          - Sanskrit PRO, USB Audio - IEC958 (S/PDIF) Digital Audio Output
  dmix:CARD=PRO,DEV=0            - Sanskrit PRO, USB Audio - Direct sample mixing device
  dsnoop:CARD=PRO,DEV=0          - Sanskrit PRO, USB Audio - Direct sample snooping device
  hw:CARD=PRO,DEV=0              - Sanskrit PRO, USB Audio - Direct hardware device without any conversions
  plughw:CARD=PRO,DEV=0          - Sanskrit PRO, USB Audio - Hardware device with all software conversions


***@pine64:~# systemctl status alsa-restore.service
● alsa-restore.service - Save/Restore Sound Card State
   Loaded: loaded (/lib/systemd/system/alsa-restore.service; static; vendor preset: enabled)
   Active: active (exited) since Fri 2017-03-10 11:33:45 CET; 4s ago
  Process: 2844 ExecStart=/usr/sbin/alsactl -E HOME=/run/alsa restore (code=exited, status=0/SUCCESS)
  Process: 2841 ExecStartPre=/bin/mkdir -p /run/alsa (code=exited, status=0/SUCCESS)
 Main PID: 2844 (code=exited, status=0/SUCCESS)

Mar 10 11:33:45 pine64 systemd[1]: Starting Save/Restore Sound Card State...
Mar 10 11:33:45 pine64 systemd[1]: Started Save/Restore Sound Card State.
***@pine64:~# systemctl status squeezelite.service
● squeezelite.service - LSB: Lightweight headless Squeezebox emulator
   Loaded: loaded (/etc/init.d/squeezelite; bad; vendor preset: enabled)
   Active: active (running) since Fri 2017-03-10 11:08:30 CET; 25min ago
     Docs: man:systemd-sysv-generator(8)
   CGroup: /system.slice/squeezelite.service
           └─1059 /opt/squeezelite/squeezelite-R2 -o hw:CARD=PRO,DEV=0 -p 90 -a 20 4  1 -d all debug -f /var/log/squeezelite.log

Mar 10 11:08:30 pine64 systemd[1]: Starting LSB: Lightweight headless Squeezebox emulator...
Mar 10 11:08:30 pine64 systemd[1]: Started LSB: Lightweight headless Squeezebox emulator.


Any advice?

 BR.

--Marius--
 
Clemens Ladisch
2017-03-10 11:09:19 UTC
Permalink
This post might be inappropriate. Click to display it.
Clemens Ladisch
2017-03-10 11:46:53 UTC
Permalink
~# aplay -v -D hw:CARD=PRO -f S32_LE -c 2 -d 1 /dev/zero
At which point it stopped.
Apparently, the firmware of this device thinks it should play something,
and errorenously does so even if there is not anything to play. (It
might be possible that initializing the driver makes the device think
that it is actually being started.)

Try executing "head -c 5000 /dev/zero | aplay -D hw:PRO -f cd -t raw -"
immediately after the driver is loaded.


Regards,
Clemens
Clemens Ladisch
2017-03-10 13:42:24 UTC
Permalink
Strangely, the same DAC starts completely silent both on my debian laptop kernel 4.8, Debian x86_64 and on my Logitech Squeezebox touch.
Can you narrow it down to some specific kernel version?


Regards,
Clemens
Marius Schrecker
2017-03-10 13:57:16 UTC
Permalink
Well, the problem is that my device is locked to 3.10 (Armbian kernel for pine64), which I know is very old, so can't really test with different kernels on that device.
Strangely, the same DAC starts completely silent both on my debian laptop kernel 4.8, Debian x86_64 and on my Logitech Squeezebox touch.
Can you narrow it down to some specific kernel version?
 
Well, the problem is that my device is locked to 3.10 (Armbian kernel for pine64), which I know is very old, so can't really test with different kernels on that device.


The workaround works, just takes a little while to become active the way I am triggering it now.

  BR.

Marius
 

Loading...