root/branches/echoaudio/src/genericavc/avc_avdevice.h

Revision 504, 1.9 kB (checked in by ppalmers, 17 years ago)

Converted sample rate setting parameter to a simple integer. The enumerated value
is only valid for the AV/C compliant devices.
(maybe we have to define another enum?)

Line 
1 /*
2  * Copyright (C) 2005-2007 by Pieter Palmers
3  *
4  * This file is part of FFADO
5  * FFADO = Free Firewire (pro-)audio drivers for linux
6  *
7  * FFADO is based upon FreeBoB.
8  *
9  * This library is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU Lesser General Public
11  * License version 2.1, as published by the Free Software Foundation;
12  *
13  * This library is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16  * Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with this library; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
21  * MA 02110-1301 USA
22  */
23
24 #ifndef GENERICAVC_AVDEVICE_H
25 #define GENERICAVC_AVDEVICE_H
26
27 #include "ffadodevice.h"
28
29 #include "debugmodule/debugmodule.h"
30 #include "libavc/avc_definitions.h"
31
32 class ConfigRom;
33 class Ieee1394Service;
34
35 namespace GenericAVC {
36
37 // struct to define the supported devices
38 struct VendorModelEntry {
39     unsigned int vendor_id;
40     unsigned int model_id;
41     char *vendor_name;
42     char *model_name;
43 };
44
45 class AvDevice : public FFADODevice {
46 public:
47     AvDevice( std::auto_ptr<ConfigRom>( configRom ),
48           Ieee1394Service& ieee1394Service,
49           int nodeId );
50     virtual ~AvDevice();
51
52     static bool probe( ConfigRom& configRom );
53     bool discover();
54
55     void showDevice();
56
57     bool setSamplingFrequency( int );
58     int getSamplingFrequency( );
59
60     int getStreamCount();
61     Streaming::StreamProcessor *getStreamProcessorByIndex(int i);
62
63     bool prepare();
64     bool lock();
65     bool unlock();
66
67     bool startStreamByIndex(int i);
68     bool stopStreamByIndex(int i);
69
70 protected:
71     struct VendorModelEntry *m_model;
72
73 };
74
75 }
76
77 #endif //GENERICAVC_AVDEVICE_H
Note: See TracBrowser for help on using the browser.