WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: TC8 Beta4 + HiFiBerry DAC+  (Read 2305 times)

Offline xqtm

  • WikiUser
  • *
  • Posts: 9
TC8 Beta4 + HiFiBerry DAC+
« on: July 29, 2016, 06:43:05 AM »
Hi everybody

I need some help with the HiFiBerry DAC+ under TC8.
I've managed how to make it appear under Aplay, but cannot play anything.
With Volumio all is working.

This is the error :

Code: [Select]
aplay 07.mp3
Playing raw data '07.mp3' : Unsigned 8 bit, Rate 8000 Hz, Mono
aplay: set_params:1361: Unable to install hw params:
ACCESS:  RW_INTERLEAVED
FORMAT:  U8
SUBFORMAT:  STD
SAMPLE_BITS: 8
FRAME_BITS: 8
CHANNELS: 1
RATE: 8000
PERIOD_TIME: 125000
PERIOD_SIZE: 1000
PERIOD_BYTES: 1000
PERIODS: 4
BUFFER_TIME: 500000
BUFFER_SIZE: 4000
BUFFER_BYTES: 4000
TICK_TIME: 0


This is system status:

Dmsg:
Code: [Select]
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Initializing cgroup subsys cpuset
[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Initializing cgroup subsys cpuacct
[    0.000000] Linux version 4.4.15-piCore+ (root@beta.hasix.org) (gcc version 4.9.1 (crosstool-NG 1.20.0) ) #1 Mon Jul 18 10:18:29 CEST 2016
[    0.000000] CPU: ARMv6-compatible processor [410fb767] revision 7 (ARMv7), cr=00c5387d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT nonaliasing instruction cache
[    0.000000] Machine model: Raspberry Pi Model B Plus Rev 1.2
[    0.000000] cma: Reserved 8 MiB at 0x1b000000
[    0.000000] Memory policy: Data cache writeback
[    0.000000] On node 0 totalpages: 114688
[    0.000000] free_area_init_node: node 0, pgdat c0896b90, node_mem_map dac10000
[    0.000000]   Normal zone: 1008 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 114688 pages, LIFO batch:31
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 113680
[    0.000000] Kernel command line: dma.dmachans=0x7f35 bcm2708_fb.fbwidth=1824 bcm2708_fb.fbheight=984 bcm2708.boardrev=0x900032 bcm2708.serial=0x5b5bae99 smsc95xx.macaddr=B8:27:EB:5B:AE:99 bcm2708_fb.fbswap=1 bcm2708.uart_clock=3000000 bcm2708.disk_led_gpio=47 bcm2708.disk_led_active_low=0 vc_mem.mem_base=0x1ec00000 vc_mem.mem_size=0x20000000  dwc_otg.lpm_enable=0 console=ttyAMA0,115200 console=tty1 root=/dev/ram0 elevator=deadline rootwait quiet nortc loglevel=3 noembed
[    0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.000000] Memory: 432020K/458752K available (6116K kernel code, 439K rwdata, 1860K rodata, 380K init, 732K bss, 18540K reserved, 8192K cma-reserved)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xdc800000 - 0xff800000   ( 560 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xdc000000   ( 448 MB)
[    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)
[    0.000000]       .text : 0xc0008000 - 0xc07d245c   (7978 kB)
[    0.000000]       .init : 0xc07d3000 - 0xc0832000   ( 380 kB)
[    0.000000]       .data : 0xc0832000 - 0xc089fc68   ( 440 kB)
[    0.000000]        .bss : 0xc089fc68 - 0xc0956f30   ( 733 kB)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS:16 nr_irqs:16 16
[    0.000028] sched_clock: 32 bits at 1000kHz, resolution 1000ns, wraps every 2147483647500ns
[    0.000072] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1911260446275 ns
[    0.000172] bcm2835: system timer (irq = 27)
[    0.000488] Console: colour dummy device 80x30
[    0.000707] console [tty1] enabled
[    0.000737] Calibrating delay loop... 697.95 BogoMIPS (lpj=3489792)
[    0.060310] pid_max: default: 32768 minimum: 301
[    0.060696] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.060724] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.061721] Disabling cpuset control group subsystem
[    0.061772] Initializing cgroup subsys io
[    0.061808] Initializing cgroup subsys memory
[    0.061865] Initializing cgroup subsys devices
[    0.061897] Initializing cgroup subsys freezer
[    0.061928] Initializing cgroup subsys net_cls
[    0.062018] CPU: Testing write buffer coherency: ok
[    0.062097] ftrace: allocating 20888 entries in 62 pages
[    0.174020] Setting up static identity map for 0x81c0 - 0x81f8
[    0.175858] devtmpfs: initialized
[    0.184417] VFP support v0.3: implementor 41 architecture 1 part 20 variant b rev 5
[    0.184967] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.186737] pinctrl core: initialized pinctrl subsystem
[    0.187620] NET: Registered protocol family 16
[    0.193209] DMA: preallocated 4096 KiB pool for atomic coherent allocations
[    0.202791] hw-breakpoint: found 6 breakpoint and 1 watchpoint registers.
[    0.202821] hw-breakpoint: maximum watchpoint size is 4 bytes.
[    0.202985] Serial: AMBA PL011 UART driver
[    0.203413] 20201000.uart: ttyAMA0 at MMIO 0x20201000 (irq = 81, base_baud = 0) is a PL011 rev2
[    0.203865] console [ttyAMA0] enabled
[    0.204628] bcm2835-mbox 2000b880.mailbox: mailbox enabled
[    0.249588] bcm2835-dma 20007000.dma: DMA legacy API manager at f2007000, dmachans=0x1
[    0.250495] SCSI subsystem initialized
[    0.250834] usbcore: registered new interface driver usbfs
[    0.250969] usbcore: registered new interface driver hub
[    0.251180] usbcore: registered new device driver usb
[    0.253977] raspberrypi-firmware soc:firmware: Attached to firmware from 2016-07-15 17:50
[    0.281804] clocksource: Switched to clocksource timer
[    0.333405] FS-Cache: Loaded
[    0.333865] CacheFiles: Loaded
[    0.353152] NET: Registered protocol family 2
[    0.354486] TCP established hash table entries: 4096 (order: 2, 16384 bytes)
[    0.354589] TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
[    0.354690] TCP: Hash tables configured (established 4096 bind 4096)
[    0.354793] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.354831] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.355193] NET: Registered protocol family 1
[    0.355819] RPC: Registered named UNIX socket transport module.
[    0.355846] RPC: Registered udp transport module.
[    0.355859] RPC: Registered tcp transport module.
[    0.355870] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.356323] Trying to unpack rootfs image as initramfs...
[    0.925304] Freeing initrd memory: 4424K (dbb9e000 - dbff0000)
[    0.943616] hw perfevents: enabled with armv6_1176 PMU driver, 3 counters available
[    0.945131] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.960438] zbud: loaded
[    0.961769] VFS: Disk quotas dquot_6.6.0
[    0.962291] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.965011] FS-Cache: Netfs 'nfs' registered for caching
[    0.966415] NFS: Registering the id_resolver key type
[    0.966507] Key type id_resolver registered
[    0.966524] Key type id_legacy registered
[    0.976233] jitterentropy: Initialization failed with host not compliant with requirements: 2
[    0.976435] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252)
[    0.976855] io scheduler noop registered
[    0.976893] io scheduler deadline registered (default)
[    0.977297] io scheduler cfq registered
[    0.980123] BCM2708FB: allocated DMA memory 5b400000
[    0.980199] BCM2708FB: allocated DMA channel 0 @ f2007000
[    1.004243] Console: switching to colour frame buffer device 228x61
[    1.901127] bcm2835-rng 20104000.rng: hwrng registered
[    1.901441] vc-cma: Videocore CMA driver
[    1.901464] vc-cma: vc_cma_base      = 0x00000000
[    1.901478] vc-cma: vc_cma_size      = 0x00000000 (0 MiB)
[    1.901490] vc-cma: vc_cma_initial   = 0x00000000 (0 MiB)
[    1.901998] vc-mem: phys_addr:0x00000000 mem_base=0x1ec00000 mem_size:0x20000000(512 MiB)
[    1.928165] brd: module loaded
[    1.940720] loop: module loaded
[    1.942110] vchiq: vchiq_init_state: slot_zero = 0xdb480000, is_master = 0
[    1.944629] Loading iSCSI transport class v2.0-870.
[    1.946052] usbcore: registered new interface driver smsc95xx
[    1.946178] dwc_otg: version 3.00a 10-AUG-2012 (platform bus)
[    2.147012] Core Release: 2.80a
[    2.147051] Setting default values for core params
[    2.147100] Finished setting default values for core params
[    2.347527] Using Buffer DMA mode
[    2.347555] Periodic Transfer Interrupt Enhancement - disabled
[    2.347569] Multiprocessor Interrupt Enhancement - disabled
[    2.347584] OTG VER PARAM: 0, OTG VER FLAG: 0
[    2.347683] Dedicated Tx FIFOs mode
[    2.348237] WARN::dwc_otg_hcd_init:1047: FIQ DMA bounce buffers: virt = 0xdb414000 dma = 0x5b414000 len=9024
[    2.348279] FIQ FSM acceleration enabled for :
[    2.348279] Non-periodic Split Transactions
[    2.348279] Periodic Split Transactions
[    2.348279] High-Speed Isochronous Endpoints
[    2.348279] Interrupt/Control Split Transaction hack enabled
[    2.348316] dwc_otg: Microframe scheduler enabled
[    2.348399] WARN::hcd_init_fiq:413: FIQ on core 0 at 0xc04170e4
[    2.348422] WARN::hcd_init_fiq:414: FIQ ASM at 0xc04173c0 length 36
[    2.348455] WARN::hcd_init_fiq:439: MPHI regs_base at 0xdc898000
[    2.348533] dwc_otg 20980000.usb: DWC OTG Controller
[    2.348602] dwc_otg 20980000.usb: new USB bus registered, assigned bus number 1
[    2.348681] dwc_otg 20980000.usb: irq 56, io mem 0x00000000
[    2.348745] Init: Port Power? op_state=1
[    2.348757] Init: Power Port (0)
[    2.349155] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    2.349184] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    2.349203] usb usb1: Product: DWC OTG Controller
[    2.349220] usb usb1: Manufacturer: Linux 4.4.15-piCore+ dwc_otg_hcd
[    2.349238] usb usb1: SerialNumber: 20980000.usb
[    2.350499] hub 1-0:1.0: USB hub found
[    2.350602] hub 1-0:1.0: 1 port detected
[    2.351541] dwc_otg: FIQ enabled
[    2.351564] dwc_otg: NAK holdoff enabled
[    2.351577] dwc_otg: FIQ split-transaction FSM enabled
[    2.351634] Module dwc_common_port init
[    2.352283] usbcore: registered new interface driver usb-storage
[    2.352810] mousedev: PS/2 mouse device common for all mice
[    2.354102] bcm2835-cpufreq: min=700000 max=700000
[    2.354549] sdhci: Secure Digital Host Controller Interface driver
[    2.354570] sdhci: Copyright(c) Pierre Ossman
[    2.355107] sdhost: log_buf @ db413000 (5b413000)
[    2.431890] mmc0: sdhost-bcm2835 loaded - DMA enabled (>1)
[    2.452613] sdhci-pltfm: SDHCI platform and OF driver helper
[    2.453540] ledtrig-cpu: registered to indicate activity on CPUs
[    2.453847] hidraw: raw HID events driver (C) Jiri Kosina
[    2.454180] usbcore: registered new interface driver usbhid
[    2.454199] usbhid: USB HID core driver
[    2.455055] Initializing XFRM netlink socket
[    2.455129] NET: Registered protocol family 17
[    2.455366] Key type dns_resolver registered
[    2.457641] registered taskstats version 1
[    2.457899] zswap: loaded using pool lzo/zbud
[    2.530453] mmc0: host does not support reading read-only switch, assuming write-enable
[    2.532776] mmc0: new high speed SDHC card at address 1234
[    2.542390] mmcblk0: mmc0:1234 SA16G 14.4 GiB
[    2.545162]  mmcblk0: p1 p2 p3
[    2.552114] Indeed it is in host mode hprt0 = 00021501
[    2.615116] Key type encrypted registered
[    2.615322] vc-sm: Videocore shared memory driver
[    2.615349] [vc_sm_connected_init]: start
[    2.616996] [vc_sm_connected_init]: end - returning 0
[    2.617528] of_cfs_init
[    2.617722] of_cfs_init: OK
[    2.620362] Freeing unused kernel memory: 380K (c07d3000 - c0832000)
[    2.792039] usb 1-1: new high-speed USB device number 2 using dwc_otg
[    2.792298] Indeed it is in host mode hprt0 = 00001101
[    3.072546] usb 1-1: New USB device found, idVendor=0424, idProduct=9514
[    3.072583] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[    3.073959] hub 1-1:1.0: USB hub found
[    3.074167] hub 1-1:1.0: 5 ports detected
[    3.351947] usb 1-1.1: new high-speed USB device number 3 using dwc_otg
[    3.452476] usb 1-1.1: New USB device found, idVendor=0424, idProduct=ec00
[    3.452512] usb 1-1.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[    3.455924] smsc95xx v1.0.4
[    3.531022] smsc95xx 1-1.1:1.0 eth0: register 'smsc95xx' at usb-20980000.usb-1.1, smsc95xx USB 2.0 Ethernet, b8:27:eb:5b:ae:99
[    3.612891] usb 1-1.4: new low-speed USB device number 4 using dwc_otg
[    3.719777] usb 1-1.4: New USB device found, idVendor=0461, idProduct=0010
[    3.719816] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    3.719837] usb 1-1.4: Product: USB Keyboard
[    3.719855] usb 1-1.4: Manufacturer: NOVATEK
[    3.731943] input: NOVATEK USB Keyboard as /devices/platform/soc/20980000.usb/usb1/1-1/1-1.4/1-1.4:1.0/0003:0461:0010.0001/input/input0
[    3.793194] hid-generic 0003:0461:0010.0001: input,hidraw0: USB HID v1.10 Keyboard [NOVATEK USB Keyboard] on usb-20980000.usb-1.4/input0
[    3.812494] input: NOVATEK USB Keyboard as /devices/platform/soc/20980000.usb/usb1/1-1/1-1.4/1-1.4:1.1/0003:0461:0010.0002/input/input1
[    3.872674] hid-generic 0003:0461:0010.0002: input,hidraw1: USB HID v1.10 Device [NOVATEK USB Keyboard] on usb-20980000.usb-1.4/input1
[    4.604711] zram: Added device: zram0
[    5.292109] bcm2835-wdt 20100000.watchdog: Broadcom BCM2835 watchdog timer
[    5.323656] gpiomem-bcm2835 20200000.gpiomem: Initialised: Registers at 0x20200000
[    5.359223] bcm2708_i2c 20804000.i2c: BSC1 Controller at 0x20804000 (irq 77) (baudrate 100000)
[    6.079291] zram0: detected capacity change from 0 to 106160128
[    6.115087] random: mkswap urandom read with 114 bits of entropy available
[    6.131344] Adding 103668k swap on /dev/zram0.  Priority:-1 extents:1 across:103668k SSFS
[    6.588169] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    7.509595] random: nonblocking pool is initialized
[    8.503174] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[    8.642527] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[   16.228424] snd-hifiberry-dac soc:sound: pcm5102a-hifi <-> 20203000.i2s mapping ok
[   16.349446] i2c /dev entries driver
[   16.472238] uart-pl011 20201000.uart: no DMA platform data
[   18.292544] smsc95xx 1-1.1:1.0 eth0: hardware isn't capable of remote wakeup
[   20.008964] smsc95xx 1-1.1:1.0 eth0: link up, 100Mbps, full-duplex, lpa 0xC1E1

config.txt

Code: [Select]
[PI0]
initramfs 8.0beta4.gz followkernel
kernel kernel4415.img
cmdline cmdline.txt

[PI1]
initramfs 8.0beta4.gz followkernel
kernel kernel4415.img
cmdline cmdline.txt

[PI2]
initramfs 8.0beta4v7.gz followkernel
kernel kernel4415v7.img
cmdline cmdline.txt

[PI3]
initramfs 8.0beta4v7.gz followkernel
kernel kernel4415v7.img
cmdline cmdline3.txt

[ALL]
dtparam=i2c=on,spi=on,i2s=on
dtoverlay=hifiberry-dac
enable_uart=1

[PI3]
dtoverlay=pi3-disable-bt



Offline xqtm

  • WikiUser
  • *
  • Posts: 9
Re: TC8 Beta4 + HiFiBerry DAC+
« Reply #1 on: July 29, 2016, 07:15:13 AM »
aplay -L
Code: [Select]
null
    Discard all samples (playback) or generate zero samples (capture)
default:CARD=sndrpihifiberry
    snd_rpi_hifiberry_dac,
    Default Audio Device
sysdefault:CARD=sndrpihifiberry
    snd_rpi_hifiberry_dac,
    Default Audio Device

alsa.conf
Code: [Select]
#
#  ALSA library configuration file
#

# pre-load the configuration files

@hooks [
        {
                func load
                files [
                        {
                                @func concat
                                strings [
                                        { @func datadir }
                                        "/alsa.conf.d/"
                                ]
                        }
                        "/etc/asound.conf"
                        "~/.asoundrc"
                ]
                errors false
        }
]

# load card-specific configuration files (on request)

cards.@hooks [
        {
                func load
                files [
                        {
                                @func concat
                                strings [
                                        { @func datadir }
                                        "/cards/aliases.conf"
                                ]
                        }
                ]
        }
        {
                func load_for_all_cards
                files [
                        {
                                @func concat
                                strings [
                                        { @func datadir }
                                        "/cards/"
                                        { @func private_string }
                                        ".conf"
                                ]
                        }
                ]
                errors false
        }
]

#
# defaults
#

# show all name hints also for definitions without hint {} section
defaults.namehint.showall off
# show just basic name hints
defaults.namehint.basic on
# show extended name hints
defaults.namehint.extended off
#
defaults.ctl.card 0
defaults.pcm.card 0
defaults.pcm.device 0
defaults.pcm.subdevice -1
defaults.pcm.nonblock 1
defaults.pcm.compat 0
defaults.pcm.minperiodtime 5000         # in us
defaults.pcm.ipc_key 5678293
defaults.pcm.ipc_gid staff
defaults.pcm.ipc_perm 0660
defaults.pcm.dmix.max_periods 0
defaults.pcm.dmix.rate 48000
defaults.pcm.dmix.format "unchanged"
defaults.pcm.dmix.card defaults.pcm.card
defaults.pcm.dmix.device defaults.pcm.device
defaults.pcm.dsnoop.card defaults.pcm.card
defaults.pcm.dsnoop.device defaults.pcm.device
defaults.pcm.front.card defaults.pcm.card
defaults.pcm.front.device defaults.pcm.device
defaults.pcm.rear.card defaults.pcm.card
defaults.pcm.rear.device defaults.pcm.device
defaults.pcm.center_lfe.card defaults.pcm.card
defaults.pcm.center_lfe.device defaults.pcm.device
defaults.pcm.side.card defaults.pcm.card
defaults.pcm.side.device defaults.pcm.device
defaults.pcm.surround21.card defaults.pcm.card
defaults.pcm.surround21.device defaults.pcm.device
defaults.pcm.surround40.card defaults.pcm.card
defaults.pcm.surround40.device defaults.pcm.device
defaults.pcm.surround41.card defaults.pcm.card
defaults.pcm.surround41.device defaults.pcm.device
defaults.pcm.surround50.card defaults.pcm.card
defaults.pcm.surround50.device defaults.pcm.device
defaults.pcm.surround51.card defaults.pcm.card
defaults.pcm.surround51.device defaults.pcm.device
defaults.pcm.surround71.card defaults.pcm.card
defaults.pcm.surround71.device defaults.pcm.device
defaults.pcm.iec958.card defaults.pcm.card
defaults.pcm.iec958.device defaults.pcm.device
defaults.pcm.modem.card defaults.pcm.card
defaults.pcm.modem.device defaults.pcm.device
# truncate files via file or tee PCM
defaults.pcm.file_format        "raw"
defaults.pcm.file_truncate      true
defaults.rawmidi.card 0
defaults.rawmidi.device 0
defaults.rawmidi.subdevice -1
defaults.hwdep.card 0
defaults.hwdep.device 0
defaults.timer.class 2
defaults.timer.sclass 0
defaults.timer.card 0
defaults.timer.device 0
defaults.timer.subdevice 0

#
#  PCM interface
#

# redirect to load-on-demand extended pcm definitions
pcm.cards cards.pcm

pcm.default cards.pcm.default
pcm.sysdefault cards.pcm.default
pcm.front cards.pcm.front
pcm.rear cards.pcm.rear
pcm.center_lfe cards.pcm.center_lfe
pcm.side cards.pcm.side
pcm.surround21 cards.pcm.surround21
pcm.surround40 cards.pcm.surround40
pcm.surround41 cards.pcm.surround41
pcm.surround50 cards.pcm.surround50
pcm.surround51 cards.pcm.surround51
pcm.surround71 cards.pcm.surround71
pcm.iec958 cards.pcm.iec958
pcm.spdif iec958
pcm.hdmi cards.pcm.hdmi
pcm.dmix cards.pcm.dmix
pcm.dsnoop cards.pcm.dsnoop
pcm.modem cards.pcm.modem
pcm.phoneline cards.pcm.phoneline

pcm.hw {
        @args [ CARD DEV SUBDEV ]
        @args.CARD {
                type string
                default {
                        @func getenv
                        vars [
                                ALSA_PCM_CARD
                                ALSA_CARD
                        ]
                        default {
                                @func refer
                                name defaults.pcm.card
                        }
                }
        }
        @args.DEV {
                type integer
                default {
                        @func igetenv
                        vars [
                                ALSA_PCM_DEVICE
                        ]
                        default {
                                @func refer
                                name defaults.pcm.device
                        }
                }
        }
        @args.SUBDEV {
                type integer
                default {
                        @func refer
                        name defaults.pcm.subdevice
                }
        }
        type hw
        card $CARD
        device $DEV
        subdevice $SUBDEV
        hint {
                show {
                        @func refer
                        name defaults.namehint.extended
                }
                description "Direct hardware device without any conversions"
        }
}

pcm.plughw {
        @args [ CARD DEV SUBDEV ]
        @args.CARD {
                type string
                default {
                        @func getenv
                        vars [
                                ALSA_PCM_CARD
                                ALSA_CARD
                        ]
                        default {
                                @func refer
                                name defaults.pcm.card
                        }
                }
        }
        @args.DEV {
                type integer
                default {
                        @func igetenv
                        vars [
                                ALSA_PCM_DEVICE
                        ]
                        default {
                                @func refer
                                name defaults.pcm.device
                        }
                }
        }
        @args.SUBDEV {
                type integer
                default {
                        @func refer
                        name defaults.pcm.subdevice
                }
        }
        type plug
        slave.pcm {
                type hw
                card $CARD
                device $DEV
                subdevice $SUBDEV
        }
        hint {
                show {
                        @func refer
                        name defaults.namehint.extended
                }
                description "Hardware device with all software conversions"
        }
}

pcm.plug {
        @args [ SLAVE ]
        @args.SLAVE {
                type string
        }
        type plug
        slave.pcm $SLAVE
}

pcm.shm {
        @args [ SOCKET PCM ]
        @args.SOCKET {
                type string
        }
        @args.PCM {
                type string
        }
        type shm
        server $SOCKET
        pcm $PCM
}

pcm.tee {
        @args [ SLAVE FILE FORMAT ]
        @args.SLAVE {
                type string
        }
        @args.FILE {
                type string
        }
        @args.FORMAT {
                type string
                default {
                        @func refer
                        name defaults.pcm.file_format
                }
        }
        type file
        slave.pcm $SLAVE
        file $FILE
        format $FORMAT
        truncate {
                @func refer
                name defaults.pcm.file_truncate
        }
}

pcm.file {
        @args [ FILE FORMAT ]
        @args.FILE {
                type string
        }
        @args.FORMAT {
                type string
                default {
                        @func refer
                        name defaults.pcm.file_format
                }
        }
        type file
        slave.pcm null
        file $FILE
        format $FORMAT
        truncate {
                @func refer
                name defaults.pcm.file_truncate
        }
}

pcm.null {
        type null
        hint {
                show {
                        @func refer
                        name defaults.namehint.basic
                }
                description "Discard all samples (playback) or generate zero samples (capture)"
        }
}

#
#  Control interface
#

ctl.sysdefault {
        type hw
        card {
                @func getenv
                vars [
                        ALSA_CTL_CARD
                        ALSA_CARD
                ]
                default {
                        @func refer
                        name defaults.ctl.card
                }
        }
        hint.description "Default control device"
}
ctl.default ctl.sysdefault

ctl.hw {
        @args [ CARD ]
        @args.CARD {
                type string
                default {
                        @func getenv
                        vars [
                                ALSA_CTL_CARD
                                ALSA_CARD
                        ]
                        default {
                                @func refer
                                name defaults.ctl.card
                        }
                }
        }
        type hw
        card $CARD
        hint.description "Direct control device"
}

ctl.shm {
        @args [ SOCKET CTL ]
        @args.SOCKET {
                type string
        }
        @args.CTL {
                type string
        }
        type shm
        server $SOCKET
        ctl $CTL
}

#
#  RawMidi interface
#

rawmidi.default {
        type hw
        card {
                @func getenv
                vars [
                        ALSA_RAWMIDI_CARD
                        ALSA_CARD
                ]
                default {
                        @func refer
                        name defaults.rawmidi.card
                }
        }
        device {
                @func igetenv
                vars [
                        ALSA_RAWMIDI_DEVICE
                ]
                default {
                        @func refer
                        name defaults.rawmidi.device
                }
        }
        hint.description "Default raw MIDI device"
}

rawmidi.hw {
        @args [ CARD DEV SUBDEV ]
        @args.CARD {
                type string
                default {
                        @func getenv
                        vars [
                                ALSA_RAWMIDI_CARD
                                ALSA_CARD
                        ]
                        default {
                                @func refer
                                name defaults.rawmidi.card
                        }
                }
        }
        @args.DEV {
                type integer
                default {
                        @func igetenv
                        vars [
                                ALSA_RAWMIDI_DEVICE
                        ]
                        default {
                                @func refer
                                name defaults.rawmidi.device
                        }
                }
        }
        @args.SUBDEV {
                type integer
                default -1
        }
        type hw
        card $CARD
        device $DEV
        subdevice $SUBDEV
        hint {
                description "Direct rawmidi driver device"
                device $DEV
        }
}

rawmidi.virtual {
        @args [ MERGE ]
        @args.MERGE {
                type string
                default 1
        }
        type virtual
        merge $MERGE
}

#
#  Sequencer interface
#

seq.default {
        type hw
        hint.description "Default sequencer device"
}

seq.hw {
        type hw
}

#
#  HwDep interface
#

hwdep.default {
        type hw
        card {
                @func getenv
                vars [
                        ALSA_HWDEP_CARD
                        ALSA_CARD
                ]
                default {
                        @func refer
                        name defaults.hwdep.card
                }
        }
        device {
                @func igetenv
                vars [
                        ALSA_HWDEP_DEVICE
                ]
                default {
                        @func refer
                        name defaults.hwdep.device
                }
        }
        hint.description "Default hardware dependent device"
}

hwdep.hw {
        @args [ CARD DEV ]
        @args.CARD {
                type string
                default {
                        @func getenv
                        vars [
                                ALSA_HWDEP_CARD
                                ALSA_CARD
                        ]
                        default {
                                @func refer
                                name defaults.hwdep.card
                        }
                }
        }
        @args.DEV {
                type integer
                default {
                        @func igetenv
                        vars [
                                ALSA_HWDEP_DEVICE
                        ]
                        default {
                                @func refer
                                name defaults.hwdep.device
                        }
                }
        }
        type hw
        card $CARD
        device $DEV
        hint {
                description "Direct hardware dependent device"
                device $DEV
        }
}

#
#  Timer interface
#

timer_query.default {
        type hw
}

timer_query.hw {
        type hw
}

timer.default {
        type hw
        class {
                @func refer
                name defaults.timer.class
        }
        sclass {
                @func refer
                name defaults.timer.sclass
        }
        card {
                @func refer
                name defaults.timer.card
        }
        device {
                @func refer
                name defaults.timer.device
        }
        subdevice {
                @func refer
                name defaults.timer.subdevice
        }
        hint.description "Default timer device"
}

timer.hw {
        @args [ CLASS SCLASS CARD DEV SUBDEV ]
        @args.CLASS {
                type integer
                default {
                        @func refer
                        name defaults.timer.class
                }
        }
        @args.SCLASS {
                type integer
                default {
                        @func refer
                        name defaults.timer.sclass
                }
        }
        @args.CARD {
                type string
                default {
                        @func refer
                        name defaults.timer.card
                }
        }
        @args.DEV {
                type integer
                default {
                        @func refer
                        name defaults.timer.device
                }
        }
        @args.SUBDEV {
                type integer
                default {
                        @func refer
                        name defaults.timer.subdevice
                }
        }
        type hw
        class $CLASS
        sclass $SCLASS
        card $CARD
        device $DEV
        subdevice $SUBDEV
        hint {
                description "Direct timer device"
                device $DEV
        }
}

Offline tatemono

  • WikiUser
  • *
  • Posts: 18
Re: TC8 Beta4 + HiFiBerry DAC+
« Reply #2 on: August 02, 2016, 08:45:26 AM »
Hi everybody

I need some help with the HiFiBerry DAC+ under TC8.
I've managed how to make it appear under Aplay, but cannot play anything.
With Volumio all is working.

This is the error :

Code: [Select]
aplay 07.mp3
Playing raw data '07.mp3' : Unsigned 8 bit, Rate 8000 Hz, Mono
aplay: set_params:1361: Unable to install hw params:
ACCESS:  RW_INTERLEAVED
FORMAT:  U8
SUBFORMAT:  STD
SAMPLE_BITS: 8
FRAME_BITS: 8
CHANNELS: 1
RATE: 8000
PERIOD_TIME: 125000
PERIOD_SIZE: 1000
PERIOD_BYTES: 1000
PERIODS: 4
BUFFER_TIME: 500000
BUFFER_SIZE: 4000
BUFFER_BYTES: 4000
TICK_TIME: 0


I don't think that aplay supports MP3 audio file.  Please refer to the following command to find out all file types that aplay supports.

Code: [Select]
$ aplay -h | grep type
-t, --file-type TYPE    file type (voc, wav, raw or au)


Offline Greg Erskine

  • Sr. Member
  • ****
  • Posts: 375
Re: TC8 Beta4 + HiFiBerry DAC+
« Reply #3 on: August 02, 2016, 05:04:52 PM »
hi xqtm,

Did you add the appropriate overlay for your DAC to config.txt?

Here's an example. See REAMDE on boot partition in subdirectory overlay.

dtoverlay=hifiberry-dac

regards
Greg