oss audio output error cannot write samples invalid argument fix

Thank you for the post! I tried to play an .mp3 file using [multimedia/vlc] and received the error in your subject line and adding dev.hdac.0.polling=1 to /etc/sysctl.conf solved my audio issue.

Figure out which value needs to be changed:
sysctl dev.hdac
dev.hdac.0.polling: 0
dev.hdac.0.pindump: 0
dev.hdac.0.wake: 0
dev.hdac.0.%parent: pci0
dev.hdac.0.%pnpinfo: vendor=0x8086 device=0x1c20 subvendor=0x1179 subdevice=0xfc50 class=0x040300
dev.hdac.0.%location: slot=27 function=0 dbsf=pci0:0:27:0 handle=\_SB_.PCI0.HDEF
dev.hdac.0.%driver: hdac
dev.hdac.0.%desc: Intel Cougar Point HDA Controller

Set the state to 1:
sysctl dev.hdac.0.polling=1
dev.hdac.0.polling: 0 -> 1

Persist the state:
echo "dev.hdac.0.polling=1" >> /etc/sysctl.conf
Agreed, thanks to both of you for the tips. Not sure if this is how it's supposed to work or if this is just a workaround for some bug, but this is the first time I've had this error and this appears to help my problem.