Transfer function between voltage and decibel output for in-ear headphones What would be a decent formula for approximating the connection between voltage and decibel output for a typical set of unpowered in-ear headphones?

I'm generating sine waves from the computer: an array of floats between -1.0 and +1.0 gets sent out through the speaker:

X_out = h * sin( f * 2π * t ); // h is the amplitude


Let's say we assume the user to ramp up their volume so that h=1 corresponds to a loud  but comfortable listening level.  So:

h=1 ~ dB_out=80dB


Now, how can I mathematically connect h and dB_out?

I've read that:

v_out ~ h


Somewhere I have seen the formula:

SPL = 20 * Log10( v_out / v_ref )


So, rearranging: 

v_out = v_ref * 10 ^ ( SPL / 20 )
k * h = v_ref * 10 ^ ( SPL / 20 )
h = k' * 10 ^ (SPL / 20 )
  = A * exp( SPL ) + B,  for suitable A, B


Is this working valid?

Here is the alternative formulation of the question:

Given a frequency f, and a desired decibel level,  what h do I need to generate that decibel level?
That depends to a very large degree on the type &amp; sensitivity on the headset, the gain of the amplifier and the frequency. I don't think there is a reasonable rule of thumb, this will be all over the place.