I thought I'd write this up since this has been a pain twice before. I'll copy this to a page on the wiki as well.
Rivendell uses the AudioScience PCIe Livewire card to play audio. This is passed through KVM to the Rivendell VM so that it sees the card directly. You can see the card:
wmfo-admin@rivendell:~/src/hpklinux-4.18.03-1$ lspci
...
00:07.0 Multimedia audio controller: Texas Instruments TMS320C6414 TMS320C6415 TMS320C6416
In order to interact, Rivendell uses the asihpi kernel module. If that kernel module is not installed, rivendell will fail to play music and rdairplay will freeze.
The easiest way to verify that everything is working is by invoking:
wmfo-admin@rivendell:~/src$ asihpitest
********************************************************************
** Test HPI using Functions **
HPI_DriverOpen error: No such file or directory
HPI_SubSysSetHostNetworkInterface error
ERROR 109 #109 - PROCESSING_MESSAGE
press Enter to continue, (q,Enter) to exit...
********************************************************************
HPI_SubSysCreate
HPI_DriverOpen error: No such file or directory
hSubSys==NULL
As you can see, it cannot find the driver. This means the kernel module is not installed. We have downloaded a copy of the source to ~/src/hpklinux-4.18.03-1
All you need to do is the following classic shenanigans in that directory to build and install the module:
make clean
./autogen.sh
./configure
make
sudo make install
sudo modprobe asihpi
And then you can try the test again:
wmfo-admin@rivendell:~/src/hpklinux-4.18.03-1$ asihpitest
********************************************************************
** Test HPI using Functions **
********************************************************************
HPI_SubSysCreate
HPI_SubSysGetVersionEx=41203
0 HPI_SubSysFindAdapters found 1 adapters
0=6685
HPI_AdapterClose
HPI_AdapterOpen
HPI_AdapterGetInfo
Adapter ID=6685 Index=0 NumOutStreams=8 NumInStreams=8 S/N=92845
Hw Version G3 DSP code version 418
Adapter current mode 3
HPI_MixerOpen: handle=0000A000
HPI_SampleClock_SetLocalRate() error 310
HPI_OutStreamOpen
0:00006000 HPI_OutStreamHostBufferAllocate HPI_OutStreamGetInfo 0: BufferSize=32768
....
And everything is happy. To make sure Rivendell is working, run:
wmfo-admin@rivendell:~/src/hpklinux-4.18.03-1$ sudo service rivendell restart
And then you can log into VNC on Rivendell to make sure it's working. Then VNC to Adele and run the wrench program (which just kills, restarts the service, and restarts rdairplay) and you should be working again.
DKMS
Now obviously, this is a pain so it should happen automatically. The program for that purpose is called DKMS. The main problem that we've run into is that by default the DKMS config that comes with the hpklinux source doesn't work -- it's trying to generate a module named asihpi but the folder is named hpklinux. Anyways, I renamed the folder to follow what I think is the correct schema and put it in the correct /usr/src/asihpi-4.18.03-1/
Then you can add it to DKMS:
sudo dkms add -m asihpi -v 4.18.03-1
sudo dkms build -m asihpi -v 4.18.03-1
root@rivendell:/usr/src# dkms status -m asihpi -v 4.18.03-1
asihpi, 4.18.03-1, 4.4.0-134-generic, x86_64: built
In theory this means it should automatically recompile the kernel module and install it every time a new kernel is released with security updates, but last time I thought the same thing so who knows. If it doesn't work, we'll only know after a reboot and then have to do it manually and again try to figure out why DKMS isn't properly working.
--Nick