Ah, sory for the noise: I had AUDIODEVICE set up in /etc/profile
to point to another machine (before audio started working on this macbook),
which I only realized now that _that_ machine is up :-)
Recording still doesn't work though.
Is anyone recording on the M1 MacBook Air?
Jan
On Jan 26 18:08:21, [email protected] wrote:
> This is current/arm64 on an M1 MAcBook Air (dmesg below).
> As opposed to the previous snapshots, I now have
>
> aplaudio0 at mainbus0
> audio0 at aplaudio0
>
> Thank you!
>
> I see two problems: when playing, aucat and sox do not find the device.
>
> $ aucat -i file.wav
> default: couldn't open audio device
>
> $ play -n synth
> play FAIL sox: Sorry, there is no default audio device configured
>
> With env AUDIODEVICE=snd/0, both of these commands play just fine;
> it seems a bug that the device needs to be specified, being the default.
>
> Recording doesn't work at all, as the device is opened
> in play-only mode, even with an explicit -m play,rec
> (sndiod -dd log below). Both of
>
> $ env AUDIODEVICE=snd/0 aucat -o file.wav
> $ env AUDIODEVICE=snd/0 rec file.wav
>
> do produce a wav file, but it's silent (yes, kern.audio.record is set).
>
> Are these limitations known?
> How can I help debug this?
>
> # audioctl
> name=aplaudio0
> mode=
> pause=1
> active=0
> nblks=16
> blksz=480
> rate=48000
> encoding=s24le4lsb
> play.channels=2
> play.bytes=0
> play.errors=0
> record.channels=2
> record.bytes=0
> record.errors=0
>
> # mixerctl -av
> outputs.master=255 volume
> record.enable=sysctl [ off on sysctl ]
>
>
> Jan
>
>
>
> OpenBSD 7.2-current (GENERIC.MP) #0: Thu Jan 26 14:43:51 CET 2023
> [email protected]:/usr/src/sys/arch/arm64/compile/GENERIC.MP
> real mem = 7916920832 (7550MB)
> avail mem = 7555305472 (7205MB)
> random: good seed from bootblocks
> mainbus0 at root: Apple MacBook Air (M1, 2020)
> cpu0 at mainbus0 mpidr 0: Apple Icestorm r1p1
> cpu0: 128KB 64b/line 8-way L1 VIPT I-cache, 64KB 64b/line 8-way L1 D-cache
> cpu0: 4096KB 128b/line 16-way L2 cache
> cpu0:
> TLBIOS+IRANGE,TS+AXFLAG,FHM,DP,SHA3,RDM,Atomic,CRC32,SHA2+SHA512,SHA1,AES+PMULL,SPECRES,SB,FRINTTS,GPI,LRCPC+LDAPUR,FCMA,JSCVT,API+PAC,DPB,SpecSEI,PAN+ATS1E1,LO,HPDS,CSV3,CSV2,DIT
> cpu1 at mainbus0 mpidr 1: Apple Icestorm r1p1
> cpu1: 128KB 64b/line 8-way L1 VIPT I-cache, 64KB 64b/line 8-way L1 D-cache
> cpu1: 4096KB 128b/line 16-way L2 cache
> cpu1:
> TLBIOS+IRANGE,TS+AXFLAG,FHM,DP,SHA3,RDM,Atomic,CRC32,SHA2+SHA512,SHA1,AES+PMULL,SPECRES,SB,FRINTTS,GPI,LRCPC+LDAPUR,FCMA,JSCVT,API+PAC,DPB,SpecSEI,PAN+ATS1E1,LO,HPDS,CSV3,CSV2,DIT
> cpu2 at mainbus0 mpidr 2: Apple Icestorm r1p1
> cpu2: 128KB 64b/line 8-way L1 VIPT I-cache, 64KB 64b/line 8-way L1 D-cache
> cpu2: 4096KB 128b/line 16-way L2 cache
> cpu2:
> TLBIOS+IRANGE,TS+AXFLAG,FHM,DP,SHA3,RDM,Atomic,CRC32,SHA2+SHA512,SHA1,AES+PMULL,SPECRES,SB,FRINTTS,GPI,LRCPC+LDAPUR,FCMA,JSCVT,API+PAC,DPB,SpecSEI,PAN+ATS1E1,LO,HPDS,CSV3,CSV2,DIT
> cpu3 at mainbus0 mpidr 3: Apple Icestorm r1p1
> cpu3: 128KB 64b/line 8-way L1 VIPT I-cache, 64KB 64b/line 8-way L1 D-cache
> cpu3: 4096KB 128b/line 16-way L2 cache
> cpu3:
> TLBIOS+IRANGE,TS+AXFLAG,FHM,DP,SHA3,RDM,Atomic,CRC32,SHA2+SHA512,SHA1,AES+PMULL,SPECRES,SB,FRINTTS,GPI,LRCPC+LDAPUR,FCMA,JSCVT,API+PAC,DPB,SpecSEI,PAN+ATS1E1,LO,HPDS,CSV3,CSV2,DIT
> cpu4 at mainbus0 mpidr 10100: Apple Firestorm r1p1
> cpu4: 192KB 64b/line 6-way L1 VIPT I-cache, 128KB 64b/line 8-way L1 D-cache
> cpu4: 12288KB 128b/line 12-way L2 cache
> cpu4:
> TLBIOS+IRANGE,TS+AXFLAG,FHM,DP,SHA3,RDM,Atomic,CRC32,SHA2+SHA512,SHA1,AES+PMULL,SPECRES,SB,FRINTTS,GPI,LRCPC+LDAPUR,FCMA,JSCVT,API+PAC,DPB,SpecSEI,PAN+ATS1E1,LO,HPDS,CSV3,CSV2,DIT
> cpu5 at mainbus0 mpidr 10101: Apple Firestorm r1p1
> cpu5: 192KB 64b/line 6-way L1 VIPT I-cache, 128KB 64b/line 8-way L1 D-cache
> cpu5: 12288KB 128b/line 12-way L2 cache
> cpu5:
> TLBIOS+IRANGE,TS+AXFLAG,FHM,DP,SHA3,RDM,Atomic,CRC32,SHA2+SHA512,SHA1,AES+PMULL,SPECRES,SB,FRINTTS,GPI,LRCPC+LDAPUR,FCMA,JSCVT,API+PAC,DPB,SpecSEI,PAN+ATS1E1,LO,HPDS,CSV3,CSV2,DIT
> cpu6 at mainbus0 mpidr 10102: Apple Firestorm r1p1
> cpu6: 192KB 64b/line 6-way L1 VIPT I-cache, 128KB 64b/line 8-way L1 D-cache
> cpu6: 12288KB 128b/line 12-way L2 cache
> cpu6:
> TLBIOS+IRANGE,TS+AXFLAG,FHM,DP,SHA3,RDM,Atomic,CRC32,SHA2+SHA512,SHA1,AES+PMULL,SPECRES,SB,FRINTTS,GPI,LRCPC+LDAPUR,FCMA,JSCVT,API+PAC,DPB,SpecSEI,PAN+ATS1E1,LO,HPDS,CSV3,CSV2,DIT
> cpu7 at mainbus0 mpidr 10103: Apple Firestorm r1p1
> cpu7: 192KB 64b/line 6-way L1 VIPT I-cache, 128KB 64b/line 8-way L1 D-cache
> cpu7: 12288KB 128b/line 12-way L2 cache
> cpu7:
> TLBIOS+IRANGE,TS+AXFLAG,FHM,DP,SHA3,RDM,Atomic,CRC32,SHA2+SHA512,SHA1,AES+PMULL,SPECRES,SB,FRINTTS,GPI,LRCPC+LDAPUR,FCMA,JSCVT,API+PAC,DPB,SpecSEI,PAN+ATS1E1,LO,HPDS,CSV3,CSV2,DIT
> efi0 at mainbus0: UEFI 2.9
> efi0: Das U-Boot rev 0x20220700
> apm0 at mainbus0
> "opp-table-0" at mainbus0 not configured
> "opp-table-1" at mainbus0 not configured
> agtimer0 at mainbus0: 24000 kHz
> "pmu-e" at mainbus0 not configured
> "pmu-p" at mainbus0 not configured
> "clock-ref" at mainbus0 not configured
> "clock-120m" at mainbus0 not configured
> simplebus0 at mainbus0: "soc"
> aplintc0 at simplebus0 nirq 896 ndie 1
> aplpmgr0 at simplebus0
> aplpinctrl0 at simplebus0
> aplpinctrl1 at simplebus0
> aplpmgr1 at simplebus0
> apldog0 at simplebus0
> aplmbox0 at simplebus0
> aplpinctrl2 at simplebus0
> aplpinctrl3 at simplebus0
> aplmbox1 at simplebus0
> apldart0 at simplebus0: bypass
> apldart1 at simplebus0: bypass
> apldart2 at simplebus0: bypass
> apldart3 at simplebus0: bypass
> apldart4 at simplebus0
> apldart5 at simplebus0: bypass
> aplcpu0 at simplebus0
> apliic0 at simplebus0
> iic0 at apliic0
> tipd0 at iic0 addr 0x38
> tipd1 at iic0 addr 0x3f
> apliic1 at simplebus0
> iic1 at apliic1
> tascodec0 at iic1 addr 0x31
> apliic2 at simplebus0
> iic2 at apliic2
> tascodec1 at iic2 addr 0x34
> "cirrus,cs42l83" at iic2 addr 0x48 not configured
> aplspi0 at simplebus0
> aplhidev0 at aplspi0
> aplkbd0 at aplhidev0: 8 variable keys, 6 key codes
> wskbd0 at aplkbd0: console keyboard
> aplms0 at aplhidev0
> wsmouse0 at aplms0 mux 0
> exuart0 at simplebus0
> exuart1 at simplebus0
> aplspmi0 at simplebus0
> aplpmu0 at aplspmi0 sid 0xf
> aplsmc0 at simplebus0
> aplsart0 at simplebus0
> aplns0 at simplebus0
> nvme0 at aplns0: NVMe 1.1
> nvme0: APPLE SSD AP0256Q, firmware 873.40.4, serial 0ba016e96434ee18
> scsibus0 at nvme0: 2 targets, initiator 0
> sd0 at scsibus0 targ 1 lun 0: <NVMe, APPLE SSD AP0256, 873.>
> sd0: 239372MB, 4096 bytes/sector, 61279344 sectors
> xhci0 at simplebus0, xHCI 1.10
> usb0 at xhci0: USB revision 3.0
> uhub0 at usb0 configuration 1 interface 0 "Generic xHCI root hub" rev
> 3.00/1.00 addr 1
> xhci1 at simplebus0, xHCI 1.10
> usb1 at xhci1: USB revision 3.0
> uhub1 at usb1 configuration 1 interface 0 "Generic xHCI root hub" rev
> 3.00/1.00 addr 1
> aplpcie0 at simplebus0
> pci0 at aplpcie0
> ppb0 at pci0 dev 0 function 0 "Apple M1 PCIe" rev 0x01
> pci1 at ppb0 bus 1
> bwfm0 at pci1 dev 0 function 0 "Broadcom BCM4378" rev 0x03: msi
> vendor "Broadcom", unknown product 0x5f69 (class network subclass
> miscellaneous, rev 0x03) at pci1 dev 0 function 1 not configured
> "clock-ref" at simplebus0 not configured
> aplnco0 at simplebus0
> apldma0 at simplebus0
> aplmca0 at simplebus0
> gpiobl0 at mainbus0
> aplaudio0 at mainbus0
> audio0 at aplaudio0
> simplefb0 at mainbus0: 2560x1600, 32bpp
> wsdisplay0 at simplefb0 mux 1: console (std, vt100 emulation), using wskbd0
> wsdisplay0: screen 1-5 added (std, vt100 emulation)
> vscsi0 at root
> scsibus1 at vscsi0: 256 targets
> softraid0 at root
> scsibus2 at softraid0: 256 targets
> root on sd0a (0f72c500fa6fee6b.a) swap on sd0b dump on sd0b
> bwfm0: address d4:57:63:c6:35:69
>
>
>
> mb# sndiod -dd
> snd0.default: rec=0:1 play=0:1 vol=8388608 dup
> snd0.0: rec=0:1 play=0:1 vol=8388608 dup
> snd1.1: rec=0:1 play=0:1 vol=8388608 dup
> snd2.2: rec=0:1 play=0:1 vol=8388608 dup
> snd3.3: rec=0:1 play=0:1 vol=8388608 dup
> default/server.device=0:1 at 1 -> opt_dev:default/0: added
> default/server.device=1:0 at 2 -> opt_dev:default/1: added
> default/server.device=2:0 at 3 -> opt_dev:default/2: added
> default/server.device=3:0 at 4 -> opt_dev:default/3: added
> app/play0.level=127 at 5 -> slot_level:play0: added
> warning, device opened in play-only mode
> 0/output0.level=255 at 6 -> hw:0/0: added
> snd0: 48000Hz, s24le4lsb, play 0:1, 16 blocks of 480 frames
> play0: 48000Hz, s16le, play 0:1, 16 blocks of 480 frames
> snd0: device started
> play0: attached at -7680 + 0/480
> play0: 48000Hz, s32le, play 0:0, 20 blocks of 480 frames
> play0: attached at -7680 + 0/480
> snd0: device stopped
> snd0: software master level control enabled
> 0/output.level=127 at 6 -> dev_master:0: added
> 0/output.level=127 at 6 -> dev_master:0: removed
> app/rec0.level=127 at 6 -> slot_level:rec0: added
> warning, device opened in play-only mode
> 0/output0.level=255 at 7 -> hw:0/0: added
> snd0: 48000Hz, s24le4lsb, play 0:1, 16 blocks of 480 frames
> rec0: 48000Hz, s16le, play 0:1, 16 blocks of 480 frames
> snd0: device started
> rec0: attached at -7680 + 0/480
> rec0: attached at -7680 + 0/480
> rec0: 48000Hz, s16le, rec 0:1, 20 blocks of 480 frames
> rec0: detached at 0 + 0/480
> snd0: device stopped
> snd0: software master level control enabled
> 0/output.level=127 at 7 -> dev_master:0: added
> 0/output.level=127 at 7 -> dev_master:0: removed
>
> ^Cdefault/server.device=0:1 at 1 -> opt_dev:default/0: removed
> default/server.device=1:0 at 2 -> opt_dev:default/1: removed
> default/server.device=2:0 at 3 -> opt_dev:default/2: removed
> default/server.device=3:0 at 4 -> opt_dev:default/3: removed
> mb# sndiod -dd -m play,rec
> snd0.default: rec=0:1 play=0:1 vol=8388608 dup
> snd0.0: rec=0:1 play=0:1 vol=8388608 dup
> snd1.1: rec=0:1 play=0:1 vol=8388608 dup
> snd2.2: rec=0:1 play=0:1 vol=8388608 dup
> snd3.3: rec=0:1 play=0:1 vol=8388608 dup
> default/server.device=0:1 at 1 -> opt_dev:default/0: added
> default/server.device=1:0 at 2 -> opt_dev:default/1: added
> default/server.device=2:0 at 3 -> opt_dev:default/2: added
> default/server.device=3:0 at 4 -> opt_dev:default/3: added
>
>
>
>
> app/aucat0.level=127 at 5 -> slot_level:aucat0: added
> warning, device opened in play-only mode
> 0/output0.level=255 at 6 -> hw:0/0: added
> snd0: 48000Hz, s24le4lsb, play 0:1, 16 blocks of 480 frames
> snd0: device started
> aucat0: attached at -7680 + 0/480
> aucat0: 48000Hz, s24le4lsb, rec 0:1, 20 blocks of 480 frames
> aucat0: detached at 0 + 0/480
> snd0: device stopped
> snd0: software master level control enabled
> 0/output.level=127 at 6 -> dev_master:0: added
> 0/output.level=127 at 6 -> dev_master:0: removed
> app/play0.level=127 at 6 -> slot_level:play0: added
> warning, device opened in play-only mode
> 0/output0.level=255 at 7 -> hw:0/0: added
> snd0: 48000Hz, s24le4lsb, play 0:1, 16 blocks of 480 frames
> play0: 48000Hz, s16le, play 0:1, 16 blocks of 480 frames
> snd0: device started
> play0: attached at -7680 + 0/480
> play0: 48000Hz, s32le, play 0:0, 20 blocks of 480 frames
> play0: attached at -7680 + 0/480
> snd0: device stopped
> snd0: software master level control enabled
> 0/output.level=127 at 7 -> dev_master:0: added
> 0/output.level=127 at 7 -> dev_master:0: removed
> app/rec0.level=127 at 7 -> slot_level:rec0: added
> warning, device opened in play-only mode
> 0/output0.level=255 at 8 -> hw:0/0: added
> snd0: 48000Hz, s24le4lsb, play 0:1, 16 blocks of 480 frames
> rec0: 48000Hz, s16le, play 0:1, 16 blocks of 480 frames
> snd0: device started
> rec0: attached at -7680 + 0/480
> rec0: attached at -7680 + 0/480
> rec0: 48000Hz, s16le, rec 0:1, 20 blocks of 480 frames
> rec0: detached at 0 + 0/480
> snd0: device stopped
> snd0: software master level control enabled
> 0/output.level=127 at 8 -> dev_master:0: added
> 0/output.level=127 at 8 -> dev_master:0: removed
> warning, device opened in play-only mode
> 0/output0.level=255 at 8 -> hw:0/0: added
> snd0: 48000Hz, s24le4lsb, play 0:1, 16 blocks of 480 frames
> rec0: 48000Hz, s16le, play 0:1, 16 blocks of 480 frames
> snd0: device started
> rec0: attached at -7680 + 0/480
> rec0: attached at -7680 + 0/480
> rec0: 48000Hz, s16le, rec 0:1, 20 blocks of 480 frames
> rec0: detached at 0 + 0/480
> snd0: device stopped
> snd0: software master level control enabled
> 0/output.level=127 at 8 -> dev_master:0: added
> 0/output.level=127 at 8 -> dev_master:0: removed
>
> ^Cdefault/server.device=0:1 at 1 -> opt_dev:default/0: removed
> default/server.device=1:0 at 2 -> opt_dev:default/1: removed
> default/server.device=2:0 at 3 -> opt_dev:default/2: removed
> default/server.device=3:0 at 4 -> opt_dev:default/3: removed
>
>