DMA Random Access and Playback [closed]

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
1
down vote

favorite












I have a peripheral connected to my Linux PC via PCIe that plays a waveform(for example it could be a music stream).



I would like create a programmable waveform generator that stores pre-generated waveform blocks in RAM and use DMA for fast continuous playback through my peripheral. I would like to implement a Linux driver to do this with the following requirements:



  1. I pre-generate a set of N waveform blocks of arbitrary length and save them in RAM.

  2. I would like to playback these waveform blocks in an arbitrary order where the order of playback is determined at runtime.

  3. There should be no gaps in the playback between blocks. In some cases the blocks may be as short as 1 millisecond.

  4. I would like to make changes to blocks in RAM at runtime.

  5. I can implement a buffer in the Peripheral hardware to smooth data transfer when the system is busy. But I would rather not have to do it.

Does anyone have an example of a driver(or outline) that implements such a protocol?










share|improve this question















closed as too broad by Anthon, sebasth, Jeff Schaller, Kusalananda, Stephen Rauch Sep 26 '17 at 12:47


Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.














  • I think your question should be answered on different StackExchange page. It's not really Linux/Unix question. Maybe StackOverflow?
    – mrc02_kr
    Sep 26 '17 at 7:26










  • Sorry I should have been a bit clearer. The waveform generator is connected to a Linux PC via USB or PCI. The hardware itself is quite dumb and I want Linux to handle the data transfer to the hardware.
    – RazorClaw
    Sep 26 '17 at 7:29







  • 3




    yeah, this is 'a bit' different situation. Can you edit your question, and make clear what exactly are you trying to do, what hardware are you using, and what have you done so far?
    – mrc02_kr
    Sep 26 '17 at 7:32










  • "USB or PCI" or quite different things, and PCIe is again different from PCI. You can't do DMA via USB. However, you can control any USB device even from userspace, and send waveforms however you like. You can do DMA vie PCI or PCIe, but this needs a lot of details (preferably a datasheet) about the hardware used. Also, Linux is not a realtime OS, you can't make any guarantees about timing, even with the "RT" patches.
    – dirkt
    Sep 26 '17 at 11:25















up vote
1
down vote

favorite












I have a peripheral connected to my Linux PC via PCIe that plays a waveform(for example it could be a music stream).



I would like create a programmable waveform generator that stores pre-generated waveform blocks in RAM and use DMA for fast continuous playback through my peripheral. I would like to implement a Linux driver to do this with the following requirements:



  1. I pre-generate a set of N waveform blocks of arbitrary length and save them in RAM.

  2. I would like to playback these waveform blocks in an arbitrary order where the order of playback is determined at runtime.

  3. There should be no gaps in the playback between blocks. In some cases the blocks may be as short as 1 millisecond.

  4. I would like to make changes to blocks in RAM at runtime.

  5. I can implement a buffer in the Peripheral hardware to smooth data transfer when the system is busy. But I would rather not have to do it.

Does anyone have an example of a driver(or outline) that implements such a protocol?










share|improve this question















closed as too broad by Anthon, sebasth, Jeff Schaller, Kusalananda, Stephen Rauch Sep 26 '17 at 12:47


Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.














  • I think your question should be answered on different StackExchange page. It's not really Linux/Unix question. Maybe StackOverflow?
    – mrc02_kr
    Sep 26 '17 at 7:26










  • Sorry I should have been a bit clearer. The waveform generator is connected to a Linux PC via USB or PCI. The hardware itself is quite dumb and I want Linux to handle the data transfer to the hardware.
    – RazorClaw
    Sep 26 '17 at 7:29







  • 3




    yeah, this is 'a bit' different situation. Can you edit your question, and make clear what exactly are you trying to do, what hardware are you using, and what have you done so far?
    – mrc02_kr
    Sep 26 '17 at 7:32










  • "USB or PCI" or quite different things, and PCIe is again different from PCI. You can't do DMA via USB. However, you can control any USB device even from userspace, and send waveforms however you like. You can do DMA vie PCI or PCIe, but this needs a lot of details (preferably a datasheet) about the hardware used. Also, Linux is not a realtime OS, you can't make any guarantees about timing, even with the "RT" patches.
    – dirkt
    Sep 26 '17 at 11:25













up vote
1
down vote

favorite









up vote
1
down vote

favorite











I have a peripheral connected to my Linux PC via PCIe that plays a waveform(for example it could be a music stream).



I would like create a programmable waveform generator that stores pre-generated waveform blocks in RAM and use DMA for fast continuous playback through my peripheral. I would like to implement a Linux driver to do this with the following requirements:



  1. I pre-generate a set of N waveform blocks of arbitrary length and save them in RAM.

  2. I would like to playback these waveform blocks in an arbitrary order where the order of playback is determined at runtime.

  3. There should be no gaps in the playback between blocks. In some cases the blocks may be as short as 1 millisecond.

  4. I would like to make changes to blocks in RAM at runtime.

  5. I can implement a buffer in the Peripheral hardware to smooth data transfer when the system is busy. But I would rather not have to do it.

Does anyone have an example of a driver(or outline) that implements such a protocol?










share|improve this question















I have a peripheral connected to my Linux PC via PCIe that plays a waveform(for example it could be a music stream).



I would like create a programmable waveform generator that stores pre-generated waveform blocks in RAM and use DMA for fast continuous playback through my peripheral. I would like to implement a Linux driver to do this with the following requirements:



  1. I pre-generate a set of N waveform blocks of arbitrary length and save them in RAM.

  2. I would like to playback these waveform blocks in an arbitrary order where the order of playback is determined at runtime.

  3. There should be no gaps in the playback between blocks. In some cases the blocks may be as short as 1 millisecond.

  4. I would like to make changes to blocks in RAM at runtime.

  5. I can implement a buffer in the Peripheral hardware to smooth data transfer when the system is busy. But I would rather not have to do it.

Does anyone have an example of a driver(or outline) that implements such a protocol?







memory hardware interface






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Sep 28 '17 at 20:58

























asked Sep 26 '17 at 7:17









RazorClaw

62




62




closed as too broad by Anthon, sebasth, Jeff Schaller, Kusalananda, Stephen Rauch Sep 26 '17 at 12:47


Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.






closed as too broad by Anthon, sebasth, Jeff Schaller, Kusalananda, Stephen Rauch Sep 26 '17 at 12:47


Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.













  • I think your question should be answered on different StackExchange page. It's not really Linux/Unix question. Maybe StackOverflow?
    – mrc02_kr
    Sep 26 '17 at 7:26










  • Sorry I should have been a bit clearer. The waveform generator is connected to a Linux PC via USB or PCI. The hardware itself is quite dumb and I want Linux to handle the data transfer to the hardware.
    – RazorClaw
    Sep 26 '17 at 7:29







  • 3




    yeah, this is 'a bit' different situation. Can you edit your question, and make clear what exactly are you trying to do, what hardware are you using, and what have you done so far?
    – mrc02_kr
    Sep 26 '17 at 7:32










  • "USB or PCI" or quite different things, and PCIe is again different from PCI. You can't do DMA via USB. However, you can control any USB device even from userspace, and send waveforms however you like. You can do DMA vie PCI or PCIe, but this needs a lot of details (preferably a datasheet) about the hardware used. Also, Linux is not a realtime OS, you can't make any guarantees about timing, even with the "RT" patches.
    – dirkt
    Sep 26 '17 at 11:25

















  • I think your question should be answered on different StackExchange page. It's not really Linux/Unix question. Maybe StackOverflow?
    – mrc02_kr
    Sep 26 '17 at 7:26










  • Sorry I should have been a bit clearer. The waveform generator is connected to a Linux PC via USB or PCI. The hardware itself is quite dumb and I want Linux to handle the data transfer to the hardware.
    – RazorClaw
    Sep 26 '17 at 7:29







  • 3




    yeah, this is 'a bit' different situation. Can you edit your question, and make clear what exactly are you trying to do, what hardware are you using, and what have you done so far?
    – mrc02_kr
    Sep 26 '17 at 7:32










  • "USB or PCI" or quite different things, and PCIe is again different from PCI. You can't do DMA via USB. However, you can control any USB device even from userspace, and send waveforms however you like. You can do DMA vie PCI or PCIe, but this needs a lot of details (preferably a datasheet) about the hardware used. Also, Linux is not a realtime OS, you can't make any guarantees about timing, even with the "RT" patches.
    – dirkt
    Sep 26 '17 at 11:25
















I think your question should be answered on different StackExchange page. It's not really Linux/Unix question. Maybe StackOverflow?
– mrc02_kr
Sep 26 '17 at 7:26




I think your question should be answered on different StackExchange page. It's not really Linux/Unix question. Maybe StackOverflow?
– mrc02_kr
Sep 26 '17 at 7:26












Sorry I should have been a bit clearer. The waveform generator is connected to a Linux PC via USB or PCI. The hardware itself is quite dumb and I want Linux to handle the data transfer to the hardware.
– RazorClaw
Sep 26 '17 at 7:29





Sorry I should have been a bit clearer. The waveform generator is connected to a Linux PC via USB or PCI. The hardware itself is quite dumb and I want Linux to handle the data transfer to the hardware.
– RazorClaw
Sep 26 '17 at 7:29





3




3




yeah, this is 'a bit' different situation. Can you edit your question, and make clear what exactly are you trying to do, what hardware are you using, and what have you done so far?
– mrc02_kr
Sep 26 '17 at 7:32




yeah, this is 'a bit' different situation. Can you edit your question, and make clear what exactly are you trying to do, what hardware are you using, and what have you done so far?
– mrc02_kr
Sep 26 '17 at 7:32












"USB or PCI" or quite different things, and PCIe is again different from PCI. You can't do DMA via USB. However, you can control any USB device even from userspace, and send waveforms however you like. You can do DMA vie PCI or PCIe, but this needs a lot of details (preferably a datasheet) about the hardware used. Also, Linux is not a realtime OS, you can't make any guarantees about timing, even with the "RT" patches.
– dirkt
Sep 26 '17 at 11:25





"USB or PCI" or quite different things, and PCIe is again different from PCI. You can't do DMA via USB. However, you can control any USB device even from userspace, and send waveforms however you like. You can do DMA vie PCI or PCIe, but this needs a lot of details (preferably a datasheet) about the hardware used. Also, Linux is not a realtime OS, you can't make any guarantees about timing, even with the "RT" patches.
– dirkt
Sep 26 '17 at 11:25
















active

oldest

votes






















active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes

Popular posts from this blog

How to check contact read email or not when send email to Individual?

Bahrain

Postfix configuration issue with fips on centos 7; mailgun relay