Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aplay: set_params:1352: Sample format non available #742

Open
zoff99 opened this issue Jan 6, 2024 · 7 comments
Open

aplay: set_params:1352: Sample format non available #742

zoff99 opened this issue Jan 6, 2024 · 7 comments

Comments

@zoff99
Copy link

zoff99 commented Jan 6, 2024

i flashed https://downloads.raspberrypi.com/raspios_lite_arm64/images/raspios_lite_arm64-2023-12-11/2023-12-11-raspios-bookworm-arm64-lite.img.xz to a new SD Card. and started it up on the a PI4.
its connected to a TV with HDMI0 port. picture shows up on TV but no audio playback is possible with alsa.

it always says: "aplay: set_params:1352: Sample format non available"

Available formats:

  • IEC958_SUBFRAME_LE

how can i add all the missing formats?

if i take the sd card out of the PI4 and plug it into a PI5 i get all these:

Recognized sample formats are: S8 U8 S16_LE S16_BE U16_LE U16_BE S24_LE S24_BE U24_LE U24_BE S32_LE S32_BE U32_LE U32_BE FLOAT_LE FLOAT_BE FLOAT64_LE FLOAT64_BE IEC958_SUBFRAME_LE IEC958_SUBFRAME_BE MU_LAW A_LAW IMA_ADPCM MPEG GSM S20_LE S20_BE U20_LE U20_BE SPECIAL S24_3LE S24_3BE U24_3LE U24_3BE S20_3LE S20_3BE U20_3LE U20_3BE S18_3LE S18_3BE U18_3LE U18_3BE G723_24 G723_24_1B G723_40 G723_40_1B DSD_U8 DSD_U16_LE DSD_U32_LE DSD_U16_BE DSD_U32_BE

i don't know whats happening there.

pi@raspberrypi:~ $ aplay -D plughw:1,0 /usr/share/sounds/alsa/Front_Center.wav
Playing WAVE '/usr/share/sounds/alsa/Front_Center.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Mono
aplay: set_params:1352: Sample format non available
Available formats:
- IEC958_SUBFRAME_LE

pi@raspberrypi:~ $ speaker-test -c1 -D plughw:1,0

speaker-test 1.2.8

Playback device is plughw:1,0
Stream parameters are 48000Hz, S16_LE, 1 channels
Using 16 octaves of pink noise
Sample format not available for playback: Invalid argument
Setting of hwparams failed: Invalid argument

pi@raspberrypi:~ $ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Headphones [bcm2835 Headphones], device 0: bcm2835 Headphones [bcm2835 Headphones]
  Subdevices: 8/8
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
  Subdevice #4: subdevice #4
  Subdevice #5: subdevice #5
  Subdevice #6: subdevice #6
  Subdevice #7: subdevice #7
card 1: vc4hdmi0 [vc4-hdmi-0], device 0: MAI PCM i2s-hifi-0 [MAI PCM i2s-hifi-0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: vc4hdmi1 [vc4-hdmi-1], device 0: MAI PCM i2s-hifi-0 [MAI PCM i2s-hifi-0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
pi@raspberrypi:~ $ cat /proc/asound/card1/pcm0p/info 
card: 1
device: 0
subdevice: 0
stream: PLAYBACK
id: MAI PCM i2s-hifi-0
name: MAI PCM i2s-hifi-0
subname: subdevice #0
class: 0
subclass: 0
subdevices_count: 1
subdevices_avail: 1
pi@raspberrypi:~ $ cat /proc/asound/
card0/      card2/      devices     modules     pcm         timers      vc4hdmi1/
card1/      cards       Headphones/ oss/        seq/        vc4hdmi0/   version
pi@raspberrypi:~ $ cat /proc/asound/card
card0/ card1/ card2/ cards  
pi@raspberrypi:~ $ cat /proc/asound/cards 
 0 [Headphones     ]: bcm2835_headpho - bcm2835 Headphones
                      bcm2835 Headphones
 1 [vc4hdmi0       ]: vc4-hdmi - vc4-hdmi-0
                      vc4-hdmi-0
 2 [vc4hdmi1       ]: vc4-hdmi - vc4-hdmi-1
                      vc4-hdmi-1

@zoff99
Copy link
Author

zoff99 commented Jan 8, 2024

@XECDesign
Copy link
Member

@popcornmix does this sound like a kernel issue?

@zoff99
Copy link
Author

zoff99 commented Jan 8, 2024

same goes for the PI3 B+
so latest OS:
aplay via HDMI:

  • PI5 -> works
  • PI4 -> does not work
  • PI3 B+ -> does not work

i am trying the full (instead of the lite) version now ...

@zoff99
Copy link
Author

zoff99 commented Jan 8, 2024

funky, with the full version: https://downloads.raspberrypi.com/raspios_full_arm64/images/raspios_full_arm64-2023-12-06/2023-12-05-raspios-bookworm-arm64-full.img.xz
it works on the PI4.

hmm. now how to figure out what is missing in the lite version so that it only work on the PI5

@zoff99
Copy link
Author

zoff99 commented Jan 8, 2024

i think i am getting close.
if i change in /usr/share/alsa/alsa.conf

defaults.ctl.card 0
defaults.pcm.card 0

to

defaults.ctl.card 1
defaults.pcm.card 1

then aplay works. now why is the default not working?

the PI4 still has the audio jack. the PI5 does not. so on the PI4 the audio jack is set to the default audio device.
but only on the lite version.

ah. for some reason on the full OS the audio jack is card 2 and HDMI is card 0 and 1. (shown via aplay -l)
on the lite version the audio jack is card 0 and HDMI is card 1 and 2.

@zoff99
Copy link
Author

zoff99 commented Jan 8, 2024

ok installing this pkg: raspberrypi-ui-mods fixes the audio device order. but since that pulls in a zillion others like wayland and pulse i don't really know what happens.

i think alsa should work even on the lite images out of the box.

@zoff99
Copy link
Author

zoff99 commented Jan 8, 2024

could be related to: raspberrypi/Raspberry-Pi-OS-64bit#157

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants