Page 1 of 4

Peaberry TX not working as should

PostPosted: Sun Apr 21, 2013 12:34 pm
by CT1IQI
Situation:
Peaberry, end Jan. 2013 version.
PC with Linux and Virtual Machine with W-XP
RX works, both with quisk/usbsoftrock with vk6jbl harware configuration under Linux direct, and under XP with HDSDR/CfgSR and usb driver as provided by AE9RB.
In both cases I need to reverse I and Q to get proper frequency and sideband.

Under Quisk managed to get PTT switched on/off but nothing further.
Under HDSDR the Peaberry starts to transmit (I/O set to Softrock TX/RX Ensemble) but e.g. in AM with mic. gain at zero, there is a wide spectum of noisy carriers roughly around the spot where I was receiving.
With the scope on the 4 electrolytic caps. C29-C32 I see a sinewave, fairly clean plus another sinewave, same frequency but out of phase with noisy spikes on it.
Any idea what problem this is pointing at ?

tnx
martin
CT1IQI

Re: Peaberry TX not working as should

PostPosted: Sun Apr 21, 2013 3:37 pm
by AE9RB
Please post photos of your scope and SA traces.

Re: Peaberry TX not working as should

PostPosted: Sat Apr 27, 2013 7:03 pm
by hansvi
Use plughw:1,1 as your output device. I have more info here.

Re: Peaberry TX not working as should

PostPosted: Sun Apr 28, 2013 4:04 pm
by CT1IQI
Tnx! Tried plughw: but no difference. RX works, TX not. Am now concentrating on Quisk as that is open source.
I suspect the audio just is not getting to the proper interface.
Peaberry presents via USB:
bInterfaceNumber iInterface bInterfaceClass / SubClass / ch#-framesze-resol-SamFreq
0 Peaberry SDR Vendor Specific Class / -
1 Peaberry Radio Audio / Control Device
2 Peaberry Receive Audio / Streaming / 2 - 3 - 24 - 48000
3 Peaberry Transmit Audio / Streaming / 2 - 3 - 24 - 48000
4 Peaberry Audio Audio / Control Device
5 Peaberry Microphone Audio / Streaming / 1 - 2 - 16 - 48000
6 Peaberry Speaker Audio / Streaming / 2 - 3 - 24 - 48000

Got the RX/TX switching working by specifically selecting interface 0 via pyusb routines and asking info there while sending a data byte.
The audio gets done in C code using libusb and will see to bypass hw: settings and address the interfaces directly.

Re: Peaberry TX not working as should

PostPosted: Sun Apr 28, 2013 6:31 pm
by hansvi
Strange... can you execute the command
Code: Select all
aplay -l

and paste the result?

Re: Peaberry TX not working as should

PostPosted: Sun Apr 28, 2013 10:44 pm
by CT1IQI
Sure:
Playback devices ('aplay -l'):
card 1: SDR [Peaberry SDR], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: SDR [Peaberry SDR], device 1: USB Audio [USB Audio #1]
Subdevices: 1/1
Subdevice #0: subdevice #0
Capture devices: ('arecord -l')
card 1: SDR [Peaberry SDR], device 0: USB Audio [USB Audio]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: SDR [Peaberry SDR], device 1: USB Audio [USB Audio #1]
Subdevices: 1/1
Subdevice #0: subdevice #0

The full description:
Code: Select all
Bus 001 Device 015: ID 16c0:05dc VOTI shared ID for use with libusb
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0         8
  idVendor           0x16c0 VOTI
  idProduct          0x05dc shared ID for use with libusb
  bcdDevice            0.02
  iManufacturer           1 AE9RB
  iProduct                2 Peaberry SDR
  iSerial               128 0B0E0C3E03122400
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength          356
    bNumInterfaces          7
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0xc0
      Self Powered
    MaxPower                4mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           0
      bInterfaceClass       255 Vendor Specific Class
      bInterfaceSubClass      0
      bInterfaceProtocol      0
      iInterface              2 Peaberry SDR
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           0
      bInterfaceClass         1 Audio
      bInterfaceSubClass      1 Control Device
      bInterfaceProtocol      0
      iInterface              7 Peaberry Radio
      AudioControl Interface Descriptor:
        bLength                10
        bDescriptorType        36
        bDescriptorSubtype      1 (HEADER)
        bcdADC               1.00
        wTotalLength           52
        bInCollection           2
        baInterfaceNr( 0)       2
        baInterfaceNr( 1)       3
      AudioControl Interface Descriptor:
        bLength                12
        bDescriptorType        36
        bDescriptorSubtype      2 (INPUT_TERMINAL)
        bTerminalID             1
        wTerminalType      0x0603 Line Connector
        bAssocTerminal          0
        bNrChannels             2
        wChannelConfig     0x0003
          Left Front (L)
          Right Front (R)
        iChannelNames           0
        iTerminal               0
      AudioControl Interface Descriptor:
        bLength                 9
        bDescriptorType        36
        bDescriptorSubtype      3 (OUTPUT_TERMINAL)
        bTerminalID             2
        wTerminalType      0x0101 USB Streaming
        bAssocTerminal          0
        bSourceID               1
        iTerminal               0
      AudioControl Interface Descriptor:
        bLength                12
        bDescriptorType        36
        bDescriptorSubtype      2 (INPUT_TERMINAL)
        bTerminalID             3
        wTerminalType      0x0101 USB Streaming
        bAssocTerminal          0
        bNrChannels             2
        wChannelConfig     0x0003
          Left Front (L)
          Right Front (R)
        iChannelNames           0
        iTerminal               0
      AudioControl Interface Descriptor:
        bLength                 9
        bDescriptorType        36
        bDescriptorSubtype      3 (OUTPUT_TERMINAL)
        bTerminalID             4
        wTerminalType      0x0603 Line Connector
        bAssocTerminal          0
        bSourceID               3
        iTerminal               0
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        2
      bAlternateSetting       0
      bNumEndpoints           0
      bInterfaceClass         1 Audio
      bInterfaceSubClass      2 Streaming
      bInterfaceProtocol      0
      iInterface              3 Peaberry Receive
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        2
      bAlternateSetting       1
      bNumEndpoints           1
      bInterfaceClass         1 Audio
      bInterfaceSubClass      2 Streaming
      bInterfaceProtocol      0
      iInterface              3 Peaberry Receive
      AudioStreaming Interface Descriptor:
        bLength                 7
        bDescriptorType        36
        bDescriptorSubtype      1 (AS_GENERAL)
        bTerminalLink           2
        bDelay                  2 frames
        wFormatTag              1 PCM
      AudioStreaming Interface Descriptor:
        bLength                11
        bDescriptorType        36
        bDescriptorSubtype      2 (FORMAT_TYPE)
        bFormatType             1 (FORMAT_TYPE_I)
        bNrChannels             2
        bSubframeSize           3
        bBitResolution         24
        bSamFreqType            1 Discrete
        tSamFreq[ 0]        48000
      Endpoint Descriptor:
        bLength                 9
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes           45
          Transfer Type            Isochronous
          Synch Type               Synchronous
          Usage Type               Implicit feedback Data
        wMaxPacketSize     0x0120  1x 288 bytes
        bInterval               1
        bRefresh                0
        bSynchAddress           0
        AudioControl Endpoint Descriptor:
          bLength                 7
          bDescriptorType        37
          bDescriptorSubtype      1 (EP_GENERAL)
          bmAttributes         0x80
            MaxPacketsOnly
          bLockDelayUnits         1 Milliseconds
          wLockDelay              0 Milliseconds
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        3
      bAlternateSetting       0
      bNumEndpoints           0
      bInterfaceClass         1 Audio
      bInterfaceSubClass      2 Streaming
      bInterfaceProtocol      0
      iInterface              4 Peaberry Transmit
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        3
      bAlternateSetting       1
      bNumEndpoints           1
      bInterfaceClass         1 Audio
      bInterfaceSubClass      2 Streaming
      bInterfaceProtocol      0
      iInterface              4 Peaberry Transmit
      AudioStreaming Interface Descriptor:
        bLength                 7
        bDescriptorType        36
        bDescriptorSubtype      1 (AS_GENERAL)
        bTerminalLink           3
        bDelay                  1 frames
        wFormatTag              1 PCM
      AudioStreaming Interface Descriptor:
        bLength                11
        bDescriptorType        36
        bDescriptorSubtype      2 (FORMAT_TYPE)
        bFormatType             1 (FORMAT_TYPE_I)
        bNrChannels             2
        bSubframeSize           3
        bBitResolution         24
        bSamFreqType            1 Discrete
        tSamFreq[ 0]        48000
      Endpoint Descriptor:
        bLength                 9
        bDescriptorType         5
        bEndpointAddress     0x03  EP 3 OUT
        bmAttributes           45
          Transfer Type            Isochronous
          Synch Type               Synchronous
          Usage Type               Implicit feedback Data
        wMaxPacketSize     0x0120  1x 288 bytes
        bInterval               1
        bRefresh                0
        bSynchAddress           0
        AudioControl Endpoint Descriptor:
          bLength                 7
          bDescriptorType        37
          bDescriptorSubtype      1 (EP_GENERAL)
          bmAttributes         0x80
            MaxPacketsOnly
          bLockDelayUnits         1 Milliseconds
          wLockDelay              0 Milliseconds
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        4
      bAlternateSetting       0
      bNumEndpoints           0
      bInterfaceClass         1 Audio
      bInterfaceSubClass      1 Control Device
      bInterfaceProtocol      0
      iInterface              8 Peaberry Audio
      AudioControl Interface Descriptor:
        bLength                10
        bDescriptorType        36
        bDescriptorSubtype      1 (HEADER)
        bcdADC               1.00
        wTotalLength           60
        bInCollection           2
        baInterfaceNr( 0)       5
        baInterfaceNr( 1)       6
      AudioControl Interface Descriptor:
        bLength                12
        bDescriptorType        36
        bDescriptorSubtype      2 (INPUT_TERMINAL)
        bTerminalID             5
        wTerminalType      0x0201 Microphone
        bAssocTerminal          0
        bNrChannels             1
        wChannelConfig     0x0003
          Left Front (L)
          Right Front (R)
        iChannelNames           0
        iTerminal               0
      AudioControl Interface Descriptor:
        bLength                 9
        bDescriptorType        36
        bDescriptorSubtype      3 (OUTPUT_TERMINAL)
        bTerminalID             6
        wTerminalType      0x0101 USB Streaming
        bAssocTerminal          0
        bSourceID               5
        iTerminal               0
      AudioControl Interface Descriptor:
        bLength                12
        bDescriptorType        36
        bDescriptorSubtype      2 (INPUT_TERMINAL)
        bTerminalID             7
        wTerminalType      0x0101 USB Streaming
        bAssocTerminal          0
        bNrChannels             2
        wChannelConfig     0x0003
          Left Front (L)
          Right Front (R)
        iChannelNames           0
        iTerminal               0
      AudioControl Interface Descriptor:
        bLength                 8
        bDescriptorType        36
        bDescriptorSubtype      6 (FEATURE_UNIT)
        bUnitID                 8
        bSourceID               7
        bControlSize            1
        bmaControls( 0)      0x03
          Mute Control
          Volume Control
        iFeature                0
      AudioControl Interface Descriptor:
        bLength                 9
        bDescriptorType        36
        bDescriptorSubtype      3 (OUTPUT_TERMINAL)
        bTerminalID             9
        wTerminalType      0x0301 Speaker
        bAssocTerminal          0
        bSourceID               8
        iTerminal               0
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        5
      bAlternateSetting       0
      bNumEndpoints           0
      bInterfaceClass         1 Audio
      bInterfaceSubClass      2 Streaming
      bInterfaceProtocol      0
      iInterface              6 Peaberry Microphone
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        5
      bAlternateSetting       1
      bNumEndpoints           1
      bInterfaceClass         1 Audio
      bInterfaceSubClass      2 Streaming
      bInterfaceProtocol      0
      iInterface              6 Peaberry Microphone
      AudioStreaming Interface Descriptor:
        bLength                 7
        bDescriptorType        36
        bDescriptorSubtype      1 (AS_GENERAL)
        bTerminalLink           6
        bDelay                  2 frames
        wFormatTag              1 PCM
      AudioStreaming Interface Descriptor:
        bLength                11
        bDescriptorType        36
        bDescriptorSubtype      2 (FORMAT_TYPE)
        bFormatType             1 (FORMAT_TYPE_I)
        bNrChannels             1
        bSubframeSize           2
        bBitResolution         16
        bSamFreqType            1 Discrete
        tSamFreq[ 0]        48000
      Endpoint Descriptor:
        bLength                 9
        bDescriptorType         5
        bEndpointAddress     0x84  EP 4 IN
        bmAttributes           45
          Transfer Type            Isochronous
          Synch Type               Synchronous
          Usage Type               Implicit feedback Data
        wMaxPacketSize     0x0060  1x 96 bytes
        bInterval               1
        bRefresh                0
        bSynchAddress           0
        AudioControl Endpoint Descriptor:
          bLength                 7
          bDescriptorType        37
          bDescriptorSubtype      1 (EP_GENERAL)
          bmAttributes         0x80
            MaxPacketsOnly
          bLockDelayUnits         1 Milliseconds
          wLockDelay              0 Milliseconds
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        6
      bAlternateSetting       0
      bNumEndpoints           0
      bInterfaceClass         1 Audio
      bInterfaceSubClass      2 Streaming
      bInterfaceProtocol      0
      iInterface              5 Peaberry Speaker
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        6
      bAlternateSetting       1
      bNumEndpoints           1
      bInterfaceClass         1 Audio
      bInterfaceSubClass      2 Streaming
      bInterfaceProtocol      0
      iInterface              5 Peaberry Speaker
      AudioStreaming Interface Descriptor:
        bLength                 7
        bDescriptorType        36
        bDescriptorSubtype      1 (AS_GENERAL)
        bTerminalLink           7
        bDelay                  1 frames
        wFormatTag              1 PCM
      AudioStreaming Interface Descriptor:
        bLength                11
        bDescriptorType        36
        bDescriptorSubtype      2 (FORMAT_TYPE)
        bFormatType             1 (FORMAT_TYPE_I)
        bNrChannels             2
        bSubframeSize           3
        bBitResolution         24
        bSamFreqType            1 Discrete
        tSamFreq[ 0]        48000
      Endpoint Descriptor:
        bLength                 9
        bDescriptorType         5
        bEndpointAddress     0x05  EP 5 OUT
        bmAttributes           45
          Transfer Type            Isochronous
          Synch Type               Synchronous
          Usage Type               Implicit feedback Data
        wMaxPacketSize     0x0120  1x 288 bytes
        bInterval               1
        bRefresh                0
        bSynchAddress           0
        AudioControl Endpoint Descriptor:
          bLength                 7
          bDescriptorType        37
          bDescriptorSubtype      1 (EP_GENERAL)
          bmAttributes         0x80
            MaxPacketsOnly
          bLockDelayUnits         1 Milliseconds
          wLockDelay              0 Milliseconds
Device Status:     0x0001
  Self Powered

USB Headset:
Bus 001 Device 016: ID 05e1:2010 Syntek Semiconductor Co., Ltd
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0
  bDeviceProtocol         0
  bMaxPacketSize0        64
  idVendor           0x05e1 Syntek Semiconductor Co., Ltd
  idProduct          0x2010
  bcdDevice            1.00
  iManufacturer           0
  iProduct                1 USB VoIP Device
  iSerial                 0
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength          218
    bNumInterfaces          4
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0xa0
      (Bus Powered)
      Remote Wakeup
    MaxPower              100mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           0
      bInterfaceClass         1 Audio
      bInterfaceSubClass      1 Control Device
      bInterfaceProtocol      0
      iInterface              0
      AudioControl Interface Descriptor:
        bLength                10
        bDescriptorType        36
        bDescriptorSubtype      1 (HEADER)
        bcdADC               1.00
        wTotalLength           71
        bInCollection           2
        baInterfaceNr( 0)       1
        baInterfaceNr( 1)       2
      AudioControl Interface Descriptor:
        bLength                12
        bDescriptorType        36
        bDescriptorSubtype      2 (INPUT_TERMINAL)
        bTerminalID             1
        wTerminalType      0x0101 USB Streaming
        bAssocTerminal          0
        bNrChannels             2
        wChannelConfig     0x0003
          Left Front (L)
          Right Front (R)
        iChannelNames           0
        iTerminal               0
      AudioControl Interface Descriptor:
        bLength                12
        bDescriptorType        36
        bDescriptorSubtype      2 (INPUT_TERMINAL)
        bTerminalID             2
        wTerminalType      0x0201 Microphone
        bAssocTerminal          0
        bNrChannels             1
        wChannelConfig     0x0001
          Left Front (L)
        iChannelNames           0
        iTerminal               0
      AudioControl Interface Descriptor:
        bLength                 9
        bDescriptorType        36
        bDescriptorSubtype      3 (OUTPUT_TERMINAL)
        bTerminalID             6
        wTerminalType      0x0301 Speaker
        bAssocTerminal          0
        bSourceID               9
        iTerminal               0
      AudioControl Interface Descriptor:
        bLength                 9
        bDescriptorType        36
        bDescriptorSubtype      3 (OUTPUT_TERMINAL)
        bTerminalID             7
        wTerminalType      0x0101 USB Streaming
        bAssocTerminal          0
        bSourceID              10
        iTerminal               0
      AudioControl Interface Descriptor:
        bLength                10
        bDescriptorType        36
        bDescriptorSubtype      6 (FEATURE_UNIT)
        bUnitID                 9
        bSourceID               1
        bControlSize            1
        bmaControls( 0)      0x01
          Mute Control
        bmaControls( 1)      0x02
          Volume Control
        bmaControls( 2)      0x02
          Volume Control
        iFeature                0
      AudioControl Interface Descriptor:
        bLength                 9
        bDescriptorType        36
        bDescriptorSubtype      6 (FEATURE_UNIT)
        bUnitID                10
        bSourceID               2
        bControlSize            1
        bmaControls( 0)      0x03
          Mute Control
          Volume Control
        bmaControls( 1)      0x00
        iFeature                0
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           0
      bInterfaceClass         1 Audio
      bInterfaceSubClass      2 Streaming
      bInterfaceProtocol      0
      iInterface              0
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       1
      bNumEndpoints           1
      bInterfaceClass         1 Audio
      bInterfaceSubClass      2 Streaming
      bInterfaceProtocol      0
      iInterface              0
      AudioStreaming Interface Descriptor:
        bLength                 7
        bDescriptorType        36
        bDescriptorSubtype      1 (AS_GENERAL)
        bTerminalLink           1
        bDelay                  1 frames
        wFormatTag              1 PCM
      AudioStreaming Interface Descriptor:
        bLength                11
        bDescriptorType        36
        bDescriptorSubtype      2 (FORMAT_TYPE)
        bFormatType             1 (FORMAT_TYPE_I)
        bNrChannels             2
        bSubframeSize           2
        bBitResolution         16
        bSamFreqType            1 Discrete
        tSamFreq[ 0]        48000
      Endpoint Descriptor:
        bLength                 9
        bDescriptorType         5
        bEndpointAddress     0x01  EP 1 OUT
        bmAttributes            9
          Transfer Type            Isochronous
          Synch Type               Adaptive
          Usage Type               Data
        wMaxPacketSize     0x00c8  1x 200 bytes
        bInterval               1
        bRefresh                0
        bSynchAddress           0
        AudioControl Endpoint Descriptor:
          bLength                 7
          bDescriptorType        37
          bDescriptorSubtype      1 (EP_GENERAL)
          bmAttributes         0x00
          bLockDelayUnits         1 Milliseconds
          wLockDelay              1 Milliseconds
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        2
      bAlternateSetting       0
      bNumEndpoints           0
      bInterfaceClass         1 Audio
      bInterfaceSubClass      2 Streaming
      bInterfaceProtocol      0
      iInterface              0
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        2
      bAlternateSetting       1
      bNumEndpoints           1
      bInterfaceClass         1 Audio
      bInterfaceSubClass      2 Streaming
      bInterfaceProtocol      0
      iInterface              0
      AudioStreaming Interface Descriptor:
        bLength                 7
        bDescriptorType        36
        bDescriptorSubtype      1 (AS_GENERAL)
        bTerminalLink           7
        bDelay                  1 frames
        wFormatTag              1 PCM
      AudioStreaming Interface Descriptor:
        bLength                11
        bDescriptorType        36
        bDescriptorSubtype      2 (FORMAT_TYPE)
        bFormatType             1 (FORMAT_TYPE_I)
        bNrChannels             1
        bSubframeSize           2
        bBitResolution         16
        bSamFreqType            1 Discrete
        tSamFreq[ 0]        48000
      Endpoint Descriptor:
        bLength                 9
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            5
          Transfer Type            Isochronous
          Synch Type               Asynchronous
          Usage Type               Data
        wMaxPacketSize     0x0064  1x 100 bytes
        bInterval               1
        bRefresh                0
        bSynchAddress           0
        AudioControl Endpoint Descriptor:
          bLength                 7
          bDescriptorType        37
          bDescriptorSubtype      1 (EP_GENERAL)
          bmAttributes         0x00
          bLockDelayUnits         0 Undefined
          wLockDelay              0 Undefined
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        3
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      0 No Subclass
      bInterfaceProtocol      0 None
      iInterface              0
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.00
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength      50
         Report Descriptors:
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0004  1x 4 bytes
        bInterval              32
Device Status:     0x0000
  (Bus Powered)

What I posted before is a summary of the above, 7 interfaces of which two are audio control interfaces and the first one is a vendor specific interface (accepting the ptt command and sis570 control commands)

Re: Peaberry TX not working as should

PostPosted: Sun Apr 28, 2013 10:58 pm
by CT1IQI
I am investigating whether this vendor specific interface as first one is causing this problem as Alsa' s naming convention hw:x,y seems to be inadequate to select the proper interfaces that follow; the order in which Peaberry presents the audio interfaces is not in the way as e.g. my USB headset does, which interfaces without any difficulty, as it happens using exactly the same 48ksps rate and coding format for headphnes and single channel for microphone.
Will try to bypass alsa altogether by changing the C code of quisk to directly select the usb interface, as I have already done for the sis570 control interface which works from the python code using pyusb's libusb wrapper library.

Re: Peaberry TX not working as should

PostPosted: Mon Apr 29, 2013 4:17 am
by hansvi
Concerning the si570 control, all I had to do was to remove a single line from the softrock si570 hardware driver (see also here for my notes on that subject).

Anyway, that's an interesting thought... What I think is strange is that RX works without any issues. My guess was that this is because it is located on device #0 of card #1, while the output seems to be located on device #1. Anyway it's all very confusing to me, I have no idea why there are 7 interfaces, nor what they map to, nor how that relates to the two devices.

Continuing my experiments, I also don't manage to get quisk tx properly set up yet. But I do get the speakers working (so all the parts are working, individually). If I try e.g.:

Code: Select all
speaker-test -Dplughw:1,1


I get noise on the speakers (you can also select a sine wave with -t sine). If it doesn't work the first time, try again (as described in the notes here, Pulseaudio doesn't find all the devices the first time it loads. I had that issue a few times, but it only fails the first time).

It might be an interesting experiment to try and access the interfaces directly. Another option would be to start playing with the asoundrc file. I found some good documentation here, it seems pretty powerful. In the long run it would be better if it can work with ALSA, because even if you get quisk up and running, that doesn't help you with other apps (I would like to use gnuradio e.g., I'll have to write a Peaberry source block there to control the Si570 but that seems doable).

Re: Peaberry TX not working as should

PostPosted: Mon Apr 29, 2013 1:39 pm
by CT1IQI
good points. As ALSA and Ubuntu & Debian find wide use it is probably better to tweak the Peaberry firmware to interface without the problems we are encountering.
What the speaker is concerned, it should get disconnected during TX. SPKR_L&R stem from the PSOC which sets them through from the AUDIO_L&R outputs of U7 during TX and isolates them during TX.
At least that is what the firmware suggests should happen. USB presents them as if they were both concurrently available but that is not the case. Peaberry in TX mode offers IQ playback (radio transmit) and mono microphone capture, and in RX offers IQ capture (radio receive), audio stereo playback (line out), and mono microphone capture. In TX mode IQ capture strictly speaking is still active but not connected to anything it seems (the input of mixer U6 gets grounded by Q2). That probably explains the noise floor I see in Quiks during transmit. The radio receive stream is still active but not getting anything.
A strange thing I also noted is that in 96 ksps mode the usb streaming format gets set to 16 bit; have not found (yet) that the D/A A/D sampling width or ADC DAC format gets reduced from 24 to 16 bit. So that may explain the jittery audio @ 96 ksps. This format is controlled in the pcm3060 in registers 43h and 48h through the FMT2 and FMT1 bit pairs. Have not found in the firmware that these registers get set to anything other than their default at IC initialisation which is 24-bit I2S format, regardless of sampling frequency. But I may have overlooked something in the code.
Will now try to get a programmer operational that can flash this Cypress PSOC. First challenge is a mating connector to this miniature debug port ....
I have a Cypress Semiconductor Corp. CY7C68013 EZ-USB FX2 USB 2.0 Development Kit (ridiculously low cost of 13 USD at ebay) and have read that it should be able to act as a programmer to the CY8C3XXX.

Re: Peaberry TX not working as should

PostPosted: Mon Apr 29, 2013 2:23 pm
by hansvi
Your last message gave me an idea. We know that the PTT button is working in quisk. So I simply commented out anything in the config file relating to the microphone and such. I then connected the antenna output to a power meter and a dummy load and started quisk.
If I then output a sine wave to device 1,1, I see no difference... but if I type

Code: Select all
speaker-test -t sine -Dplughw:1,0


I see the power go up to ~0.8Watt. Now, speaker-test probably doesn't send the signal in I/Q modulation, and I'm not fluent enough in analytical signals to have an idea what is happening if you transmit I and Q in phase, but if you somehow would manage to get hold of a wav with a stereo sine and cosine, my prediction is that the power meter would go all the way to 1W (as it does in windows). Now that I think of it, if Re=Im=sin(x), that means the signal would pass through 0, so the amplitude would vary between 0 and 100%, so full power is not expected..

I think we're getting somewhere.