Re: problems with dmix, a52 and upmix

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello again,

I solved one of my problems. sound from xine is fine now, even using 
upmix. I found this little patch on the xine mailing list (for 
xine-lib-1.1.7), but I had to apply it manually (this here is a fixed 
version, which applies fine), but the dmix--->a52 problem is still there.

diff -Naur xine-lib-1.1.7/src/audio_out/audio_alsa_out.c 
xine-lib-1.1.7-patched/src/audio_out/audio_alsa_out.c
--- xine-lib-1.1.7/src/audio_out/audio_alsa_out.c       2007-06-04 
23:37:38.000000000 +0200
+++ xine-lib-1.1.7-patched/src/audio_out/audio_alsa_out.c       
2007-09-02 14:13:50.000000000 +0200
@@ -307,7 +307,8 @@
   /* int                   open_mode=0;  BLOCK */
   struct timeval start_time;
   struct timeval end_time;
-
+  int                  resample;
+
   snd_pcm_hw_params_alloca(&params);
   snd_pcm_sw_params_alloca(&swparams);
   err = snd_output_stdio_attach(&jcd_out, stdout, 0);
@@ -460,8 +461,8 @@
     goto close;
   }
 #if SND_LIB_VERSION >= 0x010009
-  /* Restrict a configuration space to contain only real hardware rates */
-  err = snd_pcm_hw_params_set_rate_resample(this->audio_fd, params, 0);
+  resample = config->lookup_entry(config, 
"audio.device.resample_alsa")->num_value;
+  err = snd_pcm_hw_params_set_rate_resample(this->audio_fd, params, 
resample);
 #endif
   /* set the stream rate [Hz] */
   dir=0;
@@ -1369,6 +1370,13 @@
                                  "will increase performance."),
                                10, NULL,
                                NULL);
+  pcm_device = config->register_bool (config,
+                                     "audio.device.resample_alsa",
+                                     1,
+                                     _("allow to use alsa internal 
resampler"),
+                                     _("Try to enable this if you hear 
clicks in sound playback"),
+                                     10, NULL,
+                                     NULL);
   pcm_device = config->register_string(config,
                                       "audio.device.alsa_default_device",
                                       "default",



Best Regards,
     Michael


Michael KAufmann schrieb:
> Hello,
>
> the only way for me to get surround sound from my Mac Mini is to use its 
> spdif interface and an external ac3 decoder, but this leads to various 
> problems (e.g. no volume control from my pc anymore). My idea was the 
> following:
>
> application--->dmix--->upmix--->softvol--->a52--->external a52 decoder
>
> Till know I have this setup working:
>
> application--->softvol--->upmix--->a52--->external decoder
>
> But there are two problems with this setup:
> 0. without dmix I cannot share the sound card which is a big problem!
> 1. dmix refuses to work with the a52 plugin as its slave
> 2. all xine-lib based apps have problems with the upmix plugin (I don't 
> know how to explain - it sound's like a tinkling and stuttering). 
> Playing medias with "native" ac3 sound is also fine with xine (e.g. 
> DVDs, Dolby or THX trailers, but not AC3 from digital tv/vdr). Sound 
> from mplayer is fine all the time.
>
> Is there any way to make dmix work with a52 as slave?
>
> Here's my asound.conf
>
> pcm.swac3 {
>     type        softvol
>     slave {
>         pcm     "upmix51"      #redirect the output to dmix (instead of 
> "hw:0,0")
>     }
>     control {
>         name    "PCM"       #override the PCM slider to set the softvol 
> volume level globally
>         card    0
>     }
> }
>
> pcm.upmix51 {
>     type        upmix
>     channels    6
>     slave {
>         pcm     "ac3plug"
>     }
> }
>
> pcm.dmixer { # THIS DOES NOT WORK!!!
>     type dmix
>     ipc_key 12345
>     slave {
>         pcm      "swac3"
>         rate     48000
>         format   S16_LE
>         channels 6
>         period_time 0
>         period_size 1024
>         buffer_size 8192
>     }
> }
>
> pcm.ac3plug {
>     type a52
>     channels 6
>     rate 48000
> }
>
> pcm.!surround51 { # NOT REALLY USED
>     type        plug
>     slave.pcm   "swac3"
> }
>
>
> Best Regards,
>    Michael
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems?  Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >>  http://get.splunk.com/
> _______________________________________________
> Alsa-user mailing list
> Alsa-user@xxxxxxxxxxxxxxxxxxxxx
> https://lists.sourceforge.net/lists/listinfo/alsa-user
>   


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Alsa-user mailing list
Alsa-user@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/alsa-user

[Index of Archives]     [ALSA Devel]     [Linux Audio Users]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]

  Powered by Linux