From: <tr...@ff...> - 2007-10-21 15:52:13
|
Author: ppalmers Date: 2007-10-21 08:05:11 -0700 (Sun, 21 Oct 2007) New Revision: 668 Modified: trunk/libffado/src/fireworks/efc/efc_avc_cmd.cpp trunk/libffado/src/fireworks/efc/efc_cmds_ioconfig.cpp trunk/libffado/src/fireworks/efc/efc_cmds_mixer.cpp trunk/libffado/src/fireworks/efc/efc_cmds_monitor.cpp trunk/libffado/src/fireworks/fireworks_device.cpp trunk/libffado/support/mixer/mixer_af2.py trunk/libffado/tests/test-echomixer.cpp Log: fix small bug in ECHO mixer commands Modified: trunk/libffado/src/fireworks/efc/efc_avc_cmd.cpp =================================================================== --- trunk/libffado/src/fireworks/efc/efc_avc_cmd.cpp 2007-10-21 14:30:17 UTC (rev 667) +++ trunk/libffado/src/fireworks/efc/efc_avc_cmd.cpp 2007-10-21 15:05:11 UTC (rev 668) @@ -59,6 +59,10 @@ result &= m_cmd->serialize( se ); + if(!result) { + debugWarning("Serialization failed\n"); + } + return result; } @@ -77,6 +81,10 @@ result &= m_cmd->deserialize( de ); + if(!result) { + debugWarning("Deserialization failed\n"); + } + return result; } Modified: trunk/libffado/src/fireworks/efc/efc_cmds_ioconfig.cpp =================================================================== --- trunk/libffado/src/fireworks/efc/efc_cmds_ioconfig.cpp 2007-10-21 14:30:17 UTC (rev 667) +++ trunk/libffado/src/fireworks/efc/efc_cmds_ioconfig.cpp 2007-10-21 15:05:11 UTC (rev 668) @@ -71,7 +71,9 @@ result &= EfcCmd::deserialize ( de ); - EFC_DESERIALIZE_AND_SWAP(de, &m_value, result); + if (m_type == eCT_Get) { + EFC_DESERIALIZE_AND_SWAP(de, &m_value, result); + } return result; } Modified: trunk/libffado/src/fireworks/efc/efc_cmds_mixer.cpp =================================================================== --- trunk/libffado/src/fireworks/efc/efc_cmds_mixer.cpp 2007-10-21 14:30:17 UTC (rev 667) +++ trunk/libffado/src/fireworks/efc/efc_cmds_mixer.cpp 2007-10-21 15:05:11 UTC (rev 668) @@ -84,6 +84,11 @@ result &= se.write(htonl(m_channel), "Channel" ); result &= se.write(htonl(m_value), "Value" ); } + + if(!result) { + debugWarning("Serialization failed\n"); + } + return result; } @@ -94,9 +99,15 @@ result &= EfcCmd::deserialize ( de ); - EFC_DESERIALIZE_AND_SWAP(de, (quadlet_t *)&m_channel, result); - EFC_DESERIALIZE_AND_SWAP(de, &m_value, result); + if (m_type == eCT_Get) { + EFC_DESERIALIZE_AND_SWAP(de, (quadlet_t *)&m_channel, result); + EFC_DESERIALIZE_AND_SWAP(de, &m_value, result); + } + if(!result) { + debugWarning("Deserialization failed\n"); + } + return result; } Modified: trunk/libffado/src/fireworks/efc/efc_cmds_monitor.cpp =================================================================== --- trunk/libffado/src/fireworks/efc/efc_cmds_monitor.cpp 2007-10-21 14:30:17 UTC (rev 667) +++ trunk/libffado/src/fireworks/efc/efc_cmds_monitor.cpp 2007-10-21 15:05:11 UTC (rev 668) @@ -129,10 +129,16 @@ result &= EfcCmd::deserialize ( de ); - EFC_DESERIALIZE_AND_SWAP(de, (quadlet_t *)&m_input, result); - EFC_DESERIALIZE_AND_SWAP(de, (quadlet_t *)&m_output, result); - EFC_DESERIALIZE_AND_SWAP(de, &m_value, result); + if (m_type == eCT_Get) { + EFC_DESERIALIZE_AND_SWAP(de, (quadlet_t *)&m_input, result); + EFC_DESERIALIZE_AND_SWAP(de, (quadlet_t *)&m_output, result); + EFC_DESERIALIZE_AND_SWAP(de, &m_value, result); + } + if(!result) { + debugWarning("Deserialization failed\n"); + } + return result; } Modified: trunk/libffado/src/fireworks/fireworks_device.cpp =================================================================== --- trunk/libffado/src/fireworks/fireworks_device.cpp 2007-10-21 14:30:17 UTC (rev 667) +++ trunk/libffado/src/fireworks/fireworks_device.cpp 2007-10-21 15:05:11 UTC (rev 668) @@ -175,6 +175,11 @@ } // c.showEfcCmd(); + if ( cmd.getResponse() != AVC::AVCCommand::eR_Accepted) { + debugError( "EfcOverAVCCmd not accepted\n" ); + return false; + } + if ( c.m_header.retval != EfcCmd::eERV_Ok && c.m_header.retval != EfcCmd::eERV_FlashBusy) { debugError( "EFC command failed\n" ); Modified: trunk/libffado/support/mixer/mixer_af2.py =================================================================== --- trunk/libffado/support/mixer/mixer_af2.py 2007-10-21 14:30:17 UTC (rev 667) +++ trunk/libffado/support/mixer/mixer_af2.py 2007-10-21 15:05:11 UTC (rev 668) @@ -152,7 +152,7 @@ print "set %s to %d" % ( self.VolumeControls[sender][0], vol) - self.hw.setContinuous(self.VolumeControls[sender][0], + self.hw.setContignuous(self.VolumeControls[sender][0], vol) def updateSelector(self,a0): Modified: trunk/libffado/tests/test-echomixer.cpp =================================================================== --- trunk/libffado/tests/test-echomixer.cpp 2007-10-21 14:30:17 UTC (rev 667) +++ trunk/libffado/tests/test-echomixer.cpp 2007-10-21 15:05:11 UTC (rev 668) @@ -222,7 +222,7 @@ #define DO_PLAYBACK_MIX // #define DO_RECORD_MIX #define DO_PHYS_OUT_MIX -// #define DO_PHYS_IN_MIX +#define DO_PHYS_IN_MIX #ifdef DO_PLAYBACK_MIX cmd.setTarget(eMT_PlaybackMix); |