Changeset 1321
- Timestamp:
- 09/19/08 11:48:42 (16 years ago)
- Files:
-
- branches/libffado-2.0/src/bebob/bebob_avdevice.cpp (modified) (3 diffs)
- branches/libffado-2.0/src/bebob/bebob_avdevice.h (modified) (3 diffs)
- branches/libffado-2.0/src/bebob/bebob_mixer.cpp (modified) (2 diffs)
- branches/libffado-2.0/src/bebob/bebob_mixer.h (modified) (2 diffs)
- branches/libffado-2.0/src/fireworks/fireworks_control.h (modified) (1 diff)
- branches/libffado-2.0/support/dbus/controlserver.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/libffado-2.0/src/bebob/bebob_avdevice.cpp
r1299 r1321 298 298 299 299 bool 300 AvDevice::setFeatureFBVolume Value(int id, int channel, int v) {300 AvDevice::setFeatureFBVolumeCurrent(int id, int channel, int v) { 301 301 302 302 FunctionBlockCmd fbCmd( get1394Service(), … … 330 330 331 331 int 332 AvDevice::getFeatureFBVolumeValue(int id, int channel) { 332 AvDevice::getFeatureFBVolumeValue(int id, int channel, FunctionBlockCmd::EControlAttribute controlAttribute) 333 { 333 334 FunctionBlockCmd fbCmd( get1394Service(), 334 335 FunctionBlockCmd::eFBT_Feature, 335 336 id, 336 FunctionBlockCmd::eCA_Current);337 controlAttribute); 337 338 fbCmd.setNodeId( getNodeId() ); 338 339 fbCmd.setSubunitId( 0x00 ); … … 360 361 361 362 return volume; 363 } 364 365 int 366 AvDevice::getFeatureFBVolumeMinimum(int id, int channel) 367 { 368 return getFeatureFBVolumeValue(id, channel, AVC::FunctionBlockCmd::eCA_Minimum); 369 } 370 371 int 372 AvDevice::getFeatureFBVolumeMaximum(int id, int channel) 373 { 374 return getFeatureFBVolumeValue(id, channel, AVC::FunctionBlockCmd::eCA_Maximum); 375 } 376 377 int 378 AvDevice::getFeatureFBVolumeCurrent(int id, int channel) 379 { 380 return getFeatureFBVolumeValue(id, channel, AVC::FunctionBlockCmd::eCA_Current); 362 381 } 363 382 branches/libffado-2.0/src/bebob/bebob_avdevice.h
r1299 r1321 37 37 #include "libavc/general/avc_subunit.h" 38 38 #include "libavc/general/avc_plug.h" 39 #include "libavc/audiosubunit/avc_function_block.h" 39 40 40 41 #include "bebob/bebob_avplug.h" … … 84 85 virtual int getSelectorFBValue(int id); 85 86 virtual bool setSelectorFBValue(int id, int v); 86 virtual int getFeatureFBVolumeValue(int id, int channel); 87 virtual bool setFeatureFBVolumeValue(int id, int channel, int v); 87 virtual int getFeatureFBVolumeMinimum(int id, int channel); 88 virtual int getFeatureFBVolumeMaximum(int id, int channel); 89 virtual int getFeatureFBVolumeCurrent(int id, int channel); 90 virtual bool setFeatureFBVolumeCurrent(int id, int channel, int v); 88 91 89 92 virtual void showDevice(); … … 94 97 virtual bool buildMixer(); 95 98 virtual bool destroyMixer(); 99 100 virtual int getFeatureFBVolumeValue(int id, int channel, AVC::FunctionBlockCmd::EControlAttribute controlAttribute); 96 101 97 102 public: branches/libffado-2.0/src/bebob/bebob_mixer.cpp
r1158 r1321 227 227 debugOutput(DEBUG_LEVEL_NORMAL,"Set feature volume %d to %d...\n", 228 228 m_Slave.getId(), volume); 229 return m_Parent.getParent().setFeatureFBVolume Value(m_Slave.getId(), idx, volume);229 return m_Parent.getParent().setFeatureFBVolumeCurrent(m_Slave.getId(), idx, volume); 230 230 } 231 231 … … 242 242 m_Slave.getId()); 243 243 244 return m_Parent.getParent().getFeatureFBVolumeValue(m_Slave.getId(), idx); 244 return m_Parent.getParent().getFeatureFBVolumeCurrent(m_Slave.getId(), idx); 245 } 246 247 double 248 MixerFBFeature::getMinimum() 249 { 250 debugOutput(DEBUG_LEVEL_NORMAL,"Get feature minimum volume %d...\n", 251 m_Slave.getId()); 252 253 return m_Parent.getParent().getFeatureFBVolumeMinimum(m_Slave.getId(), 0); 254 } 255 256 double 257 MixerFBFeature::getMaximum() 258 { 259 debugOutput(DEBUG_LEVEL_NORMAL,"Get feature maximum volume %d...\n", 260 m_Slave.getId()); 261 262 return m_Parent.getParent().getFeatureFBVolumeMaximum(m_Slave.getId(), 0); 245 263 } 246 264 branches/libffado-2.0/src/bebob/bebob_mixer.h
r1158 r1321 79 79 virtual bool setValue(int idx, double v); 80 80 virtual double getValue(int idx); 81 virtual double getMinimum() {return 0.0;};82 virtual double getMaximum() {return 0.0;};81 virtual double getMinimum(); 82 virtual double getMaximum(); 83 83 84 84 private: … … 100 100 {return getValue();}; 101 101 102 virtual double getMinimum() {return 0.0;};103 virtual double getMaximum() {return 0 .0;};102 virtual double getMinimum() {return -32768;}; 103 virtual double getMaximum() {return 0;}; 104 104 105 105 private: branches/libffado-2.0/src/fireworks/fireworks_control.h
r1284 r1321 96 96 {return getValue();}; 97 97 98 virtual double getMinimum() {return 0.0;};99 virtual double getMaximum() {return 0.0;};98 virtual double getMinimum() {return -100.0;}; 99 virtual double getMaximum() {return 10.0;}; 100 100 101 101 protected: branches/libffado-2.0/support/dbus/controlserver.cpp
r1297 r1321 466 466 Continuous::getMinimum() 467 467 { 468 debugOutput( DEBUG_LEVEL_VERBOSE, "getMinimum() TODO: Return a real device-value...\n" ); 469 return -100.0; 468 double val = m_Slave.getMinimum(); 469 debugOutput( DEBUG_LEVEL_VERBOSE, "getMinimum() => %lf\n", val ); 470 return val; 470 471 } 471 472 … … 473 474 Continuous::getMaximum() 474 475 { 475 debugOutput( DEBUG_LEVEL_VERBOSE, "getMaximum() TODO: Return a real device-value...\n" ); 476 return 10.0; 476 double val = m_Slave.getMaximum(); 477 debugOutput( DEBUG_LEVEL_VERBOSE, "getMaximum() => %lf\n", val ); 478 return val; 477 479 } 478 480