[mythtv] PowerPC

Mino Taoyama mythtv at taoyama.com
Tue Dec 14 01:38:07 UTC 2004


Nigel,

Here is a quick update.

Forcing WORDS_BIGENDIAN in settings.pro an recompiling the backend 
makes the Linux PowerPC Backend operate the same as my Linux x86 
backend.

A Linux x86 frontend can connect to either backend and work and the 
MacOS X frontend can connect to either backend and work.

The Linux PowerPC frontend compiled withe WORDS_BIGENDIAN has video on 
either backend but the audio sounds like static.

With the patches you sent the Linux PowerPC frontend now has proper 
audio instead of static but the processor utilization went through the 
roof so it has a constant prebuffering pause.

I'll do a little digging.  My guess is somewhere the code needs to do a 
endian conversion on a buffer and that is eating up a lot of CPU time.  
I'll try it on one of my faster machines and see if it is better.

Thanks for your help.

Mino

On Dec 13, 2004, at 2:03 PM, Nigel Pearson wrote:

>> The symptom I saw using a PPC Linux frontend to a x86 Linux
>> backend was the audio sounded like static.  The video worked.
>
> 	Thanks for that additional information, Taoyama-san.
> Working video means that your frontend was compiled with
> -DWORDS_BIGENDIAN
>
>
> 	If it still has static for audio after a recompile,
> could I trouble you to try these changes:
>
>
> % diff -u audiooutputalsa.cpp.orig audiooutputalsa.cpp
> --- audiooutputalsa.cpp.orig    Tue Dec 14 08:59:34 2004
> +++ audiooutputalsa.cpp Tue Dec 14 08:37:02 2004
> @@ -65,9 +65,17 @@
>      else if (audio_bits == 16)
>          // is the sound data coming in really little-endian or is it
>          // CPU-endian?
> +#ifdef WORDS_BIGENDIAN
> +        format = SND_PCM_FORMAT_S16_BE;
> +#else
>          format = SND_PCM_FORMAT_S16_LE;
> +#endif
>      else if (audio_bits == 24)
> +#ifdef WORDS_BIGENDIAN
> +        format = SND_PCM_FORMAT_S24_BE;
> +#else
>          format = SND_PCM_FORMAT_S24_LE;
> +#endif
>      else
>      {
>          Error(QString("Unknown sample format: %1 
> bits.").arg(audio_bits));
> % diff -u audiooutputoss.cpp.orig audiooutputoss.cpp--- 
> audiooutputoss.cpp.orig     Tue Dec 14 08:59:57 2004
> +++ audiooutputoss.cpp  Tue Dec 14 08:50:04 2004
> @@ -77,12 +77,30 @@
>      SetFragSize();
>
>      bool err = false;
> +    int  format;
> +
> +    switch (audio_bits)
> +    {
> +        case 8:
> +            format = AFMT_S8;
> +            break;
> +        case 16:
> +#ifdef WORDS_BIGENDIAN
> +            format = AFMT_S16_BE;
> +#else
> +            format = AFMT_S16_LE;
> +#endif
> +            break;
> +        default: Error(QString("AudioOutputOSS() - Illegal bitsize of 
> %1")
> +                       .arg(audio_bits));
> +    }
>
>      if (audio_channels > 2)
>      {
>          if (ioctl(audiofd, SNDCTL_DSP_SAMPLESIZE, &audio_bits) < 0 ||
>              ioctl(audiofd, SNDCTL_DSP_CHANNELS, &audio_channels) < 0 
> ||
> -            ioctl(audiofd, SNDCTL_DSP_SPEED, &audio_samplerate) < 0)
> +            ioctl(audiofd, SNDCTL_DSP_SPEED, &audio_samplerate) < 0 ||
> +            ioctl(audiofd, SNDCTL_DSP_SETFMT, &format) < 0)
>              err = true;
>      }
>      else
> @@ -90,7 +108,8 @@
>          int stereo = audio_channels - 1;
>          if (ioctl(audiofd, SNDCTL_DSP_SAMPLESIZE, &audio_bits) < 0 ||
>              ioctl(audiofd, SNDCTL_DSP_STEREO, &stereo) < 0 ||
> -            ioctl(audiofd, SNDCTL_DSP_SPEED, &audio_samplerate) < 0)
> +            ioctl(audiofd, SNDCTL_DSP_SPEED, &audio_samplerate) < 0 ||
> +            ioctl(audiofd, SNDCTL_DSP_SETFMT, &format) < 0)
>              err = true;
>      }
>
> %
>
> --
> Nigel Pearson, nigel at ind.tansu.com.au | "Peacemaking is our profession"
> Telstra BI&D, Sydney, Australia       | Motto of Burpelson Airforce 
> Base
> Office: 8255 4222    Fax:  8255 3153  | Commanded by Gen. Jack D. 
> Ripper
> Mobile: 0408 664435  Home: 9792 6998  |        Dr Strangelove
>
> _______________________________________________
> mythtv-dev mailing list
> mythtv-dev at mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev



More information about the mythtv-dev mailing list