All of lore.kernel.org
 help / color / mirror / Atom feed
* [alsa-devel] a52 plugin + ffmpeg with libswresample
@ 2019-12-03 20:12 Giovanni Harting
  2019-12-03 20:38 ` Jaroslav Kysela
  0 siblings, 1 reply; 3+ messages in thread
From: Giovanni Harting @ 2019-12-03 20:12 UTC (permalink / raw)
  To: alsa-devel

Hello,

I'm working on restoring functionality to the a52 plugin.
ALSA build with ffmpeg without (deprecated) libavresample does not build 
this plugin, since libavresample is missing. Archlinux for example does 
not build with libavresample anymore [1], therefore a52 is missing in 
alsa-plugins builds since that change happened.

I ported rate-lav to libswresample, which seems to work well after a 
month of daily use.

The oddity is that a config file (asoundrc, [2]), that worked fine with 
alsa-lib 1.1.6, does not work with 1.1.7+. I could not find a change 
that causes this.

I traced it down to _snd_pcm_rate_open() in pcm/pcm_rate.c, where 
keywords from within pcm {} are passed into, where it fails with 
"Unknown field card" (for example).

I worked around it by filtering out all keywords [3], but that feels a 
little unclean. Is there a proper way to fix this? I'm not familiar with 
ALSA's config parsing.

I'll submit patches for both once I figured out how to fix this.

[1] https://bugs.archlinux.org/task/60586
[2]
pcm.a52 {
     @args [CARD]
     @args.CARD {
         type string
     }
     type rate
     slave {
         pcm {
             type a52
             bitrate 640
             channels 6
             card $CARD
         }
         rate 48000
         format S16_LE
     }
}

[3]
if (strcmp(id, "bitrate") == 0 || strcmp(id, "rate") == 0 || strcmp(id, 
"card") == 0 || strcmp(id, "channels") == 0 || strcmp(id, "format") == 0) {
     continue;
}
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-12-03 20:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-03 20:12 [alsa-devel] a52 plugin + ffmpeg with libswresample Giovanni Harting
2019-12-03 20:38 ` Jaroslav Kysela
2019-12-03 20:49   ` Giovanni Harting

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.