Permalink
Browse files

Add ALSA playback support for 24 bits LSB audio.

Fixes #10081
  • Loading branch information...
1 parent 35468d7 commit a24ecbf706b2989a5a6cb583d5efad50719d5454 @jyavenard jyavenard committed Oct 9, 2011
Showing with 14 additions and 10 deletions.
  1. +12 −10 mythtv/libs/libmyth/audiooutputalsa.cpp
  2. +2 −0 mythtv/libs/libmyth/audiooutputsettings.cpp
@@ -339,11 +339,12 @@ AudioOutputSettings* AudioOutputALSA::GetOutputSettings()
{
switch (fmt)
{
- case FORMAT_U8: afmt = SND_PCM_FORMAT_U8; break;
- case FORMAT_S16: afmt = SND_PCM_FORMAT_S16; break;
- case FORMAT_S24: afmt = SND_PCM_FORMAT_S24; break;
- case FORMAT_S32: afmt = SND_PCM_FORMAT_S32; break;
- case FORMAT_FLT: afmt = SND_PCM_FORMAT_FLOAT; break;
+ case FORMAT_U8: afmt = SND_PCM_FORMAT_U8; break;
+ case FORMAT_S16: afmt = SND_PCM_FORMAT_S16; break;
+ case FORMAT_S24LSB: afmt = SND_PCM_FORMAT_S24; break;
+ case FORMAT_S24: afmt = SND_PCM_FORMAT_S32; break;
+ case FORMAT_S32: afmt = SND_PCM_FORMAT_S32; break;
+ case FORMAT_FLT: afmt = SND_PCM_FORMAT_FLOAT; break;
default: continue;
}
if (snd_pcm_hw_params_test_format(pcm_handle, params, afmt) >= 0)
@@ -415,11 +416,12 @@ bool AudioOutputALSA::OpenDevice()
switch (output_format)
{
- case FORMAT_U8: format = SND_PCM_FORMAT_U8; break;
- case FORMAT_S16: format = SND_PCM_FORMAT_S16; break;
- case FORMAT_S24: format = SND_PCM_FORMAT_S24; break;
- case FORMAT_S32: format = SND_PCM_FORMAT_S32; break;
- case FORMAT_FLT: format = SND_PCM_FORMAT_FLOAT; break;
+ case FORMAT_U8: format = SND_PCM_FORMAT_U8; break;
+ case FORMAT_S16: format = SND_PCM_FORMAT_S16; break;
+ case FORMAT_S24LSB: format = SND_PCM_FORMAT_S24; break;
+ case FORMAT_S24: format = SND_PCM_FORMAT_S32; break;
+ case FORMAT_S32: format = SND_PCM_FORMAT_S32; break;
+ case FORMAT_FLT: format = SND_PCM_FORMAT_FLOAT; break;
default:
Error(QString("Unknown sample format: %1").arg(output_format));
return false;
@@ -125,6 +125,8 @@ AudioFormat AudioOutputSettings::GetNextFormat()
void AudioOutputSettings::AddSupportedFormat(AudioFormat format)
{
+ VERBOSE(VB_AUDIO, LOC + QString("Format %1 is supported")
+ .arg(FormatToString(format)));
m_formats.push_back(format);
}

0 comments on commit a24ecbf

Please sign in to comment.