On Fri, Jul 13, 2007 at 10:59:30AM +0300, Alexey Suslikov wrote:
> Hello [EMAIL PROTECTED]
>
> After some success with sound on my 48KHz-only ALC861
> codec with preliminary patch from deanna@ (thanks), there
> was no sound with xine-lib based players.
>
> Despite of xine's audio_sun_out.c can do resample, audio
> capabilities test relies on 44KHz which is wrong nowadays.
well, CDs are 44.1kHz.
> The patch below fixes this by checking for 48KHz too. It is
> backward compatible and works for me (Kaffeine player).
>
> After you have patched, add
>
> audio.synchronization.force_rate:48000
> audio.synchronization.resample_mode:on
>
> to ~/.xine/config. If your hardware mixer is broken, also add
>
> gui.audio_mixer_method:Software
>
> to have software volume control.
I have sent a patch out to some people that should fix the mixer
for a lot of devices, but I have not received enough feedback to
commit this yet.
> Amarok is the problem since it uses own xine-config. Even
> with manually added resampling options and setting RO to
> xine-config, Amarok uses some internal defaults and tries to
> initialize audio to 44KHz.
both amarok and kaffeine use xine-lib, but they both do silly
things on their own that xine-lib can do for them. you might want
to mention this default sampling rate issue to the amarok folk.
> Hope this can be fixed if someone will look into it.
I will check into this. the patch looks sane at first glance.
> Thanks.
>
> Alexey.
>
> --- src/audio_out/audio_sun_out.c.orig
> +++ src/audio_out/audio_sun_out.c
> @@ -966,11 +966,21 @@
> status = ioctl(this->audio_fd, AUDIO_SETINFO, &info);
>
> if (status < 0) {
> - xprintf(this->xine, XINE_VERBOSITY_LOG,
> +
> + /* try 48000, 44100 may be not reasonable sometimes */
> + AUDIO_INITINFO(&info);
> + info.play.encoding = AUDIO_ENCODING_LINEAR;
> + info.play.precision = AUDIO_PRECISION_16;
> + info.play.sample_rate = 48000;
> + status = ioctl(this->audio_fd, AUDIO_SETINFO, &info);
> +
> + if (status < 0) {
> + xprintf(this->xine, XINE_VERBOSITY_LOG,
> _("audio_sun_out: audio ioctl on device %s failed: %s\n"),
> devname, strerror(errno));
>
> - free (this);
> - return NULL;
> + free (this);
> + return NULL;
> + }
> }
>
> /*
>
--
[EMAIL PROTECTED]
SDF Public Access UNIX System - http://sdf.lonestar.org