Update: I found the solution. At least when using command line programs like mplayer.
UBports on the PonePhone seems to default to trying to use PulseAudio, which doesn't work. It needs to be using ALSA, but the regular user account selects the wrong ALSA device by default. For some reason the root user gets the right device.
I used the "aplay -l" command to get a list of local audio devices:
$ aplay -l
card 0: PinePhone
card 1: sun9ihdmi
It seems the regular user is selecting card 1 when it needs to be selecting card 0.
So to play audio with mplayer (or other audio players) I need to manually specify card 0. With mplayer that looks like this:
mplayer -ao alsa:device=hw=0 audio-file.mp3
I'm currently looking for a way to make this selection permanent and consistent for all audio players, but for now I can at least funnel audio through mplayer on my PinePhone.