History log of /haiku/src/add-ons/kernel/drivers/audio/echo/multi.cpp
Revision Date Author Comments
# af8ec5e1 07-Apr-2024 Muhamed Emad <muhamed.emadeldeen@gmail.com>

echo: enable Werror

Part of #9460

* If there is an operation between signed and unsigned int, the unsigned is changed to signed one,
except for some operations (if before the operation the signed one is checked to be less than
zero or not, then the signed one get cast to be unsigned (errors due to sign error when casting
are impossible))
* When doing operations on pointers, integers get cast to uintptr_t type

Untested: I don't have the hardware.

Change-Id: I6a959c004862e055ee99f6f2ad5ca3397b32cdd2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7484
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>


# 7627095f 21-Jun-2016 Murai Takashi <tmurai01@gmail.com>

multi.cpp: Fix clang warnings.

Signed-off-by: Dario Casalinuovo <b.vitruvio@gmail.com>


# 1f6d4bcf 09-May-2013 Jérôme Duval <jerome.duval@gmail.com>

echo: fixes 64 bit warnings


# 9668d199 02-Jan-2012 Philippe Saint-Pierre <stpere@gmail.com>

echo driver: replace usage of strncpy by strlcpy

Usage of strncpy in this context could lead to a non null terminated string.
various coding style fix.

CID 2217.


# 5076aaf0 16-Feb-2009 Jérôme Duval <korli@users.berlios.de>

* some style improvements again (ie lower case variables as pointed by Axel)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29238 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d0eaec30 01-Feb-2009 Michael Lotz <mmlr@mlotz.ch>

Fix more operator precedence errors. These do not do what you'd expect at first
sight. The comparison operator takes precedence over the binary ones.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29121 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 7f2d1a26 11-Jan-2009 Jérôme Duval <korli@users.berlios.de>

* for user_memcpy, use an on-stack structure and copy that at once, as suggested by Axel.
* apply to auvia, emuxki and echo*.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28887 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 11f2701e 11-Oct-2008 Jérôme Duval <korli@users.berlios.de>

we load settings on open(), changes are taken into account on media_server restarts


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27982 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 8715a6ad 07-Aug-2008 Jérôme Duval <korli@users.berlios.de>

* style cleanup
* avoid using read/write and block flags for mapping register memory


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26867 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 96cf4bfb 24-Jul-2007 Jérôme Duval <korli@users.berlios.de>

should fix bug #1328, how could this be not noticed until now ...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21696 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b0d9cd6f 13-May-2007 Ithamar R. Adema <ithamar.adema@team-embedded.nl>

* Delete all local copies of multi_audio from source tree.
* Change name of header for Haiku specific multi_audio to hmulti_audio (in line with the rename of the media addon itself)



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21136 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4dd9e436 19-Mar-2007 Jérôme Duval <korli@users.berlios.de>

fixed some warnings in multi.cpp
updated with Release B3 (I didn't test yet) :
-Firmware to support new revision 5 Indigo io and Indigo dj hardware
-Firmware to support new revision 4 Mia MIDI hardware
-New FPGA & DSP code to correct problems with S/PDIF at 96 kHz on Gina3G (note new,
longer timeout required in C3gDco.cpp)
-Changes to support x64 Windows
-Fix for 96 kHz on Mac OS X for Echo 3G
-New QuerySampleRateRange method for all devices
-Simplified channel mask classes
-New ECHO_ASSERT macro to simplfy enabling and disabling asserts
-Removed m_wBytesPerSample from CEchoGals; it wasn't being used and caused housekeeping problems for Adobe Audition recording in mono mode
-Now using READ_REGISTER_ULONG and WRITE_REGISTER_ULONG macros to read and write DSP registers; these
are automatically defined if the platform environment doesn't define them.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20394 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 0098d20a 06-Feb-2006 Jérôme Duval <korli@users.berlios.de>

we only expose first two digital channels when card is echo3g and rate is more than 50000, it's a restriction noticed in C3g::Start()
it should enable playback/record at 88/92kHz


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16246 a95241bf-73f2-0310-859d-f6bbb57e9c96


# bd9d5861 30-Jan-2006 Jérôme Duval <korli@users.berlios.de>

added driver settings, untested


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16155 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ec816dff 16-Dec-2005 Jérôme Duval <korli@users.berlios.de>

fixed build for non haiku platforms
fixed displayed names for some models
added untested support for CardBus models Indigo*, thanks to Patrick Lafarguette for his great help on this feature


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15571 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 08661eb2 24-Oct-2005 Jérôme Duval <korli@users.berlios.de>

* Fixed build with new code
* 3g and indigo are now built in separate drivers (though indigo isn't built because these cards are CardBus based)
* reworked multi audio interface to publish all available output/input streams (as 16 bits/stereo/48kHz)
* tested ok on a Gina3g on R5 (with Haiku MultiAudio media addon), CLAmp, SoundRecorder
* default output is to be chosen with the Media preferences panel


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14496 a95241bf-73f2-0310-859d-f6bbb57e9c96


# be188ae1 21-Sep-2005 Jérôme Duval <korli@users.berlios.de>

Echo Generic Driver

Release B2

-New firmware for Gina3G & Layla3G that fixes pops and clicks with simultaneous MIDI
and audio I/O. There is now only one DSP firmware image for both Gina3G and Layla3G.
-The new firmware does not support 8 kHz sampling
-Changed C3g and C3gDco to support the new firmware
-Added C3gDco::GetAudioMeters virtual method so that the correct meter values
are returned for Gina3G and Layla3G
-Simplified CChannelMask; the mask is no longer stored byte-swapped on Macs and the
masks are at most 32 bits wide
-Moved the MakeDaffyDuck method from CEchoGals to a static member of CDaffyDuck;
the constructor for CDaffyDuck is now protected, so that you can only create new
ducks by calling MakeDaffyDuck.
-Various minor changes to avoid compiler warnings for AMD64 build
-OsSupportWdm has been rewritten to use the WDM DMA APIs


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14221 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 608ee6c4 10-May-2005 Jérôme Duval <korli@users.berlios.de>

fix noticed by [Beta]. thanks!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12617 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 168bee47 09-May-2005 Jérôme Duval <korli@users.berlios.de>

added nominal level controls (only when available)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12611 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5608ef1a 17-Apr-2005 Jérôme Duval <korli@users.berlios.de>

Working version tested with a Gina3G
* Mixer interface for outputs
* Recording fixed
* Only outputs 1/2 and 3/4 are wired (use the Haiku Media preferences app to select one or the other)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12428 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c9002531 30-Mar-2005 Jérôme Duval <korli@users.berlios.de>

work in progress
changed name
initial mixer interface


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12164 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 92b10541 11-Feb-2004 shatty <shatty@nowhere.fake>

working for playback on R5 and openbeos media servers!


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6560 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 04980002 06-Feb-2004 shatty <shatty@nowhere.fake>

generalize bits per sample (we support 8, 16, 32 - which is actually 24 with padding). also fix "the bug" which was using stream->channels instead of channels for open_params.Pipe.wInterleave. it would have been nice for OpenAudio to give us some reasonable error ;-)


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6508 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5adb129e 06-Jan-2004 Jérôme Duval <korli@users.berlios.de>

Echo driver : echogals and echo24
This is implemented but untested.
Mixer is lacking, and multichannels support. Only 2 channels input/output currently.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5929 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 1f6d4bcfd316782cc45150c3277b8e50decd8c16 09-May-2013 Jérôme Duval <jerome.duval@gmail.com>

echo: fixes 64 bit warnings


# 9668d19918cfaca7f4c0b0f87245e135df4a79dc 02-Jan-2012 Philippe Saint-Pierre <stpere@gmail.com>

echo driver: replace usage of strncpy by strlcpy

Usage of strncpy in this context could lead to a non null terminated string.
various coding style fix.

CID 2217.


# 5076aaf050c0d14aa59d2e32952207124da35f2a 16-Feb-2009 Jérôme Duval <korli@users.berlios.de>

* some style improvements again (ie lower case variables as pointed by Axel)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29238 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d0eaec308617fe6623df22fb2e41308517c5d7cb 01-Feb-2009 Michael Lotz <mmlr@mlotz.ch>

Fix more operator precedence errors. These do not do what you'd expect at first
sight. The comparison operator takes precedence over the binary ones.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29121 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 7f2d1a266efede46393a6f129f37ac3d3aa81e3a 11-Jan-2009 Jérôme Duval <korli@users.berlios.de>

* for user_memcpy, use an on-stack structure and copy that at once, as suggested by Axel.
* apply to auvia, emuxki and echo*.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@28887 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 11f2701ecfbde84687e4e534b9b7dbb857263ffc 11-Oct-2008 Jérôme Duval <korli@users.berlios.de>

we load settings on open(), changes are taken into account on media_server restarts


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27982 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 8715a6ad9cd3a0b2f3b1d30e44709cb3d2cd422f 07-Aug-2008 Jérôme Duval <korli@users.berlios.de>

* style cleanup
* avoid using read/write and block flags for mapping register memory


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26867 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 96cf4bfb88a59c6ac7c59fde1ac6669740f91940 24-Jul-2007 Jérôme Duval <korli@users.berlios.de>

should fix bug #1328, how could this be not noticed until now ...


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21696 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b0d9cd6f665066ef752801665f1b935187119362 13-May-2007 Ithamar R. Adema <ithamar.adema@team-embedded.nl>

* Delete all local copies of multi_audio from source tree.
* Change name of header for Haiku specific multi_audio to hmulti_audio (in line with the rename of the media addon itself)



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21136 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 4dd9e43637031d2c5a6755a0184040f0de8f2884 19-Mar-2007 Jérôme Duval <korli@users.berlios.de>

fixed some warnings in multi.cpp
updated with Release B3 (I didn't test yet) :
-Firmware to support new revision 5 Indigo io and Indigo dj hardware
-Firmware to support new revision 4 Mia MIDI hardware
-New FPGA & DSP code to correct problems with S/PDIF at 96 kHz on Gina3G (note new,
longer timeout required in C3gDco.cpp)
-Changes to support x64 Windows
-Fix for 96 kHz on Mac OS X for Echo 3G
-New QuerySampleRateRange method for all devices
-Simplified channel mask classes
-New ECHO_ASSERT macro to simplfy enabling and disabling asserts
-Removed m_wBytesPerSample from CEchoGals; it wasn't being used and caused housekeeping problems for Adobe Audition recording in mono mode
-Now using READ_REGISTER_ULONG and WRITE_REGISTER_ULONG macros to read and write DSP registers; these
are automatically defined if the platform environment doesn't define them.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@20394 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 0098d20af27d143081ff5cf198590029920fe67a 06-Feb-2006 Jérôme Duval <korli@users.berlios.de>

we only expose first two digital channels when card is echo3g and rate is more than 50000, it's a restriction noticed in C3g::Start()
it should enable playback/record at 88/92kHz


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16246 a95241bf-73f2-0310-859d-f6bbb57e9c96


# bd9d5861cbe44f498588175b1f224154dec899a0 30-Jan-2006 Jérôme Duval <korli@users.berlios.de>

added driver settings, untested


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16155 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ec816dffe27c25af857bc2e9e8600e0312f4277e 16-Dec-2005 Jérôme Duval <korli@users.berlios.de>

fixed build for non haiku platforms
fixed displayed names for some models
added untested support for CardBus models Indigo*, thanks to Patrick Lafarguette for his great help on this feature


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15571 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 08661eb233d47e2fbf010543eb46bded439bbe93 24-Oct-2005 Jérôme Duval <korli@users.berlios.de>

* Fixed build with new code
* 3g and indigo are now built in separate drivers (though indigo isn't built because these cards are CardBus based)
* reworked multi audio interface to publish all available output/input streams (as 16 bits/stereo/48kHz)
* tested ok on a Gina3g on R5 (with Haiku MultiAudio media addon), CLAmp, SoundRecorder
* default output is to be chosen with the Media preferences panel


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14496 a95241bf-73f2-0310-859d-f6bbb57e9c96


# be188ae133da3258026dc1f9c1330f0d27e53494 21-Sep-2005 Jérôme Duval <korli@users.berlios.de>

Echo Generic Driver

Release B2

-New firmware for Gina3G & Layla3G that fixes pops and clicks with simultaneous MIDI
and audio I/O. There is now only one DSP firmware image for both Gina3G and Layla3G.
-The new firmware does not support 8 kHz sampling
-Changed C3g and C3gDco to support the new firmware
-Added C3gDco::GetAudioMeters virtual method so that the correct meter values
are returned for Gina3G and Layla3G
-Simplified CChannelMask; the mask is no longer stored byte-swapped on Macs and the
masks are at most 32 bits wide
-Moved the MakeDaffyDuck method from CEchoGals to a static member of CDaffyDuck;
the constructor for CDaffyDuck is now protected, so that you can only create new
ducks by calling MakeDaffyDuck.
-Various minor changes to avoid compiler warnings for AMD64 build
-OsSupportWdm has been rewritten to use the WDM DMA APIs


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14221 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 608ee6c43c1acb294f8c8a0e87a88e500dbd42a4 10-May-2005 Jérôme Duval <korli@users.berlios.de>

fix noticed by [Beta]. thanks!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12617 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 168bee472e0b30a258bb62e2ae79025d3ce6ab1a 09-May-2005 Jérôme Duval <korli@users.berlios.de>

added nominal level controls (only when available)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12611 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5608ef1a9ed12edec832b89ed816802ebd835358 17-Apr-2005 Jérôme Duval <korli@users.berlios.de>

Working version tested with a Gina3G
* Mixer interface for outputs
* Recording fixed
* Only outputs 1/2 and 3/4 are wired (use the Haiku Media preferences app to select one or the other)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12428 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c9002531707d3f9a185a100dc6393d7b6e75aca3 30-Mar-2005 Jérôme Duval <korli@users.berlios.de>

work in progress
changed name
initial mixer interface


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12164 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 92b105418dcabba5e0ae6aead2f5d9b9440fa531 11-Feb-2004 shatty <shatty@nowhere.fake>

working for playback on R5 and openbeos media servers!


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6560 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 049800025552439ed2c133483dc477beb37724bb 06-Feb-2004 shatty <shatty@nowhere.fake>

generalize bits per sample (we support 8, 16, 32 - which is actually 24 with padding). also fix "the bug" which was using stream->channels instead of channels for open_params.Pipe.wInterleave. it would have been nice for OpenAudio to give us some reasonable error ;-)


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@6508 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 5adb129ea33d02bfa4f36bb515d6153538c6c07e 06-Jan-2004 Jérôme Duval <korli@users.berlios.de>

Echo driver : echogals and echo24
This is implemented but untested.
Mixer is lacking, and multichannels support. Only 2 channels input/output currently.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5929 a95241bf-73f2-0310-859d-f6bbb57e9c96